comparison frontends/src/primitivus/gateways.py @ 546:9dd297c513b4

primitivus: fixed actionResult call (fix gateways management)
author Goffi <goffi@goffi.org>
date Wed, 14 Nov 2012 21:31:38 +0100
parents 2a072735e459
children ca13633d3b6b
comparison
equal deleted inserted replaced
545:8f88ae7ed886 546:9dd297c513b4
50 server = self.ext_serv.get_edit_text() 50 server = self.ext_serv.get_edit_text()
51 if not server: 51 if not server:
52 popup = sat_widgets.Alert(_("Error"), _("You must enter an external server JID"), ok_cb=self.host.removePopUp) 52 popup = sat_widgets.Alert(_("Error"), _("You must enter an external server JID"), ok_cb=self.host.removePopUp)
53 self.host.showPopUp(popup) 53 self.host.showPopUp(popup)
54 return 54 return
55 id = self.host.bridge.findGateways(server, self.host.profile) 55 action_id = self.host.bridge.findGateways(server, self.host.profile)
56 self.host.current_action_ids.add(id) 56 self.host.current_action_ids.add(action_id)
57 self.host.current_action_ids_cb[id] = self.host.onGatewaysFound 57 self.host.current_action_ids_cb[action_id] = self.host.onGatewaysFound
58 self.host.removeWindow() 58 self.host.removeWindow()
59 59
60 def addGateway(self, widget_list, gateway, param): 60 def addGateway(self, widget_list, gateway, param):
61 61
62 widget_col = [] 62 widget_col = []
76 widget_list.append(urwid.Columns(widget_col,1)) 76 widget_list.append(urwid.Columns(widget_col,1))
77 77
78 def onRegister(self, button): 78 def onRegister(self, button):
79 """Called when register button is clicked""" 79 """Called when register button is clicked"""
80 gateway_jid = button.gateway_jid 80 gateway_jid = button.gateway_jid
81 id = self.host.bridge.in_band_register(gateway_jid, self.host.profile) 81 action_id = self.host.bridge.in_band_register(gateway_jid, self.host.profile)
82 self.host.current_action_ids.add(id) 82 self.host.current_action_ids.add(action_id)
83 83
84 def onUnregister(self, button): 84 def onUnregister(self, button):
85 """Called when unregister button is clicked""" 85 """Called when unregister button is clicked"""
86 gateway_jid = button.gateway_jid 86 gateway_jid = button.gateway_jid
87 id = self.host.bridge.gatewayRegister("CANCEL",gateway_jid, None, self.host.profile) 87 action_id = self.host.bridge.gatewayRegister("CANCEL",gateway_jid, None, self.host.profile)
88 self.host.current_action_ids.add(id) 88 self.host.current_action_ids.add(action_id)