Mercurial > libervia-backend
diff frontends/src/primitivus/chat.py @ 1106:e2e1e27a3680
frontends: XMLUI refactoring + dialogs:
- there are now XMLUIPanel and XMLUIDialog both inheriting from XMLUIBase
- following dialogs are managed:
- MessageDialog
- NoteDialog
- ConfirmDialog
- FileDialog
- XMLUI creation is now made using xmlui.create(...) instead of instanciating directly XMLUI
- classes must be registed in frontends
- "parent" attribute renamed to "_xmlui_parent" to avoid name conflicts with frontends toolkits
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 13 Aug 2014 14:48:49 +0200 |
parents | 11e2bb20e896 |
children | d1f6b927131e |
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py Mon Aug 11 19:10:24 2014 +0200 +++ b/frontends/src/primitivus/chat.py Wed Aug 13 14:48:49 2014 +0200 @@ -24,7 +24,7 @@ from sat_frontends.quick_frontend.quick_chat import QuickChat from sat_frontends.primitivus.card_game import CardGame from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate -from sat_frontends.primitivus.xmlui import XMLUI +from sat_frontends.primitivus import xmlui from sat_frontends.primitivus.constants import Const as C import time from sat.tools.jid import JID @@ -352,8 +352,8 @@ self.host.bridge.tarotGameCreate(self.id, list(self.occupants), self.host.profile) def onConfigureRoom(self, menu): - def gotUI(xmlui): - self.host.addWindow(XMLUI(self.host, xmlui)) + def gotUI(xml_ui): + self.host.addWindow(xmlui.create(self.host, xml_ui)) def configureError(failure): self.host.showPopUp(sat_widgets.Alert(failure.fullname, failure.message, ok_cb=self.host.removePopUp)) self.host.bridge.configureRoom(self.id, self.host.profile, callback=gotUI, errback=configureError)