comparison frontends/wix/main_window.py @ 103:6be927a465ed

XMLUI refactoring, step 1
author Goffi <goffi@goffi.org>
date Wed, 23 Jun 2010 00:23:26 +0800
parents 94011f553cd0
children d2630fba8dfd
comparison
equal deleted inserted replaced
102:94011f553cd0 103:6be927a465ed
25 from quick_frontend.quick_contact_management import QuickContactManagement 25 from quick_frontend.quick_contact_management import QuickContactManagement
26 import wx 26 import wx
27 from contact_list import ContactList 27 from contact_list import ContactList
28 from chat import Chat 28 from chat import Chat
29 from param import Param 29 from param import Param
30 from form import Form 30 from xmlui import XMLUI
31 from gateways import GatewaysManager 31 from gateways import GatewaysManager
32 from profile import Profile 32 from profile import Profile
33 from profile_manager import ProfileManager 33 from profile_manager import ProfileManager
34 import gobject 34 import gobject
35 import os.path 35 import os.path
291 _('Error'), 291 _('Error'),
292 wx.OK | wx.ICON_ERROR 292 wx.OK | wx.ICON_ERROR
293 ) 293 )
294 dlg.ShowModal() 294 dlg.ShowModal()
295 dlg.Destroy() 295 dlg.Destroy()
296 elif type == "FORM": 296 elif type == "XMLUI":
297 self.current_action_ids.remove(id) 297 self.current_action_ids.remove(id)
298 debug (_("Form received")) 298 debug (_("XML user interface received"))
299 misc = {} 299 misc = {}
300 #FIXME FIXME FIXME: must clean all this crap ! 300 #FIXME FIXME FIXME: must clean all this crap !
301 title = _('Form') 301 title = _('Form')
302 if data['type'] == _('registration'): 302 if data['type'] == _('registration'):
303 title = 'Registration' 303 title = _('Registration')
304 misc['target'] = data['target'] 304 misc['target'] = data['target']
305 misc['action_back'] = self.bridge.gatewayRegister 305 misc['action_back'] = self.bridge.gatewayRegister
306 form=Form(self, title=title, xml_data = data['xml'], misc = misc) 306 XMLUI(self, title=title, xml_data = data['xml'], misc = misc)
307 elif type == "RESULT": 307 elif type == "RESULT":
308 self.current_action_ids.remove(id) 308 self.current_action_ids.remove(id)
309 if self.current_action_ids_cb.has_key(id): 309 if self.current_action_ids_cb.has_key(id):
310 callback = self.current_action_ids_cb[id] 310 callback = self.current_action_ids_cb[id]
311 del self.current_action_ids_cb[id] 311 del self.current_action_ids_cb[id]