From 98d61eebf274a3d2aea4f5c924e30bc74967307e Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Thu, 24 Mar 2011 20:06:50 +0000 Subject: 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 Acked-by: Sascha Silbe --- (limited to 'src') 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 -- cgit v0.9.1