comparison frontends/primitivus/xmlui.py @ 157:13888bdb72b6

primitivus: button are now working with XMLUI
author Goffi <goffi@goffi.org>
date Wed, 04 Aug 2010 12:01:07 +0800
parents b1f1955d96b3
children ae50b53ff868
comparison
equal deleted inserted replaced
156:a216dfbb0d50 157:13888bdb72b6
173 173
174 174
175 ##EVENTS## 175 ##EVENTS##
176 176
177 def onButtonPress(self, button): 177 def onButtonPress(self, button):
178 self.host.debug() 178 callback_id, fields = button.param_id
179 data = {"callback_id":callback_id}
180 for field in fields:
181 ctrl = self.ctrl_list[field]
182 if isinstance(ctrl['control'],custom_widgets.List):
183 data[field] = '\t'.join(ctrl['control'].getSelectedValues())
184 else:
185 data[field] = ctrl['control'].getValue()
186
187 id = self.host.bridge.launchAction("button", data, profile_key = self.host.profile)
188 self.host.current_action_ids.add(id)
179 189
180 def onFormSubmitted(self, button): 190 def onFormSubmitted(self, button):
181 data = [] 191 data = []
182 for ctrl_name in self.ctrl_list: 192 for ctrl_name in self.ctrl_list:
183 ctrl = self.ctrl_list[ctrl_name] 193 ctrl = self.ctrl_list[ctrl_name]