mirror of
https://github.com/moparisthebest/FireTray
synced 2024-11-10 11:05:07 -05:00
fix shutdown so ctypes libs are close cleanly + cleaning
This commit is contained in:
parent
a9cc299259
commit
6f95421a2f
@ -110,6 +110,7 @@ firetray.Handler = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shutdown: function() {
|
shutdown: function() {
|
||||||
|
F.LOG("Disabling Handler");
|
||||||
firetray.PrefListener.unregister();
|
firetray.PrefListener.unregister();
|
||||||
|
|
||||||
if (this.inMailApp)
|
if (this.inMailApp)
|
||||||
|
@ -33,7 +33,7 @@ firetray.InstantMessaging = {
|
|||||||
if (!this.initialized) return;
|
if (!this.initialized) return;
|
||||||
F.LOG("Disabling InstantMessaging");
|
F.LOG("Disabling InstantMessaging");
|
||||||
|
|
||||||
Services.obs.removeAllObservers(firetray.InstantMessaging);
|
firetray.Utils.removeAllObservers(firetray.InstantMessaging);
|
||||||
|
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
},
|
},
|
||||||
|
@ -54,11 +54,12 @@ firetray.Messaging = {
|
|||||||
F.LOG("Disabling Messaging");
|
F.LOG("Disabling Messaging");
|
||||||
|
|
||||||
firetray.InstantMessaging.shutdown();
|
firetray.InstantMessaging.shutdown();
|
||||||
|
F.LOG("HI THERE");
|
||||||
|
|
||||||
MailServices.mailSession.RemoveFolderListener(this.mailSessionListener);
|
MailServices.mailSession.RemoveFolderListener(this.mailSessionListener);
|
||||||
firetray.Handler.setIconImageDefault();
|
firetray.Handler.setIconImageDefault();
|
||||||
|
|
||||||
Services.obs.removeAllObservers(firetray.Messaging);
|
firetray.Utils.removeAllObservers(firetray.Messaging);
|
||||||
|
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
},
|
},
|
||||||
|
@ -20,6 +20,8 @@ firetray.GtkIcons = {
|
|||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
try {
|
try {
|
||||||
|
if (this.initialized) return true;
|
||||||
|
|
||||||
this.loadDefaultTheme();
|
this.loadDefaultTheme();
|
||||||
this.initialized = true;
|
this.initialized = true;
|
||||||
return true;
|
return true;
|
||||||
|
@ -60,6 +60,7 @@ firetray.PopupMenu = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shutdown: function() {
|
shutdown: function() {
|
||||||
|
F.LOG("Disabling PopupMenu");
|
||||||
firetray.Utils.tryCloseLibs([gobject, gtk]);
|
firetray.Utils.tryCloseLibs([gobject, gtk]);
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
},
|
},
|
||||||
|
@ -39,14 +39,12 @@ firetray.StatusIcon = {
|
|||||||
this.FILENAME_BLANK = firetray.Utils.chromeToPath(
|
this.FILENAME_BLANK = firetray.Utils.chromeToPath(
|
||||||
"chrome://firetray/skin/blank-icon.png");
|
"chrome://firetray/skin/blank-icon.png");
|
||||||
|
|
||||||
this.defineIconNames();
|
|
||||||
|
|
||||||
Cu.import("resource://firetray/linux/FiretrayGtkIcons.jsm");
|
Cu.import("resource://firetray/linux/FiretrayGtkIcons.jsm");
|
||||||
firetray.GtkIcons.init();
|
firetray.GtkIcons.init();
|
||||||
|
this.defineIconNames();
|
||||||
this.loadThemedIcons();
|
this.loadThemedIcons();
|
||||||
this.trayIcon = gtk.gtk_status_icon_new();
|
|
||||||
|
|
||||||
|
this.trayIcon = gtk.gtk_status_icon_new();
|
||||||
firetray.Handler.setIconImageDefault();
|
firetray.Handler.setIconImageDefault();
|
||||||
firetray.Handler.setIconTooltipDefault();
|
firetray.Handler.setIconTooltipDefault();
|
||||||
|
|
||||||
@ -61,6 +59,7 @@ firetray.StatusIcon = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
shutdown: function() {
|
shutdown: function() {
|
||||||
|
F.LOG("Disabling StatusIcon");
|
||||||
firetray.PopupMenu.shutdown();
|
firetray.PopupMenu.shutdown();
|
||||||
firetray.GtkIcons.shutdown();
|
firetray.GtkIcons.shutdown();
|
||||||
firetray.Utils.tryCloseLibs([cairo, gobject, gdk, gio, gtk, pango, pangocairo]);
|
firetray.Utils.tryCloseLibs([cairo, gobject, gdk, gio, gtk, pango, pangocairo]);
|
||||||
|
Loading…
Reference in New Issue
Block a user