Bug 1148462 - When "Reading List" is disabled (browser.readinglist.enabled = false) CTRL+ALT+R should not open its sidebar. r=gijs, a=gavin
authorJared Wein <jwein@mozilla.com>
Fri, 03 Apr 2015 15:42:41 -0400
changeset 258284 6238a894c78f
parent 258283 d69e01ecebe0
child 258285 f7d65dc9093b
push id4634
push userryanvm@gmail.com
push date2015-04-06 16:06 +0000
treeherdermozilla-beta@6238a894c78f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs, gavin
bugs1148462
milestone38.0
Bug 1148462 - When "Reading List" is disabled (browser.readinglist.enabled = false) CTRL+ALT+R should not open its sidebar. r=gijs, a=gavin
browser/base/content/browser-readinglist.js
browser/base/content/browser-sets.inc
--- a/browser/base/content/browser-readinglist.js
+++ b/browser/base/content/browser-readinglist.js
@@ -99,16 +99,17 @@ let ReadingListUI = {
         ReadingList.removeListener(this);
         this.listenerRegistered = false;
       }
 
       this.hideSidebar();
     }
 
     document.getElementById(READINGLIST_COMMAND_ID).setAttribute("hidden", !enabled);
+    document.getElementById(READINGLIST_COMMAND_ID).setAttribute("disabled", !enabled);
   },
 
   /**
    * Show the ReadingList sidebar.
    * @return {Promise}
    */
   showSidebar() {
     if (this.enabled) {
--- a/browser/base/content/browser-sets.inc
+++ b/browser/base/content/browser-sets.inc
@@ -144,17 +144,17 @@
     <!-- for both places and non-places, the sidebar lives at
          chrome://browser/content/history/history-panel.xul so there are no
          problems when switching between versions -->
     <broadcaster id="viewHistorySidebar" autoCheck="false" sidebartitle="&historyButton.label;"
                  type="checkbox" group="sidebar"
                  sidebarurl="chrome://browser/content/history/history-panel.xul"
                  oncommand="SidebarUI.toggle('viewHistorySidebar');"/>
 
-    <broadcaster id="readingListSidebar" hidden="true" autoCheck="false"
+    <broadcaster id="readingListSidebar" hidden="true" autoCheck="false" disabled="true"
                  sidebartitle="&readingList.label;" type="checkbox" group="sidebar"
                  sidebarurl="chrome://browser/content/readinglist/sidebar.xhtml"
                  oncommand="SidebarUI.toggle('readingListSidebar');"/>
 
     <broadcaster id="viewWebPanelsSidebar" autoCheck="false"
                  type="checkbox" group="sidebar" sidebarurl="chrome://browser/content/web-panels.xul"
                  oncommand="SidebarUI.toggle('viewWebPanelsSidebar');"/>