fix getWindowInterface() for nsIXULWindow + revert to v0.4.0b3

This commit is contained in:
foudfou 2012-02-17 23:29:09 +01:00
parent ca9496d3e3
commit c5a66ae05d
3 changed files with 14 additions and 5 deletions

View File

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

View File

@ -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;
},

View File

@ -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);
},