[gnome-shell] NotificationDaemon: don't destroy trayicons when dismissing their notifications
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] NotificationDaemon: don't destroy trayicons when dismissing their notifications
- Date: Tue, 12 Oct 2010 21:22:14 +0000 (UTC)
commit bbdf88cf94eb822003315dc202aa52256f8e15e8
Author: Dan Winship <danw gnome org>
Date: Thu Sep 30 16:56:50 2010 -0400
NotificationDaemon: don't destroy trayicons when dismissing their notifications
Tray icons control their own lifespan; they're not supposed to
disappear when you dismiss their notifications like non-trayicon
notification sources do.
https://bugzilla.gnome.org/show_bug.cgi?id=631042
js/ui/notificationDaemon.js | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 3e0bd6b..59c48d5 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -344,14 +344,14 @@ NotificationDaemon.prototype = {
for (let id in this._sources) {
let source = this._sources[id];
if (source.app == tracker.focus_app) {
- source.destroy();
+ source.activated();
return;
}
}
},
_actionInvoked: function(notification, action, source, id) {
- source.destroy();
+ source.activated();
this._emitActionInvoked(id, action);
},
@@ -401,6 +401,7 @@ Source.prototype = {
this.title = this.app.get_name();
else
this.useNotificationIcon = true;
+ this._isTrayIcon = false;
},
notify: function(notification, icon) {
@@ -427,11 +428,18 @@ Source.prototype = {
setTrayIcon: function(icon) {
this._setSummaryIcon(icon);
this.useNotificationIcon = false;
+ this._isTrayIcon = true;
},
- _notificationClicked: function() {
+ _notificationClicked: function(notification) {
+ notification.destroy();
this.openApp();
- this.destroy();
+ this.activated();
+ },
+
+ activated: function() {
+ if (!this._isTrayIcon)
+ this.destroy();
},
openApp: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]