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:53:27 (GMT)
commitaa889e81c7e8bd9a9df5c7fc27432a7335d2d905 (patch)
tree8063bc5985560382db045e0d9d07e5e2a071be7a
parente385144b67404de98ddcd74b99e4745bbe0d7834 (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