Mercurial > libervia-web
comparison src/browser/sat_browser/contact_panel.py @ 676:849ffb24d5bf frontends_multi_profiles
browser side: menus refactorisation:
- use of the new quick_frontends.quick_menus module, resulting in a big code simplification in Libervia
- menu are added in there respective modules: main menus are done directely in libervia_main, while tarot and radiocol menus are done in game_tarot and game_radiocol
- launchAction has the same signature as in QuickApp
- base_menu: there are now 2 classes to launch an action: MenuCmd which manage quick_menus classes, and SimpleCmd to launch a generic callback
- base_menu: MenuNode has been removed as logic is now in quick_menus
- base_menu: GenericMenuBar.update method can be called to fully (re)build the menus
- base_widget: removed WidgetSubMenuBar which is no more useful (GenericMenuBar do the same thing)
- plugin_menu_context is used in LiberviaWidget and other classes with menus to indicate which menu types must be used
- otr menus hooks are temporarily removed, will be fixed soon
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Mar 2015 20:42:02 +0100 |
parents | e489218886d7 |
children | e876f493dccc |
comparison
equal
deleted
inserted
replaced
675:941e53b3af5c | 676:849ffb24d5bf |
---|---|
143 try: | 143 try: |
144 return self._contacts[self._key(contact_jid)] | 144 return self._contacts[self._key(contact_jid)] |
145 except KeyError: | 145 except KeyError: |
146 box = contact_widget.ContactBox(self.host, contact_jid, | 146 box = contact_widget.ContactBox(self.host, contact_jid, |
147 style_name=self.contacts_style, | 147 style_name=self.contacts_style, |
148 menu_types=self.contacts_menus, | 148 display=self.contacts_display, |
149 display=self.contacts_display) | 149 plugin_menu_context=self.contacts_menus) |
150 self._contacts[self._key(contact_jid)] = box | 150 self._contacts[self._key(contact_jid)] = box |
151 return box | 151 return box |
152 | 152 |
153 def addContact(self, contact_jid): | 153 def addContact(self, contact_jid): |
154 """Add a contact to the list. | 154 """Add a contact to the list. |