summaryrefslogtreecommitdiff
path: root/applets/notification_area/status-notifier
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-26 14:41:24 -0500
committerlukefromdc <[email protected]>2017-12-27 00:08:20 -0500
commita596771e28d67bb83656ee8a1c76341ce03b4640 (patch)
tree24f7ef140131968dfdd0e8f2c7d80009c63f0049 /applets/notification_area/status-notifier
parent4a4552148355790a35d5e9dd148778bd588d11fd (diff)
downloadmate-panel-a596771e28d67bb83656ee8a1c76341ce03b4640.tar.bz2
mate-panel-a596771e28d67bb83656ee8a1c76341ce03b4640.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
Diffstat (limited to 'applets/notification_area/status-notifier')
-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);
}