comparison cagou/core/cagou_widget.py @ 222:a676cb07c1cb

core (menu): TouchMenuBehaviour: moved code showing ModernMenu on item from file sharing plugin to a generic behaviour, so it can be re-used elsewhere.
author Goffi <goffi@goffi.org>
date Tue, 26 Jun 2018 20:26:21 +0200
parents 7177fe2d9725
children 3e11b5d923e2
comparison
equal deleted inserted replaced
221:e1a385a791cc 222:a676cb07c1cb
64 def __init__(self): 64 def __init__(self):
65 for p in G.host.getPluggedWidgets(): 65 for p in G.host.getPluggedWidgets():
66 if p['main'] == self.__class__: 66 if p['main'] == self.__class__:
67 self.plugin_info = p 67 self.plugin_info = p
68 break 68 break
69 BoxLayout.__init__(self, orientation="vertical") 69 BoxLayout.__init__(self)
70 self.selector = HeaderWidgetSelector(self) 70 self.selector = HeaderWidgetSelector(self)
71 71
72 def switchWidget(self, plugin_info): 72 def switchWidget(self, plugin_info):
73 self.selector.dismiss() 73 self.selector.dismiss()
74 factory = plugin_info["factory"] 74 factory = plugin_info["factory"]