Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 6429432411586560: issue 449 - override toolbar icon context menu if left click action is redefined (Closed)
Patch Set: consistency change for statusbar icon Created May 15, 2014, 9:11 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/ui.js
===================================================================
--- a/lib/ui.js
+++ b/lib/ui.js
@@ -1076,20 +1076,33 @@
if (location && Policy.isWhitelisted(location.spec))
state = "whitelisted";
}
-
+
+ let popupId = "abp-status-popup";
if (icon.localName == "statusbarpanel")
{
if (Prefs.defaultstatusbaraction == 0)
- icon.setAttribute("popup", icon.getAttribute("context"));
+ {
+ icon.setAttribute("popup", popupId);
+ icon.removeAttribute("context");
+ }
else
+ {
icon.removeAttribute("popup");
+ icon.setAttribute("context", popupId);
+ }
}
else
{
if (Prefs.defaulttoolbaraction == 0)
+ {
icon.setAttribute("type", "menu");
+ icon.removeAttribute("context");
+ }
else
+ {
icon.setAttribute("type", "menu-button");
+ icon.setAttribute("context", popupId);
+ }
}
icon.setAttribute("abpstate", state);
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld