Bug 955565 - Fix 'Details' links of the 'Update History' dialog, r=clokep.
--- a/im/modules/ibCore.jsm
+++ b/im/modules/ibCore.jsm
@@ -10,16 +10,17 @@ Cu.import("resource:///modules/imWindows
Cu.import("resource:///modules/ibNotifications.jsm");
Cu.import("resource:///modules/ibSounds.jsm");
Cu.import("resource:///modules/imXPCOMUtils.jsm");
var Core = {
_events: [
"account-disconnected",
"browser-request",
+ "handle-xul-text-link",
"quit-application-requested"
],
get bundle() l10nHelper("chrome://instantbird/locale/core.properties"),
initLibpurpleOverrides: function() {
let forcePurple = Services.prefs.getCharPref("chat.prpls.forcePurple")
.split(",")
@@ -224,33 +225,41 @@ var Core = {
/* We only display the account manager on startup if an account has crashed
or if all accounts are disconnected
In case of connection failure after an automatic reconnection attempt,
we don't want to popup the account manager */
if ((!hasActiveAccount && !isOffline) || (aIsStarting && hasCrashedAccount))
this.showAccounts();
},
- observe: function(aSubject, aTopic, aMsg) {
+ observe: function(aSubject, aTopic, aData) {
if (aTopic == "account-disconnected") {
let account = aSubject.QueryInterface(Ci.imIAccount);
if (!account.reconnectAttempt)
this._showAccountManagerIfNeeded(false);
return;
}
if (aTopic == "browser-request") {
Services.ww.openWindow(null,
"chrome://chat/content/browserRequest.xul",
null, "chrome", aSubject);
return;
}
+ if (aTopic == "handle-xul-text-link") {
+ Cc["@mozilla.org/uriloader/external-protocol-service;1"]
+ .getService(Ci.nsIExternalProtocolService)
+ .loadURI(Services.io.newURI(aData, null, null));
+ aSubject.QueryInterface(Ci.nsISupportsPRBool).data = true;
+ return;
+ }
+
if (aTopic == "quit-application-requested") {
- this._onQuitRequest(aSubject, aMsg);
+ this._onQuitRequest(aSubject, aData);
return;
}
},
_onQuitRequest: function (aCancelQuit, aQuitType) {
// The request has already been canceled somewhere else
if ((aCancelQuit instanceof Components.interfaces.nsISupportsPRBool)
&& aCancelQuit.data)