Small fixes

This commit is contained in:
2022-06-18 22:27:17 -05:00
parent 793621745a
commit 111c535876
5 changed files with 28 additions and 35 deletions

View File

@@ -62,7 +62,7 @@ class Controller(UIMixin, KeyboardSignalsMixin, IPCSignalsMixin, ExceptionHookMi
Gtk.main_quit()
@threaded
@daemon_threaded
def gui_event_observer(self):
while True:
time.sleep(event_sleep_time)

View File

@@ -43,13 +43,6 @@ class GridMixin:
GLib.idle_add(self.update_store, *(i, store, icon, tab, dir, file,))
def update_store(self, i, store, icon, tab, dir, file):
while True:
try:
itr = store.get_iter(i)
break
except:
pass
if not icon:
path = f"{dir}/{file}"
icon = self.get_system_thumbnail(path, tab.sys_icon_wh[0])
@@ -57,6 +50,7 @@ class GridMixin:
if not icon:
icon = GdkPixbuf.Pixbuf.new_from_file(tab.DEFAULT_ICON)
itr = store.get_iter(i)
store.set_value(itr, 0, icon)
def get_system_thumbnail(self, filename, size):