[Pkg-mozext-commits] [tabmixplus] 18/123: Listener to TabAttrModified in order to catch tab width changed when label attribute changed or when busy attribute changed hide/show image
David Prévot
taffit at moszumanska.debian.org
Wed Sep 17 21:16:23 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 759ad7eb4cc129facc971e64b8267aec43daa4b7
Author: onemen <tabmix.onemen at gmail.com>
Date: Sat Aug 16 14:26:38 2014 +0300
Listener to TabAttrModified in order to catch tab width changed when label attribute changed or when busy attribute changed hide/show image
---
chrome/content/tabmix.js | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 52d99a4..98556e9 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -242,6 +242,9 @@ var TMP_eventListener = {
handleEvent: function TMP_EL_handleEvent(aEvent) {
switch (aEvent.type) {
+ case "TabAttrModified":
+ this.onTabAttrModified(aEvent);
+ break;
case "SSTabRestoring":
this.onSSTabRestoring(aEvent);
break;
@@ -324,7 +327,8 @@ var TMP_eventListener = {
} catch (ex) {Tabmix.assert(ex);}
this._tabEvents = ["SSTabRestoring", "PrivateTab:PrivateChanged",
- "TabOpen", "TabClose", "TabSelect", "TabMove", "TabUnpinned"];
+ "TabOpen", "TabClose", "TabSelect", "TabMove", "TabUnpinned",
+ "TabAttrModified"];
this.toggleEventListener(gBrowser.tabContainer, this._tabEvents, true);
try {
@@ -579,6 +583,17 @@ var TMP_eventListener = {
delete Tabmix.adjustTabstrip;
},
+ onTabAttrModified: function (aEvent) {
+ if (!TabmixTabbar.widthFitTitle)
+ return;
+
+ // catch tab width changed when label attribute changed
+ // or when busy attribute changed hide/show image
+ var tab = aEvent.target;
+ TabmixTabbar.updateScrollStatus();
+ setTimeout(function(){TabmixTabbar.updateScrollStatus();}, 2500);
+ },
+
onSSTabRestoring: function TMP_EL_onSSTabRestoring(aEvent) {
var tab = aEvent.target;
Tabmix.restoreTabState(tab);
--
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