summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-26 14:41:24 -0500
committermonsta <[email protected]>2018-01-06 14:46:28 +0300
commit4a8f8e895d1562f182c23714e77a0fb46257ed54 (patch)
tree099a7c789087fb3ee60db47d2d367603dcf65970
parent27ab17a772130cea439420e8a338ff58789e0d2d (diff)
downloadmate-panel-4a8f8e895d1562f182c23714e77a0fb46257ed54.tar.bz2
mate-panel-4a8f8e895d1562f182c23714e77a0fb46257ed54.tar.xz
status-notifier: load icons specified by path
Fix for https://github.com/mate-desktop/mate-panel/issues/695 and similar failures to load icons when the application calls for a path and not an icon name
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index cd8ba017..e01d624d 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -254,6 +254,10 @@ update (SnItemV0 *v0)
GdkPixbuf *pixbuf;
pixbuf = get_icon_by_name (v0->icon_name, icon_size);
if (!pixbuf){
+ /*try to find icons specified by path and filename*/
+ pixbuf = gdk_pixbuf_new_from_file(v0->icon_name, NULL);
+ }
+ if (!pixbuf){
/*deal with missing icon or failure to load icon*/
pixbuf = get_icon_by_name ("image-missing", icon_size);
}