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
This commit is contained in:
Goffi 2010-02-03 23:35:57 +11:00
commit ca242c7aee

View file

@ -223,6 +223,7 @@ class MainWindow(wx.Frame, QuickApp):
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 @@ class MainWindow(wx.Frame, QuickApp):
self.Bind(wx.EVT_CLOSE, self.onClose, self)
QuickApp.__init__(self)
self.plug_profile()
self.Show()
@ -329,10 +331,6 @@ class MainWindow(wx.Frame, QuickApp):
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 @@ class MainWindow(wx.Frame, QuickApp):
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