mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
autorunManager: Provide a createBanner() implementation
Hotplug notifications use custom notification banners to include application icons in buttons. Bring those back by providing an appropriate createBanner() implementation.
This commit is contained in:
parent
e8a023a78f
commit
30c6e541f1
1 changed files with 11 additions and 4 deletions
|
|
@ -326,15 +326,21 @@ const AutorunNotification = new Lang.Class({
|
|||
this._manager = manager;
|
||||
this._mount = source.mount;
|
||||
|
||||
source.apps.forEach(Lang.bind(this, function (app) {
|
||||
// set the notification to urgent, so that it expands out
|
||||
this.setUrgency(MessageTray.Urgency.CRITICAL);
|
||||
},
|
||||
|
||||
createBanner: function() {
|
||||
let banner = new MessageTray.NotificationBanner(this);
|
||||
|
||||
this.source.apps.forEach(Lang.bind(this, function (app) {
|
||||
let actor = this._buttonForApp(app);
|
||||
|
||||
if (actor)
|
||||
this.addButton(actor);
|
||||
banner.addButton(actor);
|
||||
}));
|
||||
|
||||
// set the notification to urgent, so that it expands out
|
||||
this.setUrgency(MessageTray.Urgency.CRITICAL);
|
||||
return banner;
|
||||
},
|
||||
|
||||
_buttonForApp: function(app) {
|
||||
|
|
@ -352,6 +358,7 @@ const AutorunNotification = new Lang.Class({
|
|||
let button = new St.Button({ child: box,
|
||||
x_fill: true,
|
||||
x_align: St.Align.START,
|
||||
x_expand: true,
|
||||
button_mask: St.ButtonMask.ONE,
|
||||
style_class: 'hotplug-notification-item button' });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue