[Pkg-mozext-commits] [tabmixplus] 04/13: Can't change new tab button position when tabbar is below content

David Prévot taffit at moszumanska.debian.org
Wed Oct 29 01:34: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 161362bf8a29a707e9a853e15100d4424e826b46
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Oct 19 12:17:00 2014 +0300

    Can't change new tab button position when tabbar is below content
---
 chrome/content/tab/tab.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 18e682e..0afbac9 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -1375,8 +1375,17 @@ var gTMPprefObserver = {
                              (aPosition == 1 && buttonPosition < after) ||
                              (aPosition == 2 && buttonPosition != after + 1);
         if (changePosition) {
+          let tabsToolbar = $("TabsToolbar");
+          tabsToolbar.removeAttribute("tabbaronbottom");
           let newPosition = aPosition == 0 ? tabsPosition : after + 1;
-          CustomizableUI.moveWidgetWithinArea("new-tab-button", newPosition);
+          let doChange = function() {
+            CustomizableUI.moveWidgetWithinArea("new-tab-button", newPosition);
+            Tabmix.setItem(tabsToolbar, "tabbaronbottom", TabmixTabbar.position == 1 || null);
+          }
+          if (TabmixTabbar.position == 1)
+            setTimeout(function() doChange(), 15);
+          else
+            doChange();
         }
         return;
       }

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