[gnome-shell] notificationDaemon: Clean up code paths



commit fe7ee1edc3f54fd51ba833faebd5b2fc5ac1e1bf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Dec 30 11:37:43 2012 -0500

    notificationDaemon: Clean up code paths
    
    While we really need to clean up the bad MessageTray API, this is
    a quick step to allow for a cleaner codebase for the future.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680414

 js/ui/notificationDaemon.js |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 6f63b58..3aa8668 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -358,9 +358,7 @@ const NotificationDaemon = new Lang.Class({
         let gicon = this._iconForNotificationData(icon, hints);
 
         if (notification == null) {
-            notification = new MessageTray.Notification(source, summary, body,
-                                                        { gicon: gicon,
-                                                          bannerMarkup: true });
+            notification = new MessageTray.Notification(source);
             ndata.notification = notification;
             notification.connect('destroy', Lang.bind(this,
                 function(n, reason) {
@@ -383,12 +381,12 @@ const NotificationDaemon = new Lang.Class({
                 function(n, actionId) {
                     this._emitActionInvoked(ndata.id, actionId);
                 }));
-        } else {
-            notification.update(summary, body, { gicon: gicon,
-                                                 bannerMarkup: true,
-                                                 clear: true });
         }
 
+        notification.update(summary, body, { gicon: gicon,
+                                             bannerMarkup: true,
+                                             clear: true });
+
         // We only display a large image if an icon is also specified.
         if (icon && (hints['image-data'] || hints['image-path'])) {
             let image = null;



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