From 94bcf8000d1f451e5d4b4c2e237dfd31ddfbf7d9 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 4 Mar 2011 00:29:25 +0100 Subject: [PATCH] [sulfur] cache package theme icon too, this avoids resize glitches --- sulfur/src/sulfur/views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sulfur/src/sulfur/views.py b/sulfur/src/sulfur/views.py index 6140dd0b2..fee671921 100644 --- a/sulfur/src/sulfur/views.py +++ b/sulfur/src/sulfur/views.py @@ -2245,6 +2245,14 @@ class EntropyPackageView: if pixbuf is not None: cell.set_property('pixbuf', pixbuf) icon_theme_loaded = True + try: + repoid = pkg.repoid_clean + key = pkg.key + cache_key = (key, repoid,) + except (ProgrammingError, OperationalError): + cache_key = None + if cache_key is not None: + self.__pkg_ugc_icon_cache[cache_key] = pixbuf if not icon_theme_loaded: self.set_pixbuf_to_cell(cell, self.ugc_generic_icon,