From 2d2009c19d0d8b6a4e2eeb3a62144be747e93d94 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Sun, 24 Dec 2017 20:49:06 -0500 Subject: 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 --- applets/notification_area/status-notifier/sn-item-v0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'applets/notification_area') 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); } -- cgit v1.2.1