From 01f1f31f10abe8fd1e09462da1f65c5afef05ca4 Mon Sep 17 00:00:00 2001 From: kramo Date: Tue, 22 Aug 2023 12:01:21 +0200 Subject: [PATCH] Add pixmaps to icon search paths --- src/importer/sources/desktop_source.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/importer/sources/desktop_source.py b/src/importer/sources/desktop_source.py index a9fdcf5..8ea7dbf 100644 --- a/src/importer/sources/desktop_source.py +++ b/src/importer/sources/desktop_source.py @@ -41,13 +41,20 @@ class DesktopSourceIterable(SourceIterable): icon_theme = Gtk.IconTheme.new() search_paths = GLib.get_system_data_dirs() + [ + "/usr/share/pixmaps", "/run/host/usr/share", "/run/host/usr/local/share", + "/run/host/usr/share/pixmaps", shared.home / ".local" / "share", ] for search_path in search_paths: - if not (path := Path(search_path) / "icons").exists(): + path = Path(search_path) + + if not str(search_path).endswith("/pixmaps"): + path = path / "icons" + + if not path.is_dir(): continue if str(path).startswith("/app/"):