aboutsummaryrefslogtreecommitdiff
path: root/src/app-menu-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app-menu-item.c')
-rw-r--r--src/app-menu-item.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c
index f792128..7db72bf 100644
--- a/src/app-menu-item.c
+++ b/src/app-menu-item.c
@@ -314,10 +314,15 @@ desktop_cb (IndicateListener * listener, IndicateListenerServer * server, gchar
update_label(self);
- GIcon * icon = g_app_info_get_icon(priv->appinfo);
- gchar * iconstr = g_icon_to_string(icon);
- dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_ICON_NAME, iconstr);
- g_free(iconstr);
+ const gchar * def_icon = get_default_icon(priv->desktop);
+ if (def_icon == NULL) {
+ GIcon * icon = g_app_info_get_icon(priv->appinfo);
+ gchar * iconstr = g_icon_to_string(icon);
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_ICON_NAME, iconstr);
+ g_free(iconstr);
+ } else {
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_ICON_NAME, def_icon);
+ }
g_signal_emit(G_OBJECT(self), signals[NAME_CHANGED], 0, app_menu_item_get_name(self), TRUE);