[Pkg-mozext-commits] [tabmixplus] 04/15: Add lasttabTabList events to the xul menupoup
David Prévot
taffit at moszumanska.debian.org
Sat Feb 21 22:30:04 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 25b58fdc6d45f7c75323cdd3afbba059ab55a115
Author: onemen <tabmix.onemen at gmail.com>
Date: Fri Jan 30 22:18:42 2015 +0200
Add lasttabTabList events to the xul menupoup
---
chrome/content/flst/lasttab.js | 15 +++++++++------
chrome/content/tabmix.xul | 5 +++--
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/chrome/content/flst/lasttab.js b/chrome/content/flst/lasttab.js
index 2e51c9d..158e7af 100644
--- a/chrome/content/flst/lasttab.js
+++ b/chrome/content/flst/lasttab.js
@@ -65,8 +65,6 @@ var TMP_LastTab = {
browser.addEventListener("keydown", this, true);
browser.addEventListener("keypress", this, true);
browser.addEventListener("keyup", this, true);
- this.TabList.addEventListener("DOMMenuItemActive", this, true);
- this.TabList.addEventListener("DOMMenuItemInactive", this, true);
// if session manager select other tab then the first one we need to build
// TabHistory in two steps to maintain natural Ctrl-Tab order.
@@ -87,8 +85,6 @@ var TMP_LastTab = {
browser.removeEventListener("keydown", this, true);
browser.removeEventListener("keypress", this, true);
browser.removeEventListener("keyup", this, true);
- this.TabList.removeEventListener("DOMMenuItemActive", this, true);
- this.TabList.removeEventListener("DOMMenuItemInactive", this, true);
},
handleEvent : function(event) {
@@ -279,14 +275,21 @@ var TMP_LastTab = {
this._tabs = null;
},
- OnMenuCommand : function _LastTab_OnMenuCommand(event) {
+ onMenuCommand : function(event) {
if(this.respondToMouseInTabList) {
TabmixAllTabs._tabSelectedFromList(event.target.tab);
this.PushSelectedTab();
}
},
- OnPopupHidden : function() {
+ onPopupshowing : function() {
+ this.TabList.addEventListener("DOMMenuItemActive", this, true);
+ this.TabList.addEventListener("DOMMenuItemInactive", this, true);
+ },
+
+ onPopuphidden : function() {
+ this.TabList.removeEventListener("DOMMenuItemActive", this, true);
+ this.TabList.removeEventListener("DOMMenuItemInactive", this, true);
if(!this.SuppressTabListReset) {
var tablist = this.TabList;
diff --git a/chrome/content/tabmix.xul b/chrome/content/tabmix.xul
index 40343ed..834915d 100644
--- a/chrome/content/tabmix.xul
+++ b/chrome/content/tabmix.xul
@@ -362,8 +362,9 @@
</menupopup>
<!-- menupopup for lasttab -->
<menupopup id="lasttabTabList" ignorekeys="true" flex="1"
- oncommand="TMP_LastTab.OnMenuCommand(event);"
- onpopuphidden="TMP_LastTab.OnPopupHidden();" />
+ oncommand="TMP_LastTab.onMenuCommand(event);"
+ onpopupshowing="TMP_LastTab.onPopupshowing();"
+ onpopuphidden="TMP_LastTab.onPopuphidden();" />
<menupopup id="tabslist"
oncommand="TabmixAllTabs._tabsListOncommand(event);"
onpopuphidden="TabmixAllTabs.hideCommonList(this);"/>
--
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