[gnome-shell] NotificationDaemon: only remove the source if notification sender is removed from DBus and the appli



commit 0366e320af579d7c2172c4430c97bf336f6b4b09
Author: Marina Zhurakhinskaya <marinaz redhat com>
Date:   Wed Jul 27 17:08:08 2011 -0400

    NotificationDaemon: only remove the source if notification sender is removed from DBus and the application is set
    
    This ensures that we don't remove "notify-send" sources, senders of which are
    removed from DBus immediately.

 js/ui/notificationDaemon.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 5514ac1..d6053e2 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -461,9 +461,11 @@ Source.prototype = {
 
     _onNameVanished: function() {
         // Destroy the notification source when its sender is removed from DBus.
+        // Only do so if this.app is set to avoid removing "notify-send" sources, senders
+        // of which Ðre removed from DBus immediately.
         // Sender being removed from DBus would normally result in a tray icon being removed,
         // so allow the code path that handles the tray icon being removed to handle that case.
-        if (!this.trayIcon)
+        if (!this.trayIcon && this.app)
             this.destroy();
     },
 



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