diff frontends/src/primitivus/primitivus @ 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 a096b8579a3c
children 5968fd8d2248
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus	Mon Aug 11 19:10:24 2014 +0200
+++ b/frontends/src/primitivus/primitivus	Wed Aug 13 14:48:49 2014 +0200
@@ -33,7 +33,7 @@
 from sat_frontends.primitivus.profile_manager import ProfileManager
 from sat_frontends.primitivus.contact_list import ContactList
 from sat_frontends.primitivus.chat import Chat
-from sat_frontends.primitivus.xmlui import XMLUI
+from sat_frontends.primitivus import xmlui
 from sat_frontends.primitivus.progress import Progress
 from sat_frontends.primitivus.notify import Notify
 from sat_frontends.tools.misc import InputHistory
@@ -462,7 +462,7 @@
                 # action was a one shot, nothing to do
                 pass
             elif "xmlui" in data:
-                ui = XMLUI(self, xml_data=data['xmlui'])
+                ui = xmlui.create(self, xml_data=data['xmlui'])
                 ui.show()
             elif "authenticated_profile" in data:
                 assert("caller" in data)
@@ -529,7 +529,7 @@
                 title = _('Registration')
                 misc['target'] = data['target']
                 misc['action_back'] = self.bridge.gatewayRegister
-            ui = XMLUI(self, title=title, xml_data = data['xml'], misc = misc)
+            ui = xmlui.create(self, title=title, xml_data = data['xml'], misc = misc)
             if data['type'] == 'registration':
                 ui.show('popup')
             else:
@@ -573,7 +573,7 @@
 
     def onParam(self, menu):
         def success(params):
-            self.addWindow(XMLUI(self, xml_data=params))
+            self.addWindow(xmlui.create(self, xml_data=params))
 
         def failure(error):
             self.showPopUp(sat_widgets.Alert(_("Error"), _("Can't get parameters (%s)") % error, ok_cb=self.removePopUp))