[Pkg-mozext-commits] [firetray] 179/399: fix getWindowInterface() for nsIXULWindow + revert to v0.4.0b3

David Prévot taffit at alioth.debian.org
Tue Oct 29 18:23:38 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 c5a66ae05d2c9402c7df2eca26baf5cd986260af
Author: foudfou <foudil.newbie+git at gmail.com>
Date:   Fri Feb 17 23:29:09 2012 +0100

    fix getWindowInterface() for nsIXULWindow + revert to v0.4.0b3
---
 src/install.rdf                   |    2 +-
 src/modules/FiretrayHandler.jsm   |   13 +++++++++++--
 src/modules/FiretrayMessaging.jsm |    4 ++--
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/install.rdf b/src/install.rdf
index 769f163..d6a3440 100644
--- a/src/install.rdf
+++ b/src/install.rdf
@@ -5,7 +5,7 @@
     <em:unpack>true</em:unpack> <!-- needed for embedded icons -->
     <em:type>2</em:type>
     <em:name>FireTray</em:name>
-    <em:version>0.4.0b4</em:version>
+    <em:version>0.4.0b3</em:version>
     <em:creator>Hua Luo, Francesco Solero, Foudil BRÉTEL</em:creator>
     <em:contributor>Hua Luo, Francesco Solero (Firetray original authors)</em:contributor>
     <em:homepageURL>https://github.com/foudfou/firetray</em:homepageURL>
diff --git a/src/modules/FiretrayHandler.jsm b/src/modules/FiretrayHandler.jsm
index 8a29618..46607e0 100644
--- a/src/modules/FiretrayHandler.jsm
+++ b/src/modules/FiretrayHandler.jsm
@@ -206,17 +206,26 @@ firetray.Handler = {
   getWindowInterface: function(win, iface) {
     let winInterface, winOut;
     try {                       // thx Neil Deakin !!
-      winOut =  win.QueryInterface(Ci.nsIInterfaceRequestor)
+      winInterface =  win.QueryInterface(Ci.nsIInterfaceRequestor)
         .getInterface(Ci.nsIWebNavigation)
         .QueryInterface(Ci.nsIDocShellTreeItem)
         .treeOwner
-        .QueryInterface(Ci.nsIInterfaceRequestor)[iface];
+        .QueryInterface(Ci.nsIInterfaceRequestor);
     } catch (ex) {
       // ignore no-interface exception
       ERROR(ex);
       return null;
     }
 
+    if (iface == "nsIBaseWindow")
+      winOut = winInterface[iface];
+    else if (iface == "nsIXULWindow")
+      winOut = winInterface.getInterface(Ci.nsIXULWindow);
+    else {
+      ERROR("unknown iface '" + iface + "'");
+      return null;
+    }
+
     return winOut;
   },
 
diff --git a/src/modules/FiretrayMessaging.jsm b/src/modules/FiretrayMessaging.jsm
index 0fcac42..b1eccb7 100644
--- a/src/modules/FiretrayMessaging.jsm
+++ b/src/modules/FiretrayMessaging.jsm
@@ -64,12 +64,12 @@ firetray.Messaging = {
       LOG("OnItemPropertyChanged "+property+" for folder "+item.prettyName+" was "+oldValue+" became "+newValue+" NEW MESSAGES="+item.getNumNewMessages(true));
     },
 
-    OnItemIntPropertyChanged: function(item, property, oldValue, newValue) { // TotalUnreadMessages, BiffState
+    OnItemIntPropertyChanged: function(item, property, oldValue, newValue) { // TotalUnreadMessages, BiffState (per server)
       LOG("OnItemIntPropertyChanged "+property+" for folder "+item.prettyName+" was "+oldValue+" became "+newValue+" NEW MESSAGES="+item.getNumNewMessages(true));
       this.updateMsgCount(item, property, oldValue, newValue);
     },
 
-    OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) { // NewMessages
+    OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) { // NewMessages (per folder)
       LOG("OnItemBoolPropertyChanged "+property+" for folder "+item.prettyName+" was "+oldValue+" became "+newValue+" NEW MESSAGES="+item.getNumNewMessages(true));
       this.updateMsgCount(item, property, oldValue, newValue);
     },

-- 
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