[Pkg-mozext-commits] [tabmixplus] 90/123: Remove disabled state from our buttons when entring customizing tab, and sync broadcasters again when exiting customizing tab

David Prévot taffit at moszumanska.debian.org
Wed Sep 17 21:16:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit aa396308f6c8a49783edea4520d6a4b9c1feb525
Author: onemen <tabmix.onemen at gmail.com>
Date:   Tue Sep 9 22:03:16 2014 +0300

    Remove disabled state from our buttons when entring customizing tab, and sync broadcasters again when exiting customizing tab
---
 chrome/content/minit/minit.js | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 3927b66..13894c6 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -971,6 +971,13 @@ Tabmix.navToolbox = {
     gNavToolbox.addEventListener("customizationchange", this, false);
     this.toolboxChanged = false;
     this.customizeStarted = true;
+
+    // remove disabled state from our buttons when entring about:customizing tab
+    if (Tabmix.isVersion(280)) {
+      Tabmix.setItem("tmp_undocloseButton", "disabled", null);
+      Tabmix.setItem("tmp_closedwindows", "disabled", null);
+      Tabmix.setItem("tmp_sessionmanagerButton", "disabled", null);
+    }
   },
 
   customizeDone: function TMP_navToolbox_customizeDone(aToolboxChanged) {
@@ -997,6 +1004,17 @@ Tabmix.navToolbox = {
     var optionWindow = Services.wm.getMostRecentWindow("mozilla:tabmixopt");
     if (optionWindow && optionWindow.gAppearancePane)
       optionWindow.gAppearancePane.toolbarButtons(window);
+
+    if (Tabmix.isVersion(280)) {
+      TMP_ClosedTabs.setButtonDisableState();
+      let SM = TabmixSessionManager;
+      let disabled = SM.enableManager || SM.enableBackup ?
+          SM.isClosedWindowsEmpty() : TabmixSvc.ss.getClosedWindowCount() == 0;
+      Tabmix.setItem("tmp_closedwindows", "disabled", disabled || null);
+      disabled = !Tabmix.prefs.getBoolPref("sessions.manager") ||
+                 SM.globalPrivateBrowsing;
+      Tabmix.setItem("tmp_sessionmanagerButton", "disabled", disabled || null);
+    }
   },
 
   updateToolboxItems: function TMP_navToolbox_updateToolboxItems() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list