Bug 955565 - Fix 'Details' links of the 'Update History' dialog, r=clokep.
authorFlorian Quèze <florian@instantbird.org>
Tue, 27 Aug 2013 10:28:00 +0200
changeset 19133 9fdc547dfb834a89b5d9b550b016f688217fc19c
parent 19132 836e65a24709790d2943b1c3d07bd789d9c8d007
child 19134 cef378d462bb9cb09aaf7181cae20b9c01efd079
push id1103
push usermbanner@mozilla.com
push dateTue, 18 Mar 2014 07:44:06 +0000
treeherdercomm-beta@50c6279a0af0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs955565
Bug 955565 - Fix 'Details' links of the 'Update History' dialog, r=clokep.
im/modules/ibCore.jsm
--- 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)