frontends: incoming files transfer management:

- quick app: getWaitingConf is used on profile connexion
    - primitivus: askConfirmation is now managed, use new 'dir' style of FileDialog
This commit is contained in:
Goffi 2012-11-14 20:37:15 +01:00
commit 297b439369

View file

@ -147,6 +147,10 @@ class QuickApp(object):
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 @@ class QuickApp(object):
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 @@ class QuickApp(object):
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):