summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2017-12-24 20:49:06 -0500
committermonsta <[email protected]>2018-01-06 14:42:15 +0300
commit7e77cab8ac6a79d880b85c61f15161e286e032dc (patch)
tree405d3c49bee4294e90d0a41bc4de2946414b4f05
parent0d29acf6a70090ee771de2793b1af8e1388a430f (diff)
downloadmate-panel-7e77cab8ac6a79d880b85c61f15161e286e032dc.tar.bz2
mate-panel-7e77cab8ac6a79d880b85c61f15161e286e032dc.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
-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);
}