[Pkg-mozext-commits] [tabmixplus] 51/147: Add option to toggle 'Keep Undo close tab menu open' to Tab Mix Plus options window, changeset 6631a0234e2a added the option only to the closed tabs menu
David Prévot
taffit at moszumanska.debian.org
Sat Aug 5 15:27:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit bea7f1c329c36dc4746491446a9b32a3a4ce7ff3
Author: onemen <tabmix.onemen at gmail.com>
Date: Tue Dec 6 16:58:58 2016 +0200
Add option to toggle 'Keep Undo close tab menu open' to Tab Mix Plus options window, changeset 6631a0234e2a added the option only to the closed tabs menu
---
chrome/content/preferences/events.js | 2 ++
chrome/content/preferences/events.xul | 3 +++
chrome/content/session/sessionStore.js | 6 ++----
defaults/preferences/tabmix.js | 1 +
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/chrome/content/preferences/events.js b/chrome/content/preferences/events.js
index 4831258..046cbf1 100644
--- a/chrome/content/preferences/events.js
+++ b/chrome/content/preferences/events.js
@@ -13,6 +13,8 @@ var gEventsPane = {
hbox.setAttribute("align", "center");
}
+ $("keepMenuOpen").label = TabmixSvc.getString("undoclosetab.keepOpen.label");
+
var browserWindow = Tabmix.getTopWin();
let ctrlTab = browserWindow.document.getElementById("ctrlTab-panel") && "ctrlTab" in browserWindow;
if (!ctrlTab) {
diff --git a/chrome/content/preferences/events.xul b/chrome/content/preferences/events.xul
index 2d90c40..3fcff88 100644
--- a/chrome/content/preferences/events.xul
+++ b/chrome/content/preferences/events.xul
@@ -90,6 +90,8 @@
<preference id="pref_undoClosepos" name="extensions.tabmix.undoClosePosition" type="bool"/>
<preference id="pref_menuonlybutton"
name="extensions.tabmix.undoCloseButton.menuonly" type="bool"/>
+ <preference id="pref_keepMenuOpen"
+ name="extensions.tabmix.undoClose.keepMenuOpen" type="bool"/>
<preference id="pref_ctrltab" name="browser.ctrlTab.previews" type="bool"
onchange="gEventsPane.disableShowTabList();"/>
<preference id="pref_ctrltab.tabPreviews" name="extensions.tabmix.lasttab.tabPreviews" type="bool"
@@ -349,6 +351,7 @@
</hbox>
<checkbox_tmp id="undoClosepos" label="&undoClosepos.label;" preference="pref_undoClosepos" observes="obs_undoClose"/>
<checkbox_tmp id="menuonlybutton" label="&menuonlybutton.label;" preference="pref_menuonlybutton" observes="obs_undoClose"/>
+ <checkbox_tmp id="keepMenuOpen" preference="pref_keepMenuOpen" observes="obs_undoClose"/>
</vbox>
</vbox>
<separator class="groove"/>
diff --git a/chrome/content/session/sessionStore.js b/chrome/content/session/sessionStore.js
index dea3d1e..ec86144 100644
--- a/chrome/content/session/sessionStore.js
+++ b/chrome/content/session/sessionStore.js
@@ -332,13 +332,11 @@ var TMP_ClosedTabs = {
/* .......... functions for closedtabs list menu and context menu .......... */
get keepMenuOpen() {
- return TabmixSvc.prefs.get("extensions.tabmix.undoClose.keepMenuOpen", false);
+ return Tabmix.prefs.getBoolPref("undoClose.keepMenuOpen");
},
set keepMenuOpen(val) {
- val = Boolean(val);
- const fn = val ? "set" : "reset";
- TabmixSvc.prefs[fn]("extensions.tabmix.undoClose.keepMenuOpen", val);
+ Tabmix.prefs.setBoolPref("undoClose.keepMenuOpen", Boolean(val));
return val;
},
diff --git a/defaults/preferences/tabmix.js b/defaults/preferences/tabmix.js
index 95f3967..0b53179 100644
--- a/defaults/preferences/tabmix.js
+++ b/defaults/preferences/tabmix.js
@@ -162,6 +162,7 @@ pref("extensions.tabmix.lasttab.showTabList", false);
pref("extensions.tabmix.slideDelay", 10);
pref("extensions.tabmix.undoClose", true);
+pref("extensions.tabmix.undoClose.keepMenuOpen", false);
/*
* we use browser.sessionstore.max_tabs_undo from 2008-02-26
*/
--
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