Mercurial > libervia-web
comparison src/browser/sat_browser/menu.py @ 500:67a4e8383b70
browser side (XMLUI): XMLUI update to follow core changes:
- Dialogs are now managed
- FileDialog raise a NotImplementedError, it's not yet possible in Libervia
- XMLUIPanel.show is implemented
- following core changes, we now create an XMLUI with xmlui.create(...)
- WidgetFactory now inherit from GenericFactory
- workaround for __getattr__ bug in pyjamas, now createXXX are automaticaly created with inspection
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Aug 2014 14:09:09 +0200 |
parents | 60be99de3808 |
children | 4aa627b059df |
comparison
equal
deleted
inserted
replaced
499:ec3f30253040 | 500:67a4e8383b70 |
---|---|
171 | 171 |
172 def onAccount(self): | 172 def onAccount(self): |
173 def gotUI(xml_ui): | 173 def gotUI(xml_ui): |
174 if not xml_ui: | 174 if not xml_ui: |
175 return | 175 return |
176 body = xmlui.XMLUI(self.host, xml_ui) | 176 body = xmlui.create(self.host, xml_ui) |
177 _dialog = dialog.GenericDialog("Manage your account", body, options=['NO_CLOSE']) | 177 _dialog = dialog.GenericDialog("Manage your account", body, options=['NO_CLOSE']) |
178 body.setCloseCb(_dialog.close) | 178 body.setCloseCb(_dialog.close) |
179 _dialog.show() | 179 _dialog.show() |
180 self.host.bridge.call('getAccountDialogUI', gotUI) | 180 self.host.bridge.call('getAccountDialogUI', gotUI) |
181 | 181 |
182 def onParameters(self): | 182 def onParameters(self): |
183 def gotParams(xml_ui): | 183 def gotParams(xml_ui): |
184 if not xml_ui: | 184 if not xml_ui: |
185 return | 185 return |
186 body = xmlui.XMLUI(self.host, xml_ui) | 186 body = xmlui.create(self.host, xml_ui) |
187 _dialog = dialog.GenericDialog("Parameters", body, options=['NO_CLOSE']) | 187 _dialog = dialog.GenericDialog("Parameters", body, options=['NO_CLOSE']) |
188 body.setCloseCb(_dialog.close) | 188 body.setCloseCb(_dialog.close) |
189 _dialog.setSize('80%', '80%') | 189 _dialog.setSize('80%', '80%') |
190 _dialog.show() | 190 _dialog.show() |
191 self.host.bridge.call('getParamsUI', gotParams) | 191 self.host.bridge.call('getParamsUI', gotParams) |