[Pkg-mozext-commits] [firetray] 25/33: Fix setting custom icons in gtk.
David Prévot
taffit at moszumanska.debian.org
Fri Oct 23 21:35:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firetray.
commit 2237e5646d2aef3784fc7e5981d6884141fe77fd
Author: foudfou <foudil.newbie+git at gmail.com>
Date: Thu Sep 10 21:11:37 2015 +0200
Fix setting custom icons in gtk.
---
src/modules/FiretrayHandler.jsm | 6 +++---
src/modules/linux/FiretrayGtkStatusIcon.jsm | 23 +++++++++++++----------
src/modules/linux/FiretrayStatusIcon.jsm | 4 ++--
3 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/src/modules/FiretrayHandler.jsm b/src/modules/FiretrayHandler.jsm
index f893f80..f25dede 100644
--- a/src/modules/FiretrayHandler.jsm
+++ b/src/modules/FiretrayHandler.jsm
@@ -590,7 +590,7 @@ firetray.PrefListener = new PrefListener(
firetray.Messaging.updateIcon();
break;
case 'new_mail_icon_names':
- this.loadIcons();
+ firetray.Handler.loadIcons();
case 'excluded_folders_flags':
case 'folder_count_recursive':
case 'mail_accounts':
@@ -608,10 +608,10 @@ firetray.PrefListener = new PrefListener(
case 'app_mail_icon_names':
case 'app_browser_icon_names':
case 'app_default_icon_names':
- this.loadIcons(); // linux
+ firetray.Handler.loadIcons(); // linux
case 'app_icon_custom':
case 'mail_icon_custom':
- firetray.StatusIcon.loadImageCustom(name);
+ firetray.Handler.setIconImageCustom(name);
case 'app_icon_type':
firetray.Handler.setIconImageDefault();
if (firetray.Handler.inMailApp)
diff --git a/src/modules/linux/FiretrayGtkStatusIcon.jsm b/src/modules/linux/FiretrayGtkStatusIcon.jsm
index c0f7d0e..806e542 100644
--- a/src/modules/linux/FiretrayGtkStatusIcon.jsm
+++ b/src/modules/linux/FiretrayGtkStatusIcon.jsm
@@ -168,16 +168,22 @@ firetray.GtkStatusIcon = {
gtk.gtk_status_icon_set_from_gicon(firetray.GtkStatusIcon.trayIcon, gicon);
},
+ setIconImageCustom: function(prefname) {
+ let prefCustomIconPath = firetray.Utils.prefService.getCharPref(prefname);
+ firetray.GtkStatusIcon.setIconImageFromFile(prefCustomIconPath);
+ },
+
}; // GtkStatusIcon
-firetray.StatusIcon.initImpl =
- firetray.GtkStatusIcon.init.bind(firetray.GtkStatusIcon);
+firetray.StatusIcon.initImpl = firetray.GtkStatusIcon.init
+ .bind(firetray.GtkStatusIcon);
-firetray.StatusIcon.shutdownImpl =
- firetray.GtkStatusIcon.shutdown.bind(firetray.GtkStatusIcon);
+firetray.StatusIcon.shutdownImpl = firetray.GtkStatusIcon.shutdown
+ .bind(firetray.GtkStatusIcon);
-firetray.Handler.loadIcons = firetray.GtkStatusIcon.loadThemedIcons;
+firetray.Handler.loadIcons = firetray.GtkStatusIcon.loadThemedIcons
+ .bind(firetray.GtkStatusIcon);
firetray.Handler.setIconImageDefault = function() {
log.debug("setIconImageDefault");
@@ -188,7 +194,7 @@ firetray.Handler.setIconImageDefault = function() {
firetray.GtkStatusIcon.setIconImageFromGIcon(
firetray.GtkStatusIcon.themedIconApp);
} else if (appIconType === FIRETRAY_APPLICATION_ICON_TYPE_CUSTOM) {
- firetray.Handler.setIconImageCustom("app_icon_custom");
+ firetray.GtkStatusIcon.setIconImageCustom("app_icon_custom");
}
};
@@ -197,10 +203,7 @@ firetray.Handler.setIconImageNewMail = function() {
firetray.GtkStatusIcon.themedIconNewMail);
};
-firetray.Handler.setIconImageCustom = function(prefname) {
- let prefCustomIconPath = firetray.Utils.prefService.getCharPref(prefname);
- firetray.GtkStatusIcon.setIconImageFromFile(prefCustomIconPath);
-};
+firetray.Handler.setIconImageCustom = firetray.GtkStatusIcon.setIconImageCustom;
// GTK bug: Gdk-CRITICAL **: IA__gdk_window_get_root_coords: assertion `GDK_IS_WINDOW (window)' failed
firetray.Handler.setIconTooltip = function(toolTipStr) {
diff --git a/src/modules/linux/FiretrayStatusIcon.jsm b/src/modules/linux/FiretrayStatusIcon.jsm
index 2ab094f..a0cb151 100644
--- a/src/modules/linux/FiretrayStatusIcon.jsm
+++ b/src/modules/linux/FiretrayStatusIcon.jsm
@@ -91,8 +91,6 @@ firetray.StatusIcon = {
return newMailIconNames;
},
- loadImageCustom: function() { }, // done in setIconImageCustom
-
appindEnable: function() {
Cu.import("resource://firetray/ctypes/linux/"+
firetray.Handler.app.widgetTk+"/appindicator.jsm");
@@ -234,4 +232,6 @@ firetray.Handler.setIconTooltipDefault = function() {
this.setIconTooltip(this.app.name);
};
+firetray.Handler.setIconImageCustom = function(prefname) { };
+
firetray.Handler.setIconTooltip = function(toolTipStr) { };
--
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