[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 122/483: Prevent tooltips from disappearing automatically

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:33 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 31676f22e6ca1ccdd2d33548273ebf92868cd0ca
Author: Wladimir Palant <trev at gtchat.de>
Date:   Fri Jun 27 11:42:01 2008 +0000

    Prevent tooltips from disappearing automatically
    
    --HG--
    extra : convert_revision : svn%3Ad8bf93c1-8190-44a8-bb31-1ea94378a4df/trunk%40942
---
 chrome/content/aardvark.js | 5 +++++
 chrome/content/overlay.js  | 5 +++++
 chrome/content/overlay.xul | 4 ++--
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/chrome/content/aardvark.js b/chrome/content/aardvark.js
index 2aa8a2d..ee6eea6 100644
--- a/chrome/content/aardvark.js
+++ b/chrome/content/aardvark.js
@@ -563,9 +563,11 @@ ehhAardvark.viewSource = function (elem)
 
   var sourceBox = document.getElementById("ehh-viewsource");
   if ((sourceBox.getAttribute("_moz-menuactive") == "true" || sourceBox.state == "open") && this.commentElem == elem) {
+    ehhViewSourceHidden = true;
     sourceBox.hidePopup();
     return true;
   }
+  ehhViewSourceHidden = true;
   sourceBox.hidePopup();
 
   while (sourceBox.firstChild)
@@ -576,6 +578,7 @@ ehhAardvark.viewSource = function (elem)
   var x = this.mouseX;
   var y = this.mouseY;
   setTimeout(function() {
+    ehhViewSourceHidden = false;
     sourceBox.showPopup(document.documentElement, x, y, "tooltip", "topleft", "topleft");
   }, 500);
   return true;
@@ -677,11 +680,13 @@ ehhAardvark.showMenu = function ()
 {
   var helpBox = document.getElementById("ehh-helpbox");
   if (helpBox.getAttribute("_moz-menuactive") == "true" || helpBox.state == "open") {
+    ehhHelpHidden = true;
     helpBox.hidePopup();
     return true;
   }
 
   // Show help box
+  ehhHelpHidden = false;
   helpBox.showPopup(this.browser, -1, -1, "tooltip", "topleft", "topleft");
   return true;
 }
diff --git a/chrome/content/overlay.js b/chrome/content/overlay.js
index d0d2b79..3e774ef 100644
--- a/chrome/content/overlay.js
+++ b/chrome/content/overlay.js
@@ -22,6 +22,9 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
+var ehhHelpHidden = true;
+var ehhViewSourceHidden = true;
+
 // This will be called from overlayBasic - only if Adblock Plus is installed
 // and the version is correct
 function ehhInit2() {
@@ -72,6 +75,8 @@ function ehhGetBrowser() {
 }
 
 function ehhHideTooltips() {
+  ehhHelpHidden = true;
+  ehhViewSourceHidden = true;
   document.getElementById("ehh-helpbox").hidePopup();
   document.getElementById("ehh-commandlabel").hidePopup();
   document.getElementById("ehh-viewsource").hidePopup();
diff --git a/chrome/content/overlay.xul b/chrome/content/overlay.xul
index 80dd4e1..10f4f08 100644
--- a/chrome/content/overlay.xul
+++ b/chrome/content/overlay.xul
@@ -32,7 +32,7 @@
   <script type="application/x-javascript" src="aardvark.js"/>
   
   <popupset id="abp-popupset">
-    <tooltip id="ehh-helpbox" noautohide="true" orient="vertical">
+    <tooltip id="ehh-helpbox" orient="vertical" onpopuphiding="return ehhHelpHidden;">
       <description id="ehh-helpbox-title" value="&helpbox.title;"/>
 
       <grid flex="1">
@@ -47,7 +47,7 @@
       <description id="ehh-commandlabel-key"/>
       <description id="ehh-commandlabel-label"/>
     </tooltip>
-    <tooltip id="ehh-viewsource" noautohide="true" orient="vertical"/>
+    <tooltip id="ehh-viewsource" orient="vertical" onpopuphiding="return ehhViewSourceHidden;"/>
   </popupset>
 
   <popup id="abp-status-popup">

-- 
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