[Pkg-mozext-commits] [tabmixplus] 04/10: Clean calls to Tabmix.flst.cancel
David Prévot
taffit at moszumanska.debian.org
Tue Dec 29 19:03:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag 0.4.2.1pre.151226a1
in repository tabmixplus.
commit 0d1ce13e02ce44eff6314798de5df215a379aa1c
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Dec 19 14:52:56 2015 +0200
Clean calls to Tabmix.flst.cancel
---
chrome/content/flst/lasttab.js | 8 ++++++++
chrome/content/minit/tabView.js | 9 ++++++---
chrome/content/tabmix.js | 4 +---
modules/Shortcuts.jsm | 5 ++---
4 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 7de0406..4f44aaf 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -365,3 +365,11 @@ var TMP_LastTab = {
}
};
+
+Tabmix.slideshow = {
+ cancel: function() {
+ if (Tabmix.SlideshowInitialized && Tabmix.flst.slideShowTimer) {
+ Tabmix.flst.cancel();
+ }
+ }
+};
diff --git a/chrome/content/minit/tabView.js b/chrome/content/minit/tabView.js
index bf9011d..149bf47 100644
--- a/chrome/content/minit/tabView.js
+++ b/chrome/content/minit/tabView.js
@@ -50,11 +50,14 @@
}
// we need to stop tabs slideShow before Tabview starts
+ let $LF = '\n ';
Tabmix.changeCode(TabView, "TabView.toggle")._replace(
'this.show();',
- '{if (Tabmix.SlideshowInitialized && Tabmix.flst.slideShowTimer) Tabmix.flst.cancel();\
- $&}'
- ).toCode();
+ '{' + $LF +
+ ' Tabmix.slideshow.cancel();' + $LF +
+ ' $&' + $LF +
+ '}'
+ ).toCode(true);
// don't do anything if Session Manager extension installed
if (Tabmix.extensions.sessionManager)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index b75ce1e..fe71988 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -1109,9 +1109,7 @@ var TMP_eventListener = {
TabmixProgressListener.listener.mTabBrowser = null;
gBrowser.removeTabsProgressListener(TabmixProgressListener.listener);
- if (Tabmix.SlideshowInitialized && Tabmix.flst.slideShowTimer)
- Tabmix.flst.cancel();
-
+ Tabmix.slideshow.cancel();
Tabmix.navToolbox.deinit();
if (Tabmix.isVersion(320)) {
diff --git a/modules/Shortcuts.jsm b/modules/Shortcuts.jsm
index 1421fb2..c65a343 100644
--- a/modules/Shortcuts.jsm
+++ b/modules/Shortcuts.jsm
@@ -270,9 +270,8 @@ this.Shortcuts = {
items[i].setAttribute("acceltext", disabled ? " " : "");
// turn off slideShow if need to
- if (aKey == "slideShow" && disabled &&
- aWindow.Tabmix.SlideshowInitialized && aWindow.Tabmix.flst.slideShowTimer) {
- aWindow.Tabmix.flst.cancel();
+ if (aKey == "slideShow" && disabled) {
+ aWindow.Tabmix.slideshow.cancel();
}
},
--
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