bigboard r7384 - in branches/bigboard-0-5/bigboard/stocks: apps search



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

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

Modified:
   branches/bigboard-0-5/bigboard/stocks/apps/apps.py
   branches/bigboard-0-5/bigboard/stocks/search/SearchStock.py

Modified: branches/bigboard-0-5/bigboard/stocks/apps/apps.py
==============================================================================
--- branches/bigboard-0-5/bigboard/stocks/apps/apps.py	(original)
+++ branches/bigboard-0-5/bigboard/stocks/apps/apps.py	Wed Jun 18 21:53:57 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: branches/bigboard-0-5/bigboard/stocks/search/SearchStock.py
==============================================================================
--- branches/bigboard-0-5/bigboard/stocks/search/SearchStock.py	(original)
+++ branches/bigboard-0-5/bigboard/stocks/search/SearchStock.py	Wed Jun 18 21:53:57 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]