comparison src/browser/sat_browser/plugin_sec_otr.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 6a8a1103ad10
children 2e087e093e7f
comparison
equal deleted inserted replaced
675:941e53b3af5c 676:849ffb24d5bf
394 # FIXME: workaround for a pyjamas issue: calling hash on a class method always return a different value if that method is defined directly within the class (with the "def" keyword) 394 # FIXME: workaround for a pyjamas issue: calling hash on a class method always return a different value if that method is defined directly within the class (with the "def" keyword)
395 self._profilePluggedListener = self.profilePluggedListener 395 self._profilePluggedListener = self.profilePluggedListener
396 self._gotMenusListener = self.gotMenusListener 396 self._gotMenusListener = self.gotMenusListener
397 # FIXME: these listeners are never removed, can't be removed by themselves (it modifies the list while looping), maybe need a 'one_shot' argument 397 # FIXME: these listeners are never removed, can't be removed by themselves (it modifies the list while looping), maybe need a 'one_shot' argument
398 self.host.addListener('profilePlugged', self._profilePluggedListener) 398 self.host.addListener('profilePlugged', self._profilePluggedListener)
399 self.host.addListener('gotMenus', self._gotMenusListener) 399 # self.host.addListener('gotMenus', self._gotMenusListener)
400 400
401 @classmethod 401 @classmethod
402 def getInfoText(self, state=otr.context.STATE_PLAINTEXT, trust=''): 402 def getInfoText(self, state=otr.context.STATE_PLAINTEXT, trust=''):
403 """Get the widget info text for a certain message state and trust. 403 """Get the widget info text for a certain message state and trust.
404 404