Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
541:8b116fa42a31 | 542:3eeb6c865e4d |
---|---|
145 def plug_profile_3(self, autoconnect, profile): | 145 def plug_profile_3(self, autoconnect, profile): |
146 self.bridge.asyncGetParamA("Watched", "Misc", profile_key=profile, | 146 self.bridge.asyncGetParamA("Watched", "Misc", profile_key=profile, |
147 callback=lambda watched: self.plug_profile_4(watched, autoconnect, profile), errback=self._getParamError) | 147 callback=lambda watched: self.plug_profile_4(watched, autoconnect, profile), errback=self._getParamError) |
148 | 148 |
149 def plug_profile_4(self, watched, autoconnect, profile): | 149 def plug_profile_4(self, watched, autoconnect, profile): |
150 if autoconnect and not self.bridge.isConnected(profile): | |
151 #Does the user want autoconnection ? | |
152 self.bridge.connect(profile) | |
153 | |
150 self.profiles[profile]['watched'] = watched.split() #TODO: put this in a plugin | 154 self.profiles[profile]['watched'] = watched.split() #TODO: put this in a plugin |
151 | 155 |
152 ## misc ## | 156 ## misc ## |
153 self.profiles[profile]['onlineContact'] = set() #FIXME: temporary | 157 self.profiles[profile]['onlineContact'] = set() #FIXME: temporary |
154 | 158 |
184 for room_args in self.bridge.getRoomsJoined(profile): | 188 for room_args in self.bridge.getRoomsJoined(profile): |
185 self.roomJoined(*room_args, profile=profile) | 189 self.roomJoined(*room_args, profile=profile) |
186 | 190 |
187 for subject_args in self.bridge.getRoomsSubjects(profile): | 191 for subject_args in self.bridge.getRoomsSubjects(profile): |
188 self.roomNewSubject(*subject_args, profile=profile) | 192 self.roomNewSubject(*subject_args, profile=profile) |
189 | 193 |
190 if autoconnect and not self.bridge.isConnected(profile): | 194 #Finaly, we get the waiting confirmation requests |
191 #Does the user want autoconnection ? | 195 for confirm_id, confirm_type, data in self.bridge.getWaitingConf(profile): |
192 self.bridge.connect(profile) | 196 self.askConfirmation(confirm_id, confirm_type, data, profile) |
197 | |
193 | 198 |
194 | 199 |
195 def unplug_profile(self, profile): | 200 def unplug_profile(self, profile): |
196 """Tell the application to not follow anymore the profile""" | 201 """Tell the application to not follow anymore the profile""" |
197 if not profile in self.profiles: | 202 if not profile in self.profiles: |
544 if jid in self.contact_list: | 549 if jid in self.contact_list: |
545 filename = self.bridge.getAvatarFile(value) | 550 filename = self.bridge.getAvatarFile(value) |
546 self.contact_list.setCache(jid, 'avatar', filename) | 551 self.contact_list.setCache(jid, 'avatar', filename) |
547 self.contact_list.replace(jid) | 552 self.contact_list.replace(jid) |
548 | 553 |
549 def askConfirmation(self, type, id, data, profile): | 554 def askConfirmation(self, confirm_id, confirm_type, data, profile): |
550 raise NotImplementedError | 555 raise NotImplementedError |
551 | 556 |
552 def actionResult(self, type, id, data): | 557 def actionResult(self, type, id, data): |
553 raise NotImplementedError | 558 raise NotImplementedError |
554 | 559 |