[gnome-shell/T29763: 184/249] st/icon: Only load default fallback icon if an icon was set and failed to load
- From: Matthew Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/T29763: 184/249] st/icon: Only load default fallback icon if an icon was set and failed to load
- Date: Thu, 21 May 2020 18:24:40 +0000 (UTC)
commit ee79bf1d2b75d2454b480f913cc7c5f953d09fbc
Author: Andre Moreira Magalhaes <andre endlessm com>
Date: Fri Apr 3 10:25:25 2020 -0300
st/icon: Only load default fallback icon if an icon was set and failed to load
Commit c89d6a633 introduced a default fallback icon that would be displayed in
case the main gicon or the fallback gicon wasn't set or failed to load.
This broke the use case where a StIcon is created but no main icon or
fallback icon are set on purpose, for example the appindicator extension
which always creates a StIcon to represent icons in menu items but the
actual icons are only set if the application provides one, leaving the
menu showing the default fallback ("image-missing") icon for all menu
entries that don't actually have an icon provided by the application.
Fix that by only using the default fallback icon if the provided one
failed to load.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1173
src/st/st-icon.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index a2ccd8f754..e82adcc77f 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -418,6 +418,9 @@ st_icon_update (StIcon *icon)
priv->opacity_handler_id = 0;
}
+ if (priv->gicon == NULL && priv->fallback_gicon == NULL)
+ return;
+
if (!st_widget_get_resource_scale (ST_WIDGET (icon), &resource_scale))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]