Bug 506019: Messages Do Not Display in Separate Window; r/sr=Neil
authorKarsten Düsterloh <mnyromyr@tprac.de>
Sun, 26 Jul 2009 21:02:28 +0200
changeset 3142 ea57778deaea4e74562e36f87ced0277d821ef56
parent 3141 a5ff852c4586f21b86e0b322d81bd61793107de8
child 3143 7931cb9853222ca6eeb159c52d174f9988ea9e68
push id2559
push usermnyromyr@tprac.de
push dateSun, 26 Jul 2009 19:03:21 +0000
treeherdercomm-central@ea57778deaea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs506019
Bug 506019: Messages Do Not Display in Separate Window; r/sr=Neil
suite/mailnews/mailWindow.js
suite/mailnews/msgMail3PaneWindow.js
--- a/suite/mailnews/mailWindow.js
+++ b/suite/mailnews/mailWindow.js
@@ -39,24 +39,21 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
  //This file stores variables common to mail windows
 var messengerContractID        = "@mozilla.org/messenger;1";
 var statusFeedbackContractID   = "@mozilla.org/messenger/statusfeedback;1";
 var mailSessionContractID      = "@mozilla.org/messenger/services/session;1";
 var secureUIContractID         = "@mozilla.org/secure_browser_ui;1";
-
-
 var prefContractID             = "@mozilla.org/preferences-service;1";
 var msgWindowContractID      = "@mozilla.org/messenger/msgwindow;1";
 
 var messenger;
 var pref;
-var prefServices;
 var statusFeedback;
 var msgWindow;
 
 var msgComposeService;
 var accountManager;
 var RDF;
 var msgComposeType;
 var msgComposeFormat;
@@ -129,18 +126,18 @@ function CreateMessenger()
   messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
 }
 
 function CreateMailWindowGlobals()
 {
   // get the messenger instance
   CreateMessenger();
 
-  prefServices = Components.classes[prefContractID].getService(Components.interfaces.nsIPrefService);
-  pref = prefServices.getBranch(null);
+  pref = Components.classes[prefContractID]
+                   .getService(Components.interfaces.nsIPrefBranch2);
 
   //Create windows status feedback
   // set the JS implementation of status feedback before creating the c++ one..
   window.MsgStatusFeedback = new nsMsgStatusFeedback();
   // double register the status feedback object as the xul browser window implementation
   window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
         .getInterface(Components.interfaces.nsIWebNavigation)
         .QueryInterface(Components.interfaces.nsIDocShellTreeItem).treeOwner
--- a/suite/mailnews/msgMail3PaneWindow.js
+++ b/suite/mailnews/msgMail3PaneWindow.js
@@ -681,17 +681,16 @@ const MailPaneConfigObserver = {
   }
 };
 
 /* Functions related to startup */
 function OnLoadMessenger()
 {
   AddMailOfflineObserver();
   CreateMailWindowGlobals();
-  pref.QueryInterface(Components.interfaces.nsIPrefBranch2);
   pref.addObserver("mail.pane_config.dynamic", MailPaneConfigObserver, false);
   UpdateMailPaneConfig();
   Create3PaneGlobals();
   verifyAccounts(null, false);
 
   InitMsgWindow();
   messenger.setWindow(window, msgWindow);