bigboard r7385 - in trunk/bigboard/stocks: apps search



Author: otaylor
Date: Wed Jun 18 21:54:04 2008
New Revision: 7385
URL: http://svn.gnome.org/viewvc/bigboard?rev=7385&view=rev

Log:
Fix display of icons for local apps in search results

Modified:
   trunk/bigboard/stocks/apps/apps.py
   trunk/bigboard/stocks/search/SearchStock.py

Modified: trunk/bigboard/stocks/apps/apps.py
==============================================================================
--- trunk/bigboard/stocks/apps/apps.py	(original)
+++ trunk/bigboard/stocks/apps/apps.py	Wed Jun 18 21:54:04 2008
@@ -659,6 +659,13 @@
 
     def get_icon(self):
         """Returns an icon for the result"""
+        if self.__app.get_icon_url():
+            # Return None so that the the icon URL is used; this matches
+            # what we show in the browser
+            return None
+        else:
+            return self.__app.get_local_pixbuf()
+        
         return None
     
     def get_icon_url(self):

Modified: trunk/bigboard/stocks/search/SearchStock.py
==============================================================================
--- trunk/bigboard/stocks/search/SearchStock.py	(original)
+++ trunk/bigboard/stocks/search/SearchStock.py	Wed Jun 18 21:54:04 2008
@@ -359,8 +359,7 @@
                 self.__added_headings.add(heading)
 
             icon = r.get_icon()
-            icon_is_url = False
-            if icon and icon.startswith(os.sep):
+            if icon and isinstance(icon, basestring) and icon.startswith(os.sep):
                 icon = gtk.gdk.pixbuf_new_from_file_at_size(icon, _ICON_SIZE, _ICON_SIZE)
             icon_url = r.get_icon_url()
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]