From 2e4c72dea3bc4d94bf3eb46eafaf85b4d6392f35 Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Sun, 2 Aug 2026 13:37:10 +0545 Subject: [PATCH] refactor(gtk_utils): drop unused thumbnail loader --- src/utils/gtk_utils.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/utils/gtk_utils.py b/src/utils/gtk_utils.py index 04311c0..85bac06 100644 --- a/src/utils/gtk_utils.py +++ b/src/utils/gtk_utils.py @@ -5,7 +5,6 @@ from typing import Literal from fabric.utils import ( Gdk, - GdkPixbuf, GLib, bulk_connect, exec_shell_command_async, @@ -175,21 +174,3 @@ class EvdevLEDMonitor: except OSError as e: logger.warning(f"[utils] os.close(self._fd) failed: {e}") self._fd = None - - -def load_pixbuf_thumbnail( - path: str, width: int, height: int, *, fallback: str | None = None -) -> GdkPixbuf.Pixbuf | None: - """Load a pixbuf scaled to fit within *width* x *height*. - - Returns ``None`` on failure (file missing, corrupt, etc.). Pass a - *fallback* path to try that on failure too. - """ - for p in (path, fallback): - if p is None: - continue - try: - return GdkPixbuf.Pixbuf.new_from_file_at_scale(p, width, height, True) - except Exception as e: - logger.warning(f"[gtk_utils] Failed to load pixbuf from {p}: {e}") - return None