diff frontends/wix/main_window.py @ 66:8147b4f40809

SàT: multi-profile: DBus signals and frontend adaptation (first draft) - Quick App: new single_profile parameter in __init__ (default: yes), used to tell if the application use only one profile at the time or not - Quick App: new __check_profile method, tell if the profile is used by the current frontend - Quick App: new methods plug_profile, unplug_profile and clear_profile, must be called by the frontend to tell which profiles to use - DBus Bridge: new methods getProfileName, getProfilesList and createProfile
author Goffi <goffi@goffi.org>
date Wed, 03 Feb 2010 23:35:57 +1100
parents d46f849664aa
children 0e50dd3a234a
line wrap: on
line diff
--- a/frontends/wix/main_window.py	Sun Jan 31 15:57:03 2010 +1100
+++ b/frontends/wix/main_window.py	Wed Feb 03 23:35:57 2010 +1100
@@ -223,6 +223,7 @@
         self.CM = QuickContactManagement() #FIXME: not the best place
 
 
+
         #Frame elements
         self.contactList = ContactList(self, self.CM)
         self.contactList.registerActivatedCB(self.onContactActivated)
@@ -253,6 +254,7 @@
         self.Bind(wx.EVT_CLOSE, self.onClose, self)
 
         QuickApp.__init__(self)
+        self.plug_profile()
         
         self.Show()
 
@@ -329,10 +331,6 @@
             self.tools.Disable()
         return
 
-
-    def presenceUpdate(self, jabber_id, show, priority, statuses):
-        QuickApp.presenceUpdate(self, jabber_id, show, priority, statuses)
-
     def askConfirmation(self, type, id, data):
         #TODO: refactor this in QuickApp
         debug ("Confirmation asked")
@@ -533,7 +531,7 @@
 
     def onFindGateways(self, e):
         debug("Find Gateways request")
-        id = self.bridge.findGateways(self.whoami.domain)
+        id = self.bridge.findGateways(self.profiles[self.profile]['whoami'].domain)
         self.current_action_ids.add(id)
         self.current_action_ids_cb[id] = self.onGatewaysFound