Generate thumbnails in the background
This commit is contained in:
parent
1b75a2527a
commit
e7ee70e69f
1 changed files with 8 additions and 0 deletions
|
@ -459,6 +459,14 @@ class MainWindow(Gtk.ApplicationWindow, Watcher):
|
||||||
texture = Gdk.Texture.new_from_bytes(gbytes)
|
texture = Gdk.Texture.new_from_bytes(gbytes)
|
||||||
self.thumbnail_picture.set_paintable(texture)
|
self.thumbnail_picture.set_paintable(texture)
|
||||||
|
|
||||||
|
if self.thumbnailer._work_queue.empty():
|
||||||
|
for i in range(self.list_model.get_n_items()):
|
||||||
|
if item := self.list_model.get_item(i):
|
||||||
|
assert isinstance(item, FileItem)
|
||||||
|
if not item.thumbnail.value:
|
||||||
|
self.thumbnailer.generate_thumbnail(item)
|
||||||
|
break
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _populate_file_list(self) -> None:
|
def _populate_file_list(self) -> None:
|
||||||
|
|
Loading…
Reference in a new issue