[Pkg-mozext-commits] [firetray] 272/399: destroy icons when shutting down IMStatusIcon

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:57 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch dfsg-clean
in repository firetray.

commit ff7bcd4c9102ad0fffabd192e7003cb8834667d3
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Tue Aug 7 22:34:02 2012 +0200

    destroy icons when shutting down IMStatusIcon
---
 src/modules/linux/FiretrayIMStatusIcon.jsm |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/modules/linux/FiretrayIMStatusIcon.jsm b/src/modules/linux/FiretrayIMStatusIcon.jsm
index 14f5af4..26aa295 100644
--- a/src/modules/linux/FiretrayIMStatusIcon.jsm
+++ b/src/modules/linux/FiretrayIMStatusIcon.jsm
@@ -43,7 +43,7 @@ firetray.IMStatusIcon = {
   },
 
   shutdown: function() {
-    gtk.gtk_status_icon_set_visible(this.trayIcon, false);
+    this.destroyIcons();
     // FIXME: tryCloseLibs should be done by Handler only, submodules should
     // just pass the imported ctypes modules to it
     // firetray.Utils.tryCloseLibs([gobject, gio, gtk]);
@@ -55,6 +55,14 @@ firetray.IMStatusIcon = {
       this.themedIcons[name] = gio.g_themed_icon_new(name);
   },
 
+  destroyIcons: function() {
+    for (let name in this.themedIcons) {
+      let gicon = this.themedIcons[name];
+      gicon = gobject.g_object_unref(gicon);
+    }
+    gobject.g_object_unref(this.trayIcon);
+  },
+
   setIconImageFromGIcon: function(gicon) {
     if (!firetray.IMStatusIcon.trayIcon || !gicon)
       F.ERROR("Icon missing");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firetray.git



More information about the Pkg-mozext-commits mailing list