summaryrefslogtreecommitdiff
path: root/applets/notification_area/status-notifier
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-24 20:49:06 -0500
committerlukefromdc <[email protected]>2017-12-24 20:49:06 -0500
commit2d2009c19d0d8b6a4e2eeb3a62144be747e93d94 (patch)
tree03b783e83e93599e2e4389989cbf2bb003b3aab2 /applets/notification_area/status-notifier
parenta63f21ae4e7f268fc7c9714829f4a83e1a76a93b (diff)
downloadmate-panel-2d2009c19d0d8b6a4e2eeb3a62144be747e93d94.tar.bz2
mate-panel-2d2009c19d0d8b6a4e2eeb3a62144be747e93d94.tar.xz
status-notifier: fix failure to show icon for missing icon
Fix 1px wide invisible icon in cases such as https://github.com/mate-desktop/mate-panel/issues/695
Diffstat (limited to 'applets/notification_area/status-notifier')
-rw-r--r--applets/notification_area/status-notifier/sn-item-v0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/applets/notification_area/status-notifier/sn-item-v0.c b/applets/notification_area/status-notifier/sn-item-v0.c
index cd0694a2..cd8ba017 100644
--- a/applets/notification_area/status-notifier/sn-item-v0.c
+++ b/applets/notification_area/status-notifier/sn-item-v0.c
@@ -252,8 +252,11 @@ update (SnItemV0 *v0)
if (v0->icon_name != NULL && v0->icon_name[0] != '\0')
{
GdkPixbuf *pixbuf;
-
pixbuf = get_icon_by_name (v0->icon_name, icon_size);
+ if (!pixbuf){
+ /*deal with missing icon or failure to load icon*/
+ pixbuf = get_icon_by_name ("image-missing", icon_size);
+ }
gtk_image_set_from_pixbuf (image, pixbuf);
g_object_unref (pixbuf);
}