[gnome-shell/wip/fmuellner/notification-redux+sass: 198/207] autorunManager: Create a custom notification banner



commit 2d49acd49ff63fe6d2ba9da0a9e2a8f15e4ad0c9
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Feb 17 03:40:25 2015 +0100

    autorunManager: Create a custom notification banner

 js/ui/components/autorunManager.js |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js
index a8d4c2a..222c5da 100644
--- a/js/ui/components/autorunManager.js
+++ b/js/ui/components/autorunManager.js
@@ -385,15 +385,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) {
@@ -411,6 +417,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: 'notification-item button' });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]