Mercurial > libervia-web
diff src/browser/sat_browser/contact_widget.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 | 3845a086f0b3 |
children | 16079280a39e |
line wrap: on
line diff
--- a/src/browser/sat_browser/contact_widget.py Thu Apr 02 00:36:08 2015 +0200 +++ b/src/browser/sat_browser/contact_widget.py Thu Apr 09 11:40:53 2015 +0200 @@ -84,17 +84,26 @@ class ContactMenuBar(base_widget.WidgetMenuBar): + """WidgetMenuBar displaying the contact's avatar as category.""" def onBrowserEvent(self, event): base_widget.WidgetMenuBar.onBrowserEvent(self, event) event.stopPropagation() # prevent opening the chat dialog @classmethod - def getCategoryHTML(cls, menu_name_i18n, type_): + def getCategoryHTML(cls, category): + """Return the HTML code for displaying contact's avatar. + + @param category (quick_menus.MenuCategory): ignored + @return(unicode): HTML to display + """ return '<img src="%s"/>' % C.DEFAULT_AVATAR_URL def setUrl(self, url): - """Set the URL of the contact avatar.""" + """Set the URL of the contact avatar. + + @param url (unicode): avatar URL + """ self.items[0].setHTML('<img src="%s" />' % url)