comparison frontends/src/quick_frontend/quick_app.py @ 2049:b67aece4a667

quick frontend (app): avatar filename is not requested anymore if value is empty
author Goffi <goffi@goffi.org>
date Sun, 28 Aug 2016 18:24:45 +0200
parents 2e948c228643
children 046449cc2bff
comparison
equal deleted inserted replaced
2048:aff318d4a786 2049:b67aece4a667
278 except (TypeError, AttributeError): 278 except (TypeError, AttributeError):
279 return self.profiles.chooseOneProfile() 279 return self.profiles.chooseOneProfile()
280 280
281 @property 281 @property
282 def visible_widgets(self): 282 def visible_widgets(self):
283 """widgets currently visible (must be implemented by frontend)""" 283 """widgets currently visible (must be implemented by frontend)
284
285 @return (iter[QuickWidget]): iterable on visible widgets
286 """
284 raise NotImplementedError 287 raise NotImplementedError
285 288
286 def registerSignal(self, function_name, handler=None, iface="core", with_profile=True): 289 def registerSignal(self, function_name, handler=None, iface="core", with_profile=True):
287 """Register a handler for a signal 290 """Register a handler for a signal
288 291
777 if key == "nick": # this is the roster nick, not the MUC nick 780 if key == "nick": # this is the roster nick, not the MUC nick
778 if entity in self.contact_lists[profile]: 781 if entity in self.contact_lists[profile]:
779 self.contact_lists[profile].setCache(entity, 'nick', value) 782 self.contact_lists[profile].setCache(entity, 'nick', value)
780 self.callListeners('nick', entity, value, profile=profile) 783 self.callListeners('nick', entity, value, profile=profile)
781 elif key == "avatar": 784 elif key == "avatar":
782 if entity in self.contact_lists[profile]: 785 if value and entity in self.contact_lists[profile]:
783 def gotFilename(filename): 786 def gotFilename(filename):
784 self.contact_lists[profile].setCache(entity, 'avatar', filename) 787 self.contact_lists[profile].setCache(entity, 'avatar', filename)
785 self.callListeners('avatar', entity, filename, profile=profile) 788 self.callListeners('avatar', entity, filename, profile=profile)
786 self.bridge.getAvatarFile(value, callback=gotFilename) 789 self.bridge.getAvatarFile(value, callback=gotFilename)
787 790