[Pkg-mozext-commits] [tabmixplus] 19/51: Move showNewTabButtonOnSide to Tabmix.tabsUtils

David Prévot taffit at moszumanska.debian.org
Mon Feb 2 18:36:48 UTC 2015


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 7b6afe4a66b8f0e092cfd2764470201befe623ad
Author: onemen <tabmix.onemen at gmail.com>
Date:   Fri Jan 2 23:57:16 2015 +0200

    Move showNewTabButtonOnSide to Tabmix.tabsUtils
---
 chrome/content/tab/tab.js | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 4a46c8f..df5d3b1 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -175,13 +175,6 @@ var TabmixTabbar = {
     gTMPprefObserver.setShowNewTabButtonAttr(showNewTabButton, position);
   },
 
-  showNewTabButtonOnSide: function(aCondition, aValue) {
-    if (Tabmix._show_newtabbutton) {
-      Tabmix.setItem("TabsToolbar", "tabmix-show-newtabbutton",
-        aCondition ? aValue : Tabmix._show_newtabbutton);
-    }
-  },
-
   updateScrollStatus: function TMP_updateScrollStatus() {
     var tabBar = gBrowser.tabContainer;
     if (this.isMultiRow) {
@@ -609,7 +602,7 @@ Tabmix.tabsUtils = {
     Tabmix.afterTabsButtonsWidth = [Tabmix.isVersion(280) ? 51.6 : 28];
     Tabmix.tabsNewtabButton =
       document.getAnonymousElementByAttribute(this.tabBar, "command", "cmd_newNavigatorTab");
-    Tabmix._show_newtabbutton = "aftertabs";
+    this._show_newtabbutton = "aftertabs";
 
     let attr = ["notpinned", "autoreload", "protected",
                 "locked"].filter(function(att) {
@@ -783,7 +776,7 @@ Tabmix.tabsUtils = {
       return;
 
     if (!this.checkNewtabButtonVisibility) {
-      TabmixTabbar.showNewTabButtonOnSide(this.overflow, "right-side");
+      this.showNewTabButtonOnSide(this.overflow, "right-side");
       return;
     }
 
@@ -866,7 +859,7 @@ Tabmix.tabsUtils = {
 
   set disAllowNewtabbutton(val) {
     let newVal = this.overflow || val;
-    TabmixTabbar.showNewTabButtonOnSide(newVal, "temporary-right-side");
+    this.showNewTabButtonOnSide(newVal, "temporary-right-side");
     return newVal;
   },
 
@@ -885,12 +878,19 @@ Tabmix.tabsUtils = {
         this.tabBar.setAttribute("overflow", "true");
       else
         this.tabBar.removeAttribute("overflow");
-      TabmixTabbar.showNewTabButtonOnSide(val, "right-side");
+      this.showNewTabButtonOnSide(val, "right-side");
       this.tabBar.mTabstrip.updateOverflow(val);
     }
     return val;
   },
 
+  showNewTabButtonOnSide: function(aCondition, aValue) {
+    if (this._show_newtabbutton) {
+      Tabmix.setItem("TabsToolbar", "tabmix-show-newtabbutton",
+                     aCondition ? aValue : this._show_newtabbutton);
+    }
+  },
+
   get topTabY() {
     return this.tabstripInnerbox.getBoundingClientRect().top +
       Tabmix.getStyle(this.tabstripInnerbox, "paddingTop");
@@ -1893,7 +1893,7 @@ var gTMPprefObserver = {
     else
       attrValue = "aftertabs";
     // we use this value in disAllowNewtabbutton and overflow setters
-    Tabmix._show_newtabbutton = attrValue;
+    Tabmix.tabsUtils._show_newtabbutton = attrValue;
     if (aShow) {
       if (Tabmix.tabsUtils.overflow)
         attrValue = "right-side";

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