comparison src/browser/sat_browser/menu.py @ 690:76a67d04c63e

browser_side: improve comments for menus-related methods
author souliane <souliane@mailoo.org>
date Thu, 09 Apr 2015 11:40:53 +0200
parents 90a5a5af2550
children f1271f769ffd
comparison
equal deleted inserted replaced
689:a6adefddcb0a 690:76a67d04c63e
46 styles = {'moved_popup': 'menuLastPopup', 'menu_bar': 'mainMenuBar'} 46 styles = {'moved_popup': 'menuLastPopup', 'menu_bar': 'mainMenuBar'}
47 base_menu.GenericMenuBar.__init__(self, host, vertical=False, styles=styles) 47 base_menu.GenericMenuBar.__init__(self, host, vertical=False, styles=styles)
48 48
49 @classmethod 49 @classmethod
50 def getCategoryHTML(cls, category): 50 def getCategoryHTML(cls, category):
51 """Build the html to be used for displaying a category item.
52
53 @param category (quick_menus.MenuCategory): category to add
54 @return unicode: HTML to display
55 """
51 name = html_tools.html_sanitize(category.name) 56 name = html_tools.html_sanitize(category.name)
52 return cls.ITEM_TPL % (category.icon, name) if category.icon is not None else name 57 return cls.ITEM_TPL % (category.icon, name) if category.icon is not None else name
53 58
54 ## callbacks 59 ## callbacks
55 60