comparison frontends/wix/main_window.py @ 91:39c672544593

Tarot: bidding phase - quick_app: command line is now parsed, "profile" option allow to select it - xml_tools: list-single is now managed - plugin tarot: method and signal to manage contract (contrat): tarotChooseContrat & tarotGameContratChoosed - wix: Q&D Form hack to manage more generic form (not only registration), used to show contract selection form
author Goffi <goffi@goffi.org>
date Thu, 27 May 2010 19:26:19 +0930
parents 4020931569b8
children 783e9d6980ec
comparison
equal deleted inserted replaced
90:4020931569b8 91:39c672544593
107 107
108 #profile panel 108 #profile panel
109 self.profile_pan = ProfileManager(self) 109 self.profile_pan = ProfileManager(self)
110 #self.profile_pan.Hide() #gof: 110 #self.profile_pan.Hide() #gof:
111 self.sizer.Add(self.profile_pan, 1, flag=wx.EXPAND) 111 self.sizer.Add(self.profile_pan, 1, flag=wx.EXPAND)
112 if self.options.profile: #TODO: move this to quick_app
113 self.plug_profile(self.options.profile)
114
112 115
113 #Tarot = CardGame(self)
114 #Tarot.Show()#gof: temp for test
115
116 self.Show() 116 self.Show()
117 117
118 def plug_profile(self, profile_key='@DEFAULT@'): 118 def plug_profile(self, profile_key='@DEFAULT@'):
119 """Hide profile panel then plug profile""" 119 """Hide profile panel then plug profile"""
120 debug (_('plugin profile %s' % profile_key)) 120 debug (_('plugin profile %s' % profile_key))
267 dlg.ShowModal() 267 dlg.ShowModal()
268 dlg.Destroy() 268 dlg.Destroy()
269 elif type == "FORM": 269 elif type == "FORM":
270 self.current_action_ids.remove(id) 270 self.current_action_ids.remove(id)
271 debug (_("Form received")) 271 debug (_("Form received"))
272 form=Form(self, title=_('Registration'), target = data['target'], type = data['type'], xml_data = data['xml']) 272 misc = {}
273 #FIXME FIXME FIXME: must clean all this crap !
274 title = _('Form')
275 if data['type'] == _('registration'):
276 title = 'Registration'
277 misc['target'] = data['target']
278 misc['action_back'] = self.bridge.gatewayRegister
279 form=Form(self, title=title, xml_data = data['xml'], misc = misc)
273 elif type == "RESULT": 280 elif type == "RESULT":
274 self.current_action_ids.remove(id) 281 self.current_action_ids.remove(id)
275 if self.current_action_ids_cb.has_key(id): 282 if self.current_action_ids_cb.has_key(id):
276 callback = self.current_action_ids_cb[id] 283 callback = self.current_action_ids_cb[id]
277 del self.current_action_ids_cb[id] 284 del self.current_action_ids_cb[id]