[Pkg-mozext-commits] [tabmixplus] 16/51: Move canScrollTabsLeft and canScrollTabsRight 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 56a079fe4dc45198f01bbedb139242e5da49e065
Author: onemen <tabmix.onemen at gmail.com>
Date: Fri Jan 2 22:51:55 2015 +0200
Move canScrollTabsLeft and canScrollTabsRight to Tabmix.tabsUtils
---
chrome/content/minit/minit.js | 4 ++--
chrome/content/tab/tab.js | 8 ++++++++
chrome/content/tab/tabbrowser_4.xml | 9 +--------
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/chrome/content/minit/minit.js b/chrome/content/minit/minit.js
index 8bc6a05..6a84d4e 100644
--- a/chrome/content/minit/minit.js
+++ b/chrome/content/minit/minit.js
@@ -263,12 +263,12 @@ var TMP_tabDNDObserver = {
switch (targetAnonid) {
case "scrollbutton-up":
case "scrollbutton-up-right":
- if (tabBar.canScrollTabsLeft)
+ if (Tabmix.tabsUtils.canScrollTabsLeft)
_scroll = -1;
break;
case "scrollbutton-down":
case "scrollbutton-down-right":
- if (tabBar.canScrollTabsRight)
+ if (Tabmix.tabsUtils.canScrollTabsRight)
_scroll = 1;
break;
}
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index 55b2688..ded79a3 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -822,6 +822,14 @@ Tabmix.tabsUtils = {
var tabBottom = top - marginTop + height;
return Math.round((tabBottom - aTop)/height);
+ },
+
+ get canScrollTabsLeft() {
+ return !this.tabBar.mTabstrip._scrollButtonUp.disabled;
+ },
+
+ get canScrollTabsRight() {
+ return !this.tabBar.mTabstrip._scrollButtonDown.disabled;
}
};
diff --git a/chrome/content/tab/tabbrowser_4.xml b/chrome/content/tab/tabbrowser_4.xml
index bbaa682..aa8d3a5 100644
--- a/chrome/content/tab/tabbrowser_4.xml
+++ b/chrome/content/tab/tabbrowser_4.xml
@@ -370,7 +370,7 @@
let maxRow = Tabmix.prefs.getIntPref("tabBarMaxRow");
// we need to check for the case that last row of tabs is empty and we still have hidden row on top
// this can occur when we close last tab in the last row or when some tab changed width
- if (rows > 1 && rows - maxRow < 0 && this.overflow && this.canScrollTabsLeft) {
+ if (rows > 1 && rows - maxRow < 0 && this.overflow && Tabmix.tabsUtils.canScrollTabsLeft) {
// try to scroll all the way up
this.mTabstrip.scrollByPixels((rows - maxRow) * this.mTabstrip.singleRowHeight);
// get lastTabRowNumber after the scroll
@@ -455,13 +455,6 @@
]]></setter>
</property>
- <property name="canScrollTabsLeft" readonly="true"
- onget="return !this.mTabstrip._scrollButtonUp.disabled;"/>
-
- <property name="canScrollTabsRight" readonly="true"
- onget="return !this.mTabstrip._scrollButtonDown.disabled;"/>
-
-
<method name="_notifyBackgroundTab">
<parameter name="aTab"/>
<body><![CDATA[
--
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