MessageTray: introduce configurable per-source notification policy

Allow message tray sources to provide a NotificationPolicy object,
that will configure how and if the source is displayed. For notification
daemon sources, this object is hooked to GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
This commit is contained in:
Giovanni Campagna
2012-10-16 17:08:54 +02:00
parent 4dc5bac72f
commit 098bd4509b
4 changed files with 203 additions and 13 deletions

View File

@ -293,7 +293,6 @@ const AutorunResidentSource = new Lang.Class({
_init: function(manager) {
this.parent(_("Removable Devices"), 'media-removable');
this.showInLockScreen = false;
this._mounts = [];
@ -301,6 +300,10 @@ const AutorunResidentSource = new Lang.Class({
this._notification = new AutorunResidentNotification(this._manager, this);
},
_createPolicy: function() {
return new MessageTray.NotificationPolicy({ showInLockScreen: false });
},
buildRightClickMenu: function() {
return null;
},