[Pkg-mozext-commits] [tabmixplus] 37/47: "Open new tabs next to current one" option is not working.
David Prévot
taffit at moszumanska.debian.org
Fri Sep 26 20:57:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch upstream
in repository tabmixplus.
commit 17ba3a9d8f7b2ff0168339714926041e861c13cb
Author: onemen <tabmix.onemen at gmail.com>
Date: Mon Sep 22 17:40:47 2014 +0300
"Open new tabs next to current one" option is not working.
---
chrome/content/links/userInterface.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/chrome/content/links/userInterface.js b/chrome/content/links/userInterface.js
index 678c569..2bac778 100644
--- a/chrome/content/links/userInterface.js
+++ b/chrome/content/links/userInterface.js
@@ -103,6 +103,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
Tabmix.prefs.getIntPref("loadOnNewTab.type");
var url;
var newTabUrl = BROWSER_NEW_TAB_URL;
+ var selectedTab = gBrowser.selectedTab;
switch (newTabContent) {
case 0 : // blank tab, by default
url = "about:blank";
@@ -116,7 +117,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
break;
case 3 : // duplicate tab
let currentUrl = gBrowser.currentURI.spec;
- let newTab = gBrowser.duplicateTab(gBrowser.mCurrentTab, null, null, null, true);
+ let newTab = gBrowser.duplicateTab(selectedTab, null, null, null, true);
Tabmix.clearUrlBar(newTab, currentUrl, true);
return newTab;
break;
@@ -142,8 +143,8 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
url = "chrome://google-toolbar/content/new-tab.html";
} catch (ex) {/* no pref - do noting */}
}
- if (TabmixTabbar.widthFitTitle && replaceLastTab && !gBrowser.mCurrentTab.collapsed)
- gBrowser.mCurrentTab.collapsed = true;
+ if (TabmixTabbar.widthFitTitle && replaceLastTab && !selectedTab.collapsed)
+ selectedTab.collapsed = true;
// always select new tab when replacing last tab
var loadInBackground = replaceLastTab ? false :
@@ -172,7 +173,7 @@ function TMP_BrowserOpenTab(aTab, replaceLastTab) {
else if (!replaceLastTab && Tabmix.prefs.getBoolPref("openNewTabNext")) {
// we used to move tab after lastRelatedTab but we don't need it on new tabs
// and it mess with recently used tabs order
- gBrowser.moveTabTo(newTab, gBrowser.selectedTab._tPos + 1);
+ gBrowser.moveTabTo(newTab, selectedTab._tPos + 1);
}
// make sure to update recently used tabs
// if user open many tabs quickly select event don't have time to fire
--
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