From 361fe5d1937bf2220e7e35a7e26fbd2a6b0a2d83 Mon Sep 17 00:00:00 2001 From: kotontrion Date: Tue, 26 Nov 2024 09:44:39 +0100 Subject: tray: workaround for icon name as path --- lib/tray/trayItem.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/tray/trayItem.vala') diff --git a/lib/tray/trayItem.vala b/lib/tray/trayItem.vala index be221bf..d1de0c3 100644 --- a/lib/tray/trayItem.vala +++ b/lib/tray/trayItem.vala @@ -239,7 +239,10 @@ public class TrayItem : Object { private void update_gicon() { if(icon_name != null && icon_name != "") { - if(icon_theme_path != null && icon_theme_path != "") { + if(GLib.FileUtils.test(icon_name, GLib.FileTest.EXISTS)) { + gicon = new GLib.FileIcon(GLib.File.new_for_path(icon_name)); + } + else if(icon_theme_path != null && icon_theme_path != "") { gicon = new GLib.FileIcon(GLib.File.new_for_path( find_icon_in_theme(icon_name, icon_theme_path))); } else { -- cgit v1.2.3