aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app-menu-item.c2
-rw-r--r--src/indicator-messages.c15
-rw-r--r--src/launcher-menu-item.c1
3 files changed, 18 insertions, 0 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c
index cbef924..87423c0 100644
--- a/src/app-menu-item.c
+++ b/src/app-menu-item.c
@@ -343,6 +343,7 @@ child_added_cb (DbusmenuMenuitem * root, DbusmenuMenuitem * child, guint positio
AppMenuItem * self = APP_MENU_ITEM(data);
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self);
DbusmenuMenuitemProxy * mip = dbusmenu_menuitem_proxy_new(child);
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(mip), DBUSMENU_MENUITEM_PROP_ICON_NAME, DBUSMENU_MENUITEM_ICON_NAME_BLANK);
priv->shortcuts = g_list_insert(priv->shortcuts, mip, position);
@@ -444,6 +445,7 @@ root_changed (DbusmenuClient * client, DbusmenuMenuitem * newroot, gpointer data
g_debug("\tProcessing %d children", g_list_length(children));
while (children != NULL) {
DbusmenuMenuitemProxy * mip = dbusmenu_menuitem_proxy_new(DBUSMENU_MENUITEM(children->data));
+ dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(mip), DBUSMENU_MENUITEM_PROP_ICON_NAME, DBUSMENU_MENUITEM_ICON_NAME_BLANK);
priv->shortcuts = g_list_append(priv->shortcuts, mip);
children = g_list_next(children);
}
diff --git a/src/indicator-messages.c b/src/indicator-messages.c
index 99e303b..988d9d6 100644
--- a/src/indicator-messages.c
+++ b/src/indicator-messages.c
@@ -207,6 +207,20 @@ setup_icon_proxy (gpointer userdata)
return FALSE;
}
+/* Sets the icon when it changes. */
+static void
+application_icon_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, gpointer user_data)
+{
+ if (!g_strcmp0(prop, APPLICATION_MENUITEM_PROP_ICON)) {
+ /* Set the main icon */
+ if (GTK_IS_IMAGE(user_data)) {
+ gtk_image_set_from_icon_name(GTK_IMAGE(user_data), g_value_get_string(value), GTK_ICON_SIZE_MENU);
+ }
+ }
+
+ return;
+}
+
/* Sets the label when it changes. */
static void
application_prop_change_cb (DbusmenuMenuitem * mi, gchar * prop, GValue * value, gpointer user_data)
@@ -266,6 +280,7 @@ new_application_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, Dbu
/* Make sure we can handle the label changing */
g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(application_prop_change_cb), label);
+ g_signal_connect(G_OBJECT(newitem), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(application_icon_change_cb), icon);
return TRUE;
}
diff --git a/src/launcher-menu-item.c b/src/launcher-menu-item.c
index 5d9de12..63e5594 100644
--- a/src/launcher-menu-item.c
+++ b/src/launcher-menu-item.c
@@ -199,6 +199,7 @@ launcher_menu_item_new (const gchar * desktop_file)
DbusmenuMenuitem * mi = dbusmenu_menuitem_new();
g_object_set_data(G_OBJECT(mi), NICK_DATA, (gpointer)nicks[i]);
+ dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_ICON_NAME, DBUSMENU_MENUITEM_ICON_NAME_BLANK);
dbusmenu_menuitem_property_set(mi, DBUSMENU_MENUITEM_PROP_LABEL, indicator_desktop_shortcuts_nick_get_name(priv->ids, nicks[i]));
g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(nick_activate_cb), self);