aboutsummaryrefslogtreecommitdiff
path: root/src/im-phone-menu.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2012-11-22 12:03:01 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2012-11-22 12:03:01 +0100
commite5985f89f62fdac65d4f80037835691630cc3d2c (patch)
tree7c908e3cd0d40d506036db7acd66359540f7b1af /src/im-phone-menu.c
parenta7ca54762c465cd5d26f9eafe11beb3e205a97ab (diff)
downloadayatana-indicator-messages-e5985f89f62fdac65d4f80037835691630cc3d2c.tar.gz
ayatana-indicator-messages-e5985f89f62fdac65d4f80037835691630cc3d2c.tar.bz2
ayatana-indicator-messages-e5985f89f62fdac65d4f80037835691630cc3d2c.zip
ImPhoneMenu: expose application icon on message items
Diffstat (limited to 'src/im-phone-menu.c')
-rw-r--r--src/im-phone-menu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/im-phone-menu.c b/src/im-phone-menu.c
index 0ba41c4..9fd52df 100644
--- a/src/im-phone-menu.c
+++ b/src/im-phone-menu.c
@@ -124,6 +124,7 @@ im_phone_menu_add_message (ImPhoneMenu *menu,
const gchar *app_id;
GMenuItem *item;
gchar *action_name;
+ GIcon *app_icon;
g_return_if_fail (IM_IS_PHONE_MENU (menu));
g_return_if_fail (G_IS_DESKTOP_APP_INFO (app));
@@ -143,6 +144,17 @@ im_phone_menu_add_message (ImPhoneMenu *menu,
if (iconstr)
g_menu_item_set_attribute (item, "x-canonical-icon", "s", iconstr);
+ app_icon = g_app_info_get_icon (G_APP_INFO (app));
+ if (app_icon)
+ {
+ gchar *app_iconstr;
+
+ app_iconstr = g_icon_to_string (app_icon);
+ g_menu_item_set_attribute (item, "x-canonical-app-icon", "s", app_iconstr);
+
+ g_free (app_iconstr);
+ }
+
g_menu_append_item (menu->message_section, item);
g_free (action_name);