diff options
author | 2010-11-06 22:06:11 +0100 | |
---|---|---|
committer | 2010-11-06 22:06:11 +0100 | |
commit | 2f69394c564c9c8b30e5b523c310cda9624c5500 (patch) | |
tree | f096fc730b031e84ae243029f34d45d9d2a94488 /plugins | |
parent | d1db5966e07599a148ad22fd0c9bd53265d2351b (diff) |
fixed tray icon in portable build
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/gtkui.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 7fa3ad1a..06ceb756 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -583,7 +583,14 @@ gtkui_update_status_icon (gpointer unused) { icon_name = icon_is_builtin ? "deadbeef" : icon_name; } - trayicon = gtk_status_icon_new_from_icon_name(icon_name); + if (!gtk_icon_theme_has_icon(theme, icon_name)) { + char iconpath[1024]; + snprintf (iconpath, sizeof (iconpath), "%s/deadbeef.png", deadbeef->get_prefix ()); + trayicon = gtk_status_icon_new_from_file(iconpath); + } + else { + trayicon = gtk_status_icon_new_from_icon_name(icon_name); + } if (hide_tray_icon) { g_object_set (trayicon, "visible", FALSE, NULL); } |