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

Side by Side Diff: lib/ui.js

Issue 6429432411586560: issue 449 - override toolbar icon context menu if left click action is redefined (Closed)
Patch Set: Created May 14, 2014, 4:06 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/ui/overlay.xul ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 if (icon.localName == "statusbarpanel") 1080 if (icon.localName == "statusbarpanel")
1081 { 1081 {
1082 if (Prefs.defaultstatusbaraction == 0) 1082 if (Prefs.defaultstatusbaraction == 0)
1083 icon.setAttribute("popup", icon.getAttribute("context")); 1083 icon.setAttribute("popup", icon.getAttribute("context"));
1084 else 1084 else
1085 icon.removeAttribute("popup"); 1085 icon.removeAttribute("popup");
1086 } 1086 }
1087 else 1087 else
1088 { 1088 {
1089 if (Prefs.defaulttoolbaraction == 0) 1089 if (Prefs.defaulttoolbaraction == 0)
1090 {
1090 icon.setAttribute("type", "menu"); 1091 icon.setAttribute("type", "menu");
1092 icon.removeAttribute("context");
1093 }
1091 else 1094 else
1095 {
1092 icon.setAttribute("type", "menu-button"); 1096 icon.setAttribute("type", "menu-button");
1097 icon.setAttribute("context", "abp-status-popup");
1098 }
1093 } 1099 }
1094 1100
1095 icon.setAttribute("abpstate", state); 1101 icon.setAttribute("abpstate", state);
1096 }, 1102 },
1097 1103
1098 /** 1104 /**
1099 * Shows or hides status bar icons in all windows, according to pref. 1105 * Shows or hides status bar icons in all windows, according to pref.
1100 */ 1106 */
1101 updateStatusbarIcon: function(/**Window*/ window) 1107 updateStatusbarIcon: function(/**Window*/ window)
1102 { 1108 {
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], 1926 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)],
1921 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] 1927 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)]
1922 ]; 1928 ];
1923 1929
1924 onShutdown.add(function() 1930 onShutdown.add(function()
1925 { 1931 {
1926 for (let window in UI.applicationWindows) 1932 for (let window in UI.applicationWindows)
1927 if (UI.isBottombarOpen(window)) 1933 if (UI.isBottombarOpen(window))
1928 UI.toggleBottombar(window); 1934 UI.toggleBottombar(window);
1929 }); 1935 });
OLDNEW
« 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