Bug 1427317 - Follow-up: Rename currentEngine to defaultEngine (see bug 1510936). r+a=me DONTBUILD
authorJorg K <jorgk@jorgk.com>
Mon, 31 Dec 2018 20:39:39 +0100
changeset 33912 636f744e5be4cc85e4c8438b8b87dbe5c3e8beee
parent 33911 0fc0c5dd8de5573e8951af5e00fa6ed821f66670
child 33913 bdf1f37adbac616743c572d17418b394c77dcf82
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
bugs1427317, 1510936
Bug 1427317 - Follow-up: Rename currentEngine to defaultEngine (see bug 1510936). r+a=me DONTBUILD
mail/components/preferences/general.js
--- a/mail/components/preferences/general.js
+++ b/mail/components/preferences/general.js
@@ -200,17 +200,17 @@ var gGeneralPane = {
   },
 
   // Caches the default engines so we only retrieve them once.
   defaultEngines: null,
 
   updateRemoveButton() {
     let engineList = document.getElementById("defaultWebSearch");
     let removeButton = document.getElementById("removeSearchEngine");
-    if (this.defaultEngines.includes(Services.search.currentEngine)) {
+    if (this.defaultEngines.includes(Services.search.defaultEngine)) {
       // Don't allow deletion of a default engine (saves us having a 'restore' button).
       removeButton.disabled = true;
     } else {
       // Don't allow removal of last engine. This shouldn't happen since there should
       // always be default engines.
       removeButton.disabled = engineList.itemCount <= 1;
     }
   },
@@ -251,17 +251,17 @@ var gGeneralPane = {
   },
 
   removeSearchEngine() {
     // Deletes the current engine. Firefox does a better job since it
     // shows all the engines in the list. But better than nothing.
     let engineList = document.getElementById("defaultWebSearch");
     for (let i = 0; i < engineList.itemCount; i++) {
       let item = engineList.getItemAtIndex(i);
-      if (item.engine == Services.search.currentEngine) {
+      if (item.engine == Services.search.defaultEngine) {
         item.remove();
         engineList.selectedIndex = 0;
         Services.search.removeEngine(item.engine);
         this.updateRemoveButton();
         break;
       }
     }
   },