Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-03-24 20:06:50 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-03-31 15:43:59 (GMT)
commit98d61eebf274a3d2aea4f5c924e30bc74967307e (patch)
treed6abe492c7755f1a9bde2cb92ed869294da17162
parentac626ffa64f391d815a85731b508fce385eeae57 (diff)
Cache the XO palette in the Home View, part of #2726
Since we do not cache the palette for the BuddyIcon anymore, we as well do not cache the Owner palette in the Favorites view. The current code tries to change the register menu (school server) in the palette when successfully registered (label it 'register again'). But the palette has been destroyed and therefore this attempt fails. The patch does cache the palette of the Owner, this has been the behavior before 356641c332d6cc889b265dfc29598004cf37763c. As registering (and therefore the change of the palette) happens rather seldom compared to the change of a buddy palette, I think the Owner palette can be considered to be mostly static and therefore we can cache it. Signed-off-by: Simon Schampijer <simon@laptop.org> Acked-by: Sascha Silbe <silbe@activitycentral.com>
-rw-r--r--src/jarabe/desktop/favoritesview.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index b4a4e75..b609b1b 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -610,6 +610,8 @@ class OwnerIcon(BuddyIcon):
def __init__(self, size):
BuddyIcon.__init__(self, buddy=get_owner_instance(), size=size)
+ self.palette_invoker.cache_palette = True
+
self._palette_enabled = False
self._register_menu = None