comparison cagou/plugins/plugin_wid_settings.py @ 312:772c170b47a9

Python3 port: /!\ Cagou now runs with Python 3.6+ Port has been done in the same way as for backend (check backend commit b2d067339de3 message for details).
author Goffi <goffi@goffi.org>
date Tue, 13 Aug 2019 19:14:22 +0200
parents 4772ba26623f
children 080b6cc17f53
comparison
equal deleted inserted replaced
311:a0d978d3ce84 312:772c170b47a9
28 from cagou.core import cagou_widget 28 from cagou.core import cagou_widget
29 from cagou import G 29 from cagou import G
30 30
31 31
32 PLUGIN_INFO = { 32 PLUGIN_INFO = {
33 "name": _(u"settings"), 33 "name": _("settings"),
34 "main": "CagouSettings", 34 "main": "CagouSettings",
35 "description": _(u"Cagou/SàT settings"), 35 "description": _("Cagou/SàT settings"),
36 "icon_symbol": u"wrench", 36 "icon_symbol": "wrench",
37 } 37 }
38 38
39 39
40 class CagouSettings(quick_widgets.QuickWidget, cagou_widget.CagouWidget): 40 class CagouSettings(quick_widgets.QuickWidget, cagou_widget.CagouWidget):
41 # XXX: this class can't be called "Settings", because Kivy has already a class 41 # XXX: this class can't be called "Settings", because Kivy has already a class
58 def getParamsUICb(self, xmlui): 58 def getParamsUICb(self, xmlui):
59 G.host.actionManager({"xmlui": xmlui}, ui_show_cb=self.changeWidget, profile=self.profile) 59 G.host.actionManager({"xmlui": xmlui}, ui_show_cb=self.changeWidget, profile=self.profile)
60 60
61 def getParamsUIEb(self, failure): 61 def getParamsUIEb(self, failure):
62 self.changeWidget(Label( 62 self.changeWidget(Label(
63 text=_(u"Can't load parameters!"), 63 text=_("Can't load parameters!"),
64 bold=True, 64 bold=True,
65 color=(1,0,0,1))) 65 color=(1,0,0,1)))
66 G.host.showDialog(u"Can't load params UI", failure, "error") 66 G.host.showDialog("Can't load params UI", failure, "error")