diff frontends/src/quick_frontend/quick_app.py @ 542:3eeb6c865e4d

frontends: incoming files transfer management: - quick app: getWaitingConf is used on profile connexion - primitivus: askConfirmation is now managed, use new 'dir' style of FileDialog
author Goffi <goffi@goffi.org>
date Wed, 14 Nov 2012 20:37:15 +0100
parents 2c4016921403
children 97f6a445d6e8
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Wed Nov 14 20:24:28 2012 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Wed Nov 14 20:37:15 2012 +0100
@@ -147,6 +147,10 @@
                                    callback=lambda watched: self.plug_profile_4(watched, autoconnect, profile), errback=self._getParamError)
 
     def plug_profile_4(self, watched, autoconnect, profile):
+        if autoconnect and not self.bridge.isConnected(profile):
+            #Does the user want autoconnection ?
+            self.bridge.connect(profile)
+
         self.profiles[profile]['watched'] = watched.split() #TODO: put this in a plugin
 
         ## misc ##
@@ -186,10 +190,11 @@
 
             for subject_args in self.bridge.getRoomsSubjects(profile):
                 self.roomNewSubject(*subject_args, profile=profile)
-        
-        if autoconnect and not self.bridge.isConnected(profile):
-            #Does the user want autoconnection ?
-            self.bridge.connect(profile)
+
+            #Finaly, we get the waiting confirmation requests
+            for confirm_id, confirm_type, data in self.bridge.getWaitingConf(profile):
+                self.askConfirmation(confirm_id, confirm_type, data, profile)
+
         
 
     def unplug_profile(self, profile):
@@ -546,7 +551,7 @@
                 self.contact_list.setCache(jid, 'avatar', filename)
                 self.contact_list.replace(jid)
 
-    def askConfirmation(self, type, id, data, profile):
+    def askConfirmation(self, confirm_id, confirm_type, data, profile):
         raise NotImplementedError
     
     def actionResult(self, type, id, data):