[Pkg-mozext-commits] [tabmixplus] 20/51: Move private properties 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 fb3ff614816d32d18781595a996c6cff9762c23a
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Jan 3 19:46:05 2015 +0200
Move private properties from gBrowser.tabContainer to Tabmix.tabsUtils
---
chrome/content/links/setup.js | 4 ++--
chrome/content/tab/scrollbox.xml | 2 +-
chrome/content/tab/tab.js | 18 ++++++++++--------
chrome/content/tab/tabbrowser_4.xml | 2 +-
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index a6f5540..c8ae1c1 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -339,7 +339,7 @@ Tabmix.adjustTabstrip = function tabContainer_adjustTabstrip(skipUpdateScrollSta
var tabbrowser = this.tabbrowser;
var tabs = tabbrowser.visibleTabs;
var tabsCount = tabs.length - tabbrowser._removingTabs.length;
- switch (this.closeButtonsEnabled ? this.mCloseButtons : 0) {
+ switch (Tabmix.tabsUtils.closeButtonsEnabled ? this.mCloseButtons : 0) {
case 0:
this.removeAttribute("closebuttons-hover");
this.setAttribute("closebuttons", "noclose");
@@ -385,7 +385,7 @@ Tabmix.adjustTabstrip = function tabContainer_adjustTabstrip(skipUpdateScrollSta
let currentURI = tabbrowser.currentURI;
aUrl = currentURI ? currentURI.spec : null;
}
- if (this._keepLastTab ||
+ if (Tabmix.tabsUtils._keepLastTab ||
isBlankPageURL(tab.__newLastTab || null) ||
(!aUrl || isBlankPageURL(aUrl)) &&
tabbrowser.isBlankNotBusyTab(tab)) {
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 502c81e..f15b340 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -187,7 +187,7 @@
this.tabmix_inited = true;
this.offsetAmountToScroll = Tabmix.prefs.getBoolPref("offsetAmountToScroll");
- this.offsetRatio = document.getBindingParent(this).closeButtonsEnabled ? 0.70 : 0.50;
+ this.offsetRatio = Tabmix.tabsUtils.closeButtonsEnabled ? 0.70 : 0.50;
this.minOffset = TabmixSvc.australis ? 25 : 50;
Tabmix.changeCode(this, "scrollbox.ensureElementIsVisible")._replace(
'var amountToScroll',
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index df5d3b1..ec3d5f4 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -391,12 +391,12 @@ var TabmixTabbar = {
};
let removed = "tabmix-removed-" + attrib;
- let oldTab = tabBar._tabmixPositionalTabs[type];
+ let oldTab = Tabmix.tabsUtils._tabmixPositionalTabs[type];
if (oldTab && tab != oldTab) {
oldTab.removeAttribute("tabmix-" + attrib + "-visible");
oldTab.removeAttribute(removed);
}
- tabBar._tabmixPositionalTabs[type] = tab;
+ Tabmix.tabsUtils._tabmixPositionalTabs[type] = tab;
let specialTab = isSpecialTab();
if (tab && (TabmixSvc.australis && attrib == "beforeselected" ||
multibar || tab.hasAttribute(removed) || specialTab)) {
@@ -549,6 +549,7 @@ var TabmixTabbar = {
Tabmix.tabsUtils = {
initialized: false,
+ _tabmixPositionalTabs: {},
get tabBar() {
delete this.tabBar;
@@ -591,10 +592,11 @@ Tabmix.tabsUtils = {
let onLeft = Tabmix.defaultCloseButtons && Tabmix.prefs.getBoolPref("tabs.closeButtons.onLeft");
this.tabBar.setAttribute("closebuttons-side", onLeft ? "left" : "right");
- this.tabBar._keepLastTab = Tabmix.prefs.getBoolPref("keepLastTab");
- this.tabBar.closeButtonsEnabled = Tabmix.prefs.getBoolPref("tabs.closeButtons.enable");
+ // mCloseButtons is not in firefox code sinc Firefox 31 bug 865826
this.tabBar.mCloseButtons = Tabmix.prefs.getIntPref("tabs.closeButtons");
- this.tabBar._tabmixPositionalTabs = {
+ this._keepLastTab = Tabmix.prefs.getBoolPref("keepLastTab");
+ this.closeButtonsEnabled = Tabmix.prefs.getBoolPref("tabs.closeButtons.enable");
+ this._tabmixPositionalTabs = {
beforeSelectedTab: null, afterSelectedTab: null,
beforeHoveredTab: null, afterHoveredTab: null
};
@@ -634,7 +636,7 @@ Tabmix.tabsUtils = {
if (this.tabBar.parentNode)
this.tabBar.parentNode.removeEventListener("dragover", this, true);
delete this.tabstripInnerbox;
- gBrowser.tabContainer._tabmixPositionalTabs = null;
+ this._tabmixPositionalTabs = null;
},
handleEvent: function(aEvent) {
@@ -1162,7 +1164,7 @@ var gTMPprefObserver = {
gBrowser.tabContainer.adjustTabstrip();
break;
case "extensions.tabmix.keepLastTab":
- gBrowser.tabContainer._keepLastTab = Services.prefs.getBoolPref(prefName);
+ Tabmix.tabsUtils._keepLastTab = Services.prefs.getBoolPref(prefName);
gBrowser.tabContainer.adjustTabstrip();
break;
case "browser.tabs.closeButtons":
@@ -1215,7 +1217,7 @@ var gTMPprefObserver = {
break;
case "extensions.tabmix.tabs.closeButtons.enable":
prefValue = Services.prefs.getBoolPref(prefName);
- gBrowser.tabContainer.closeButtonsEnabled = prefValue;
+ Tabmix.tabsUtils.closeButtonsEnabled = prefValue;
gBrowser.tabContainer.mTabstrip.offsetRatio = prefValue ? 0.70 : 0.50;
gBrowser.tabContainer.adjustTabstrip();
break;
diff --git a/chrome/content/tab/tabbrowser_4.xml b/chrome/content/tab/tabbrowser_4.xml
index 21107a7..49b2838 100644
--- a/chrome/content/tab/tabbrowser_4.xml
+++ b/chrome/content/tab/tabbrowser_4.xml
@@ -228,7 +228,7 @@
if (TabmixSvc.australis) {
clearTimeout(this.tabmix_mouseover);
- let positionalTabs = this.parentNode._tabmixPositionalTabs;
+ let positionalTabs = Tabmix.tabsUtils._tabmixPositionalTabs;
if (positionalTabs.beforeHoveredTab) {
positionalTabs.beforeHoveredTab.removeAttribute("tabmix-removed-beforehovered");
positionalTabs.beforeHoveredTab = null;
--
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