diff frontends/src/primitivus/primitivus @ 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 5174657b3378
children 1fe00f0c9a91
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus	Tue Feb 04 18:24:27 2014 +0100
+++ b/frontends/src/primitivus/primitivus	Tue Feb 04 18:26:03 2014 +0100
@@ -28,7 +28,6 @@
 from sat_frontends.primitivus.profile_manager import ProfileManager
 from sat_frontends.primitivus.contact_list import ContactList
 from sat_frontends.primitivus.chat import Chat
-from sat_frontends.primitivus.gateways import GatewaysManager
 from sat_frontends.primitivus.xmlui import XMLUI
 from sat_frontends.primitivus.progress import Progress
 from sat_frontends.primitivus.notify import Notify
@@ -294,7 +293,6 @@
         menu.addMenu(contact, _("Remove contact"), self.onRemoveContactRequest)
         communication = _("Communication")
         menu.addMenu(communication, _("Join room"), self.onJoinRoomRequest, 'meta j')
-        menu.addMenu(communication, _("Find Gateways"), self.onFindGatewaysRequest, 'meta g')
         #additionals menus
         #FIXME: do this in a more generic way (in quickapp)
         add_menus = self.bridge.getMenus('', Const.NO_SECURITY_LIMIT)
@@ -496,6 +494,7 @@
             self.showPopUp(pop_up_widget)
 
     def actionResult(self, type, id, data, profile):
+        # FIXME: to be removed
         if not self.check_profile(profile):
             return
 
@@ -588,12 +587,6 @@
         pop_up_widget = sat_widgets.InputDialog(_("Entering a MUC room"), _("Please enter MUC's JID"), default_txt = 'room@muc_service.server.tld', cancel_cb=self.removePopUp, ok_cb=self.onJoinRoom)
         self.showPopUp(pop_up_widget)
 
-    def onFindGatewaysRequest(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 onAddContactRequest(self, menu):
         pop_up_widget = sat_widgets.InputDialog(_("Adding a contact"), _("Please enter new contact JID"), default_txt = 'name@server.tld', cancel_cb=self.removePopUp, ok_cb=self.onAddContact)
         self.showPopUp(pop_up_widget)
@@ -611,13 +604,6 @@
 
     #MISC CALLBACKS#
 
-    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)
-        self.addWindow(gatewayManager)
-
     def chatStateReceived(self, from_jid_s, state, profile):
         """Signal observer to display a contact chat state
         @param from_jid_s: contact who sent his new state