diff frontends/src/wix/main_window.py @ 807:be4c5e24dab9

plugin XEP-0077, plugin XEP-0100, frontends: gateways have been entirely implemented in backend using the new refactored XMLUI and AdvancedListContainer. The now useless code has been removed from frontends.
author Goffi <goffi@goffi.org>
date Tue, 04 Feb 2014 18:26:03 +0100
parents 9007bb133009
children 1fe00f0c9a91
line wrap: on
line diff
--- a/frontends/src/wix/main_window.py	Tue Feb 04 18:24:27 2014 +0100
+++ b/frontends/src/wix/main_window.py	Tue Feb 04 18:26:03 2014 +0100
@@ -25,7 +25,6 @@
 from sat_frontends.wix.contact_list import ContactList
 from sat_frontends.wix.chat import Chat
 from sat_frontends.wix.xmlui import XMLUI
-from sat_frontends.wix.gateways import GatewaysManager
 from sat_frontends.wix.profile import Profile
 from sat_frontends.wix.profile_manager import ProfileManager
 import os.path
@@ -42,7 +41,7 @@
 idREMOVE_CONTACT,\
 idSHOW_PROFILE,\
 idJOIN_ROOM,\
-idFIND_GATEWAYS = range(10)
+= range(9)
 
 class ChatList(QuickChatList):
     """This class manage the list of chat windows"""
@@ -131,7 +130,6 @@
         contactMenu.Append(idSHOW_PROFILE, _("&Show profile"), _(" Show contact's profile"))
         communicationMenu = wx.Menu()
         communicationMenu.Append(idJOIN_ROOM, _("&Join Room"),_(" Join a Multi-User Chat room"))
-        communicationMenu.Append(idFIND_GATEWAYS, _("&Find Gateways"),_(" Find gateways to legacy IM"))
         self.menuBar = wx.MenuBar()
         self.menuBar.Append(connectMenu,_("&General"))
         self.menuBar.Append(contactMenu,_("&Contacts"))
@@ -176,8 +174,6 @@
         wx.EVT_MENU(self, idREMOVE_CONTACT, self.onRemoveContact)
         wx.EVT_MENU(self, idSHOW_PROFILE, self.onShowProfile)
         wx.EVT_MENU(self, idJOIN_ROOM, self.onJoinRoom)
-        wx.EVT_MENU(self, idFIND_GATEWAYS, self.onFindGateways)
-
 
     def newMessage(self, from_jid, to_jid, msg, _type, extra, profile):
         QuickApp.newMessage(self, from_jid, to_jid, msg, _type, extra, profile)
@@ -511,18 +507,6 @@
             else:
                 error (_("'%s' is an invalid JID !"), room_jid)
 
-    def onFindGateways(self, e):
-        debug(_("Find Gateways request"))
-        _id = self.bridge.findGateways(self.profiles[self.profile]['whoami'].domain, self.profile)
-        self.current_action_ids.add(_id)
-        self.current_action_ids_cb[_id] = self.onGatewaysFound
-
-    def onGatewaysFound(self, data):
-        """Called when SàT has found the server gateways"""
-        target = data['__private__']['target']
-        del data['__private__']
-        gatewayManager = GatewaysManager(self, data, server=target)
-
     def onClose(self, e):
         QuickApp.onExit(self)
         info(_("Exiting..."))