(self, uuid, ui_scale)
gets the icon  for a given uuid
gets the icon  for a given uuid
gets the icon for a given uuid
def get_icon_surface(self, uuid, ui_scale):
        """ gets the icon  for a given uuid"""
        try:
            pixbuf = None

            paths = SpicePathSet(self.index_cache[uuid], spice_type=self.spice_type)

            if self.themes:
                pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(paths.thumb_local_path, 100 * ui_scale, -1, True)
            else:
                pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(paths.thumb_local_path, 24 * ui_scale, 24 * ui_scale, True)

            if pixbuf == None:
                raise Exception

            surf = Gdk.cairo_surface_create_from_pixbuf(pixbuf, ui_scale, None)
            return Gtk.Image.new_from_surface (surf)
        except Exception as e:
            debug("There was an error processing one of the images. Try refreshing the cache.")
            return Gtk.Image.new_from_icon_name('image-missing', Gtk.IconSize.LARGE_TOOLBAR)
def get_icon_surface ( self , uuid , ui_scale ) : try : pixbuf = None paths = SpicePathSet ( self . index_cache [ uuid ] , spice_type = self . spice_type ) if self . themes : pixbuf = GdkPixbuf . Pixbuf . new_from_file_at_scale ( paths . thumb_local_path , 100 * ui_scale , - 1 , True ) else : pixbuf = GdkPixbuf . Pixbuf . new_from_file_at_scale ( paths . thumb_local_path , 24 * ui_scale , 24 * ui_scale , True ) if pixbuf == None : raise Exception surf = Gdk . cairo_surface_create_from_pixbuf ( pixbuf , ui_scale , None ) return Gtk . Image . new_from_surface ( surf ) except Exception as e : debug ( "There was an error processing one of the images. Try refreshing the cache." ) return Gtk . Image . new_from_icon_name ( 'image-missing' , Gtk . IconSize . LARGE_TOOLBAR )