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

Unified Diff: packagerChrome.py

Issue 29608569: Issue 6037 - Allow popup icons without popup (Closed) Base URL: https://hg.adblockplus.org/buildtools/
Patch Set: Use endswith Created Nov. 14, 2017, 6:39 p.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerChrome.py
===================================================================
--- a/packagerChrome.py
+++ b/packagerChrome.py
@@ -81,23 +81,28 @@
icons = metadata.get('general', opt).split()
if not icons:
continue
if len(icons) == 1:
# ... = icon.png
icon, popup = icons[0], None
- elif len(icons) == 2:
- # ... = icon.png popup.html
- icon, popup = icons
+ elif icons[-1].endswith('.html'):
+ if len(icons) == 2:
+ # ... = icon.png popup.html
+ icon, popup = icons
+ else:
+ # ... = icon-19.png icon-38.png popup.html
+ popup = icons.pop()
+ icon = makeIcons(files, icons)
else:
- # ... = icon-19.png icon-38.png popup.html
- popup = icons.pop()
+ # ... = icon-16.png icon-32.png icon-48.png
icon = makeIcons(files, icons)
+ popup = None
templateData[opt] = {'icon': icon, 'popup': popup}
if metadata.has_option('general', 'icons'):
templateData['icons'] = makeIcons(files,
metadata.get('general', 'icons').split())
if metadata.has_option('general', 'permissions'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld