[Pkg-mozext-commits] [tabmixplus] 89/123: Remove initial disabled attribute from broadcasters, it prevent the broadcaster from working properly when the buttons moved from palette to toolbar or when the buttons are the menu panel

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 6358df9672db831bde0733be5cad6c66818fa246
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Sep 8 11:38:06 2014 +0300

    Remove initial disabled attribute from broadcasters, it prevent the broadcaster from working properly when the buttons moved from palette to toolbar or when the buttons are the menu panel
---
 chrome/content/minit/minit.js |  4 ----
 chrome/content/tabmix.js      | 32 ++++----------------------------
 chrome/content/tabmix.xul     |  4 ++--
 3 files changed, 6 insertions(+), 34 deletions(-)

diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index e11435c..3927b66 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -1168,10 +1168,6 @@ Tabmix.navToolbox = {
   },
 
   toolbarButtons: function TMP_navToolbox_toolbarButtons() {
-    let SM = TabmixSessionManager;
-    if (SM.enableManager != null)
-      SM.toggleRecentlyClosedWindowsButton();
-
     gTMPprefObserver.showReloadEveryOnReloadButton();
 
     gTMPprefObserver.changeNewTabButtonSide(Tabmix.prefs.getIntPref("newTabButton.position"));
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 2118f05..8f473ed 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -238,8 +238,6 @@ Tabmix.delayedStartup = function TMP_delayedStartup() {
   // in gBrowser.tabContainer._positionPinnedTabs
   TMP_tabDNDObserver.paddingLeft = this.getStyle(gBrowser.tabContainer, "paddingLeft");
 
-  Tabmix.australisUI.init();
-
   // show global notification when debug mode is on
   let gnb = Tabmix._debugMode &&
             (document.getElementById("high-priority-global-notificationbox") ||
@@ -342,6 +340,10 @@ var TMP_eventListener = {
     Tabmix.isFirstWindow = Tabmix.numberOfWindows() == 1;
     TMP_SessionStore.setAfterSessionRestored();
 
+    // turn both broadcasters off, we will set the proper value later
+    Tabmix.setItem("tmp_undocloseButton", "disabled", true);
+    Tabmix.setItem("tmp_closedwindows", "disabled", true);
+
     try {
       /**
       *  aObject, aName , aModule - file name , aSymbol - symbol in EXPORTED_SYMBOLS, aFlag, aArg
@@ -1051,7 +1053,6 @@ var TMP_eventListener = {
       Tabmix.flst.cancel();
 
     Tabmix.navToolbox.deinit();
-    Tabmix.australisUI.deinit();
     if (Tabmix.DocShellCapabilitiesInitialized)
       Tabmix.docShellCapabilities.deinit(window);
   },
@@ -1129,31 +1130,6 @@ var TMP_eventListener = {
 
 }
 
-Tabmix.australisUI = {
-  init: function() {
-    if (!TabmixSvc.australis)
-      return;
-    PanelUI.panel.addEventListener("popupshowing", this.updateButtonsState);
-  },
-
-  deinit: function() {
-    if (!TabmixSvc.australis)
-      return;
-    PanelUI.panel.removeEventListener("popupshowing", this.updateButtonsState);
-  },
-
-  updateButtonsState: function() {
-    let $ = function(id) document.getElementById(id);
-    let cwb = $("btn_closedwindows");
-    if (cwb && cwb.parentNode == PanelUI.contents)
-      cwb.disabled = $("tmp_closedwindows").getAttribute("disabled");
-
-    let cwb = $("btn_undoclose");
-    if (cwb && cwb.parentNode == PanelUI.contents)
-      cwb.disabled = $("tmp_undocloseButton").getAttribute("disabled");
-  }
-}
-
 /**
  * other extensions can cause delay to some of the events Tabmix uses for
  * initialization, for each phase call all previous phases that are not
diff --git a/chrome/content/tabmix.xul b/chrome/content/tabmix.xul
index 8157513..88b8bef 100644
--- a/chrome/content/tabmix.xul
+++ b/chrome/content/tabmix.xul
@@ -388,8 +388,8 @@
     <broadcaster id="tmp_menu_AllWindows" hidden="true"/>
     <broadcaster id="tmp_contextmenu_ThisWindow" hidden="true"/>
     <broadcaster id="tmp_contextmenu_AllWindows" hidden="true"/>
-    <broadcaster id="tmp_closedwindows" disabled="true"/>
-    <broadcaster id="tmp_undocloseButton" disabled="true"/>
+    <broadcaster id="tmp_closedwindows"/>
+    <broadcaster id="tmp_undocloseButton"/>
     <broadcaster id="tmp_sessionmanagerButton"/>
     <broadcaster id="tmp_disableSave"/>
   </broadcasterset>

-- 
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