aboutsummaryrefslogtreecommitdiff
path: root/src/messages-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messages-service.c')
-rw-r--r--src/messages-service.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/messages-service.c b/src/messages-service.c
index aade829..407b8ba 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -2,10 +2,11 @@
An indicator to show information that is in messaging applications
that the user is using.
-Copyright 2009 Canonical Ltd.
+Copyright 2012 Canonical Ltd.
Authors:
Ted Gould <ted@canonical.com>
+ Lars Uebernickel <lars.uebernickel@canonical.com>
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License version 3, as published
@@ -464,6 +465,8 @@ main (int argc, char ** argv)
GMainLoop * mainloop = NULL;
IndicatorService * service = NULL;
GMenuItem *header;
+ GIcon *icon;
+ gchar *iconstr;
/* Glib init */
g_type_init();
@@ -501,11 +504,14 @@ main (int argc, char ** argv)
chat_section = create_status_section ();
g_menu_append (menu, _("Clear"), "clear");
+ icon = g_themed_icon_new ("indicator-messages");
+ iconstr = g_icon_to_string (icon);
+
toplevel_menu = g_menu_new ();
header = g_menu_item_new (NULL, "messages");
g_menu_item_set_submenu (header, G_MENU_MODEL (menu));
- g_menu_item_set_attribute (header, INDICATOR_MENU_ATTRIBUTE_ICON_NAME, "s", "indicator-messages");
- g_menu_item_set_attribute (header, INDICATOR_MENU_ATTRIBUTE_ACCESSIBLE_DESCRIPTION, "s", _("Messages"));
+ g_menu_item_set_attribute (header, "x-canonical-icon", "s", iconstr);
+ g_menu_item_set_attribute (header, "x-canonical-accessible-description", "s", _("Messages"));
g_menu_append_item (toplevel_menu, header);
g_object_unref (header);
@@ -518,6 +524,8 @@ main (int argc, char ** argv)
g_main_loop_run(mainloop);
/* Clean up */
+ g_free (iconstr);
+ g_object_unref (icon);
g_object_unref (messages_service);
g_object_unref (chat_section);
g_object_unref (settings);