Mercurial > libervia-backend
diff frontends/wix/gateways.py @ 30:d6b613764dd7
new plugin for xep 0077 (In-Band registration): first draft
- wix: register in gateways manager now call the in-band registration process
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 08 Dec 2009 04:19:41 +0100 |
parents | df3b0b5ac49e |
children | c45deebb40a5 |
line wrap: on
line diff
--- a/frontends/wix/gateways.py Tue Dec 08 02:31:35 2009 +0100 +++ b/frontends/wix/gateways.py Tue Dec 08 04:19:41 2009 +0100 @@ -116,9 +116,19 @@ type_label.SetFont(self.italic_font) #The buttons + def register_cb(event): + """Called when register button is clicked""" + gateway_jid = event.GetEventObject().gateway_jid + id = self.host.bridge.in_band_register(gateway_jid) + self.host.current_action_ids.add(id) + print "register id:",id + event.Skip() + button_font = wx.Font(6, wx.DEFAULT, wx.NORMAL, wx.BOLD) reg_button = wx.Button(self.panel, -1, "Register", size=wx.Size(-1, 8)) reg_button.SetFont(button_font) + reg_button.gateway_jid = JID(gateway) + self.panel.Bind(wx.EVT_BUTTON, register_cb, reg_button) self.panel.sizer.Add(im_icon) self.panel.sizer.Add(label)