[Pkg-mozext-commits] [tabmixplus] 21/51: Move TMP_inSingleRow from gBrowser.tabContainer to Tabmix.tabsUtils
David Prévot
taffit at moszumanska.debian.org
Mon Feb 2 18:36:49 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 0c8fb8f0a339b36dd726d6251ba22891e0dd5148
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Jan 3 11:24:41 2015 +0200
Move TMP_inSingleRow from gBrowser.tabContainer to Tabmix.tabsUtils
---
chrome/content/minit/tablib.js | 13 ++-----------
chrome/content/tab/tab.js | 9 +++++++++
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/chrome/content/minit/tablib.js b/chrome/content/minit/tablib.js
index d98bcc1..c973089 100644
--- a/chrome/content/minit/tablib.js
+++ b/chrome/content/minit/tablib.js
@@ -366,15 +366,6 @@ var tablib = {
).toCode();
}
- tabBar.TMP_inSingleRow = function Tabmix_inSingleRow(visibleTabs) {
- if (!this.hasAttribute("multibar"))
- return true;
- // we get here when we are about to go to single row
- // one tab before the last is in the first row and we are closing one tab
- var tabs = visibleTabs || this.tabbrowser.visibleTabs;
- return Tabmix.tabsUtils.getTabRowNumber(tabs[tabs.length-2], Tabmix.tabsUtils.topTabY) == 1;
- };
-
Tabmix.changeCode(tabBar, "gBrowser.tabContainer._lockTabSizing")._replace(
'{',
'{if (this.orient != "horizontal" || !Tabmix.prefs.getBoolPref("lockTabSizingOnClose")) return;'
@@ -398,7 +389,7 @@ var tablib = {
' }' +
' return;' +
' }' +
- ' if (!this.TMP_inSingleRow(tabs))' +
+ ' if (!Tabmix.tabsUtils.isSingleRow(tabs))' +
' return;' +
' this._tabDefaultMaxWidth = this.mTabMaxWidth;' +
' $&'
@@ -408,7 +399,7 @@ var tablib = {
if (typeof tabBar._expandSpacerBy == "function")
Tabmix.changeCode(tabBar, "gBrowser.tabContainer._expandSpacerBy")._replace(
'{',
- '{if (TabmixTabbar.widthFitTitle || !this.TMP_inSingleRow()) return;'
+ '{if (TabmixTabbar.widthFitTitle || !Tabmix.tabsUtils.isSingleRow()) return;'
).toCode();
Tabmix.changeCode(tabBar, "gBrowser.tabContainer._unlockTabSizing")._replace(
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index ec3d5f4..dfdedbd 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -923,6 +923,15 @@ Tabmix.tabsUtils = {
get canScrollTabsRight() {
return !this.tabBar.mTabstrip._scrollButtonDown.disabled;
+ },
+
+ isSingleRow: function(visibleTabs) {
+ if (!this.tabBar.hasAttribute("multibar"))
+ return true;
+ // we get here when we are about to go to single row
+ // one tab before the last is in the first row and we are closing one tab
+ let tabs = visibleTabs || gBrowser.visibleTabs;
+ return this.getTabRowNumber(tabs[tabs.length - 2], this.topTabY) == 1;
}
};
--
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