From a56346d7b63f9537e094ffce289aba0f69dbc628 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Thu, 20 Mar 2014 14:28:17 +0100 Subject: desktop menu: use com.canonical.application menu items for actions The unity implementation of that menu item indents the label even when there's no icon. --- src/im-desktop-menu.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/im-desktop-menu.c b/src/im-desktop-menu.c index 68d8a2d..11e3d41 100644 --- a/src/im-desktop-menu.c +++ b/src/im-desktop-menu.c @@ -79,12 +79,16 @@ im_desktop_menu_app_added (ImApplicationList *applist, if (shortcuts != NULL) for (nicks = indicator_desktop_shortcuts_get_nicks(shortcuts); *nicks; nicks++) { + GMenuItem *item; gchar *label; label = indicator_desktop_shortcuts_nick_get_name (shortcuts, *nicks); - g_menu_append (app_section, label, *nicks); + item = g_menu_item_new (label, *nicks); + g_menu_item_set_attribute (item, "x-canonical-type", "s", "com.canonical.application"); + g_menu_append_item (app_section, item); g_free (label); + g_object_unref (item); } g_clear_object(&shortcuts); -- cgit v1.2.3