Bug 1378136 - Redirect user to the general pane for search settings on old preferences page. r=jaws
authorTimothy Guan-tin Chien <timdream@gmail.com>
Mon, 10 Jul 2017 17:01:41 +0800
changeset 607427 312f5e3f6a7cc6875df354386271af42397dece5
parent 607426 7030f3156472125837acb67927bafc4548adcc86
child 607428 ca2dd09a450957d068f96170ad87a6a0a172afcb
push id67985
push userbmo:emilio+bugs@crisal.io
push dateWed, 12 Jul 2017 08:36:44 +0000
reviewersjaws
bugs1378136
milestone56.0a1
Bug 1378136 - Redirect user to the general pane for search settings on old preferences page. r=jaws MozReview-Commit-ID: Akb4yDPhWTF
browser/modules/ContentSearch.jsm
--- a/browser/modules/ContentSearch.jsm
+++ b/browser/modules/ContentSearch.jsm
@@ -407,17 +407,22 @@ this.ContentSearch = {
   },
 
   _onMessageSetCurrentEngine(msg, data) {
     Services.search.currentEngine = Services.search.getEngineByName(data);
   },
 
   _onMessageManageEngines(msg, data) {
     let browserWin = msg.target.ownerGlobal;
-    browserWin.openPreferences("paneGeneral", {origin: "contentSearch"});
+    let pref = Services.prefs.getBoolPref("browser.preferences.useOldOrganization");
+    if (pref) {
+      browserWin.openPreferences("paneSearch", {origin: "contentSearch"});
+    } else {
+      browserWin.openPreferences("general-search", {origin: "contentSearch"});
+    }
   },
 
   async _onMessageGetSuggestions(msg, data) {
     this._ensureDataHasProperties(data, [
       "engineName",
       "searchString",
     ]);
     let {engineName, searchString} = data;