diff 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
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Sun Aug 28 18:23:55 2016 +0200
+++ b/frontends/src/quick_frontend/quick_app.py	Sun Aug 28 18:24:45 2016 +0200
@@ -280,7 +280,10 @@
 
     @property
     def visible_widgets(self):
-        """widgets currently visible (must be implemented by frontend)"""
+        """widgets currently visible (must be implemented by frontend)
+
+        @return (iter[QuickWidget]): iterable on visible widgets
+        """
         raise NotImplementedError
 
     def registerSignal(self, function_name, handler=None, iface="core", with_profile=True):
@@ -779,7 +782,7 @@
                 self.contact_lists[profile].setCache(entity, 'nick', value)
                 self.callListeners('nick', entity, value, profile=profile)
         elif key == "avatar":
-            if entity in self.contact_lists[profile]:
+            if value and entity in self.contact_lists[profile]:
                 def gotFilename(filename):
                     self.contact_lists[profile].setCache(entity, 'avatar', filename)
                     self.callListeners('avatar', entity, filename, profile=profile)