[MessageTray] handle "urgent" notifications specially
Urgent notifications jump to the front of the tray's notification queue, and come up pre-expanded. https://bugzilla.gnome.org/show_bug.cgi?id=611612
This commit is contained in:
@ -151,8 +151,11 @@ NotificationDaemon.prototype = {
|
||||
return id;
|
||||
}
|
||||
|
||||
// Source may be null if we have never received a notification from
|
||||
// this app or if all notifications from this app have been acknowledged.
|
||||
hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
|
||||
|
||||
// Source may be null if we have never received a notification
|
||||
// from this app or if all notifications from this app have
|
||||
// been acknowledged.
|
||||
if (source == null) {
|
||||
source = new Source(this._sourceId(appName), icon, hints);
|
||||
Main.messageTray.add(source);
|
||||
@ -211,6 +214,8 @@ NotificationDaemon.prototype = {
|
||||
notification.connect('action-invoked', Lang.bind(this, this._actionInvoked, source, id));
|
||||
}
|
||||
|
||||
notification.setUrgent(hints.urgency == Urgency.CRITICAL);
|
||||
|
||||
source.notify(notification);
|
||||
return id;
|
||||
},
|
||||
@ -290,8 +295,6 @@ Source.prototype = {
|
||||
},
|
||||
|
||||
update: function(icon, hints) {
|
||||
hints = Params.parse(hints, { urgency: Urgency.NORMAL }, true);
|
||||
|
||||
this._icon = icon;
|
||||
this._iconData = hints.icon_data;
|
||||
this._urgency = hints.urgency;
|
||||
|
Reference in New Issue
Block a user