Fixing vod thumbnailer; handling signal removal on tab close
+ more attempts at leak fixes; thumbnailer plugin updates and corrections
This commit is contained in:
@@ -50,8 +50,8 @@ class Icon(DesktopIconMixin, VideoIconMixin, MeshsIconMixin):
|
||||
|
||||
if not thumbnl:
|
||||
# TODO: Detect if not in a thread and use directly for speed get_system_thumbnail
|
||||
thumbnl = self.get_system_thumbnail(full_path, self.sys_icon_wh[0])
|
||||
# thumbnl = self._get_system_thumbnail_gtk_thread(full_path, self.sys_icon_wh[0])
|
||||
# thumbnl = self.get_system_thumbnail(full_path, self.sys_icon_wh[0])
|
||||
thumbnl = self._get_system_thumbnail_gtk_thread(full_path, self.sys_icon_wh[0])
|
||||
if not thumbnl:
|
||||
raise IconException("No known icons found.")
|
||||
|
||||
@@ -144,6 +144,8 @@ class Icon(DesktopIconMixin, VideoIconMixin, MeshsIconMixin):
|
||||
event = threading.Event()
|
||||
GLib.idle_add(_call_gtk_thread, event, result)
|
||||
event.wait()
|
||||
|
||||
event = None
|
||||
return result[0]
|
||||
|
||||
|
||||
@@ -156,6 +158,7 @@ class Icon(DesktopIconMixin, VideoIconMixin, MeshsIconMixin):
|
||||
|
||||
if data:
|
||||
icon_path = data.get_filename()
|
||||
|
||||
return GdkPixbuf.Pixbuf.new_from_file_at_size(icon_path, width = size, height = size)
|
||||
|
||||
raise IconException("No system icon found...")
|
||||
@@ -202,4 +205,4 @@ class Icon(DesktopIconMixin, VideoIconMixin, MeshsIconMixin):
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB,
|
||||
False, 8, w, h, w * 3)
|
||||
|
||||
return pixbuf.scale_simple(wxh[0], wxh[1], 2) # BILINEAR = 2
|
||||
return pixbuf.scale_simple(wxh[0], wxh[1], 2) # BILINEAR = 2
|
||||
|
||||
Reference in New Issue
Block a user