Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-09-19 12:20:06 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-09-20 06:31:59 (GMT)
commit069eada75f23398b227affd5252e1408260ca354 (patch)
tree1e500b9cc464cc82ac39a75ef14f79fff55e7469 /src
parentcc64af8187b26a5aafa0c43d84c794ab071d8312 (diff)
Do not cache the buddy palette in friends tray, SL #3108
We need this in order to update the palette when we friend/unfriend a buddy to change the available options in the palette accordingly. We do the same for the buddy palette in the neighborhood view. The palette is made on demand as well. Signed-off-by: Simon Schampijer <simon@laptop.org> Reviewed-by: Marco Pesenti Gritti <marco@marcopg.org> Acked-By: Sascha Silbe <silbe@activitycentral.com>
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/frame/friendstray.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jarabe/frame/friendstray.py b/src/jarabe/frame/friendstray.py
index 4055340..26a279b 100644
--- a/src/jarabe/frame/friendstray.py
+++ b/src/jarabe/frame/friendstray.py
@@ -30,10 +30,15 @@ class FriendIcon(TrayIcon):
TrayIcon.__init__(self, icon_name='computer-xo',
xo_color=buddy.get_color())
+ self._buddy = buddy
self.set_palette_invoker(FrameWidgetInvoker(self))
- self.palette = BuddyMenu(buddy)
- self.palette.props.icon_visible = False
- self.palette.set_group_id('frame')
+ self.palette_invoker.cache_palette = False
+
+ def create_palette(self):
+ palette = BuddyMenu(self._buddy)
+ palette.props.icon_visible = False
+ palette.set_group_id('frame')
+ return palette
class FriendsTray(VTray):