[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 258/483: Use separate commands for menu item and hotkey, disabling menu items should not disable hotkey

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit 8153f4b3db49bf6bed6de70676babeb2b5da2513
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Tue Oct 26 11:11:51 2010 +0200

    Use separate commands for menu item and hotkey, disabling menu items should not disable hotkey
---
 chrome/content/overlay.xul | 6 ++++--
 modules/AppIntegration.jsm | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/chrome/content/overlay.xul b/chrome/content/overlay.xul
index abd29b2..57dbf59 100644
--- a/chrome/content/overlay.xul
+++ b/chrome/content/overlay.xul
@@ -58,11 +58,13 @@
   </popupset>
 
   <popup id="abp-status-popup">
-    <menuitem id="abp-status-ehh-selectelement" hidden="true" insertbefore="abp-status-options" label="&selectelement.label;" accesskey="&selectelement.accesskey;" command="ehh-command-selectelement" key="ehh-key-selectelement"/>
-    <menuitem id="abp-status-ehh-stopselection" hidden="true" insertbefore="abp-status-options" label="&stopselection.label;" accesskey="&stopselection.accesskey;" command="ehh-command-selectelement" key="ehh-key-selectelement"/>
+    <menuitem id="abp-status-ehh-selectelement" hidden="true" insertbefore="abp-status-options" label="&selectelement.label;" accesskey="&selectelement.accesskey;" command="ehh-command-selectelement2" key="ehh-key-selectelement"/>
+    <menuitem id="abp-status-ehh-stopselection" hidden="true" insertbefore="abp-status-options" label="&stopselection.label;" accesskey="&stopselection.accesskey;" command="ehh-command-selectelement2" key="ehh-key-selectelement"/>
   </popup>
 
   <commandset id="abp-commandset">
     <command id="ehh-command-selectelement" oncommand="//"/>
+    <!-- Use separate command for menu item, disabling menu item should not disable hotkey -->
+    <command id="ehh-command-selectelement2" oncommand="//"/>
   </commandset>
 </overlay>
diff --git a/modules/AppIntegration.jsm b/modules/AppIntegration.jsm
index 06cb8db..19a730a 100644
--- a/modules/AppIntegration.jsm
+++ b/modules/AppIntegration.jsm
@@ -276,7 +276,7 @@ WindowWrapper.prototype =
     let enabled = Aardvark.canSelect(this.browser);
     let running = (enabled && this.browser == Aardvark.browser);
   
-    this.E("ehh-command-selectelement").setAttribute("disabled", !enabled);
+    this.E("ehh-command-selectelement2").setAttribute("disabled", !enabled);
     this.E(prefix + "ehh-selectelement").hidden = running;
     this.E(prefix + "ehh-stopselection").hidden = !running;
   },
@@ -304,6 +304,7 @@ WindowWrapper.prototype.eventHandlers = [
   ["abp-status-popup", "popupshowing", WindowWrapper.prototype.fillPopup],
   ["abp-toolbar-popup", "popupshowing", WindowWrapper.prototype.fillPopup],
   ["ehh-command-selectelement", "command", WindowWrapper.prototype.toggleSelection],
+  ["ehh-command-selectelement2", "command", WindowWrapper.prototype.toggleSelection],
 ];
 
 AppIntegration.startup();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list