comparison cagou/plugins/plugin_wid_widget_selector.py @ 267:896f78760b63

core: fixed crash when calling deleteUnusedWidgetInstances on widgets not inheriting from QuickWidget
author Goffi <goffi@goffi.org>
date Mon, 11 Mar 2019 20:24:04 +0100
parents 0ddd2b20cc6b
children 1b835bcfa663
comparison
equal deleted inserted replaced
266:b3f97729e983 267:896f78760b63
48 factory = self.plugin_info["factory"] 48 factory = self.plugin_info["factory"]
49 G.host.switchWidget(self, factory(self.plugin_info, None, profiles=iter(G.host.profiles))) 49 G.host.switchWidget(self, factory(self.plugin_info, None, profiles=iter(G.host.profiles)))
50 50
51 51
52 class WidgetSelector(cagou_widget.CagouWidget): 52 class WidgetSelector(cagou_widget.CagouWidget):
53 # TODO: should inherit from QuickWidget
53 54
54 def __init__(self): 55 def __init__(self):
55 super(WidgetSelector, self).__init__() 56 super(WidgetSelector, self).__init__()
56 self.items = [] 57 self.items = []
57 for plugin_info in G.host.getPluggedWidgets(except_cls=self.__class__): 58 for plugin_info in G.host.getPluggedWidgets(except_cls=self.__class__):