aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-20 13:59:04 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-20 13:59:04 -0500
commitadd74f2cfa7c45914167bc128f0f4af12d89d39f (patch)
tree7ecf376f8d1dca52de43aa83bd6c00d96b128753 /src
parentfab2853f35eb108988b5ddb16cd9f6e43de79773 (diff)
parent2babf3e334649031a4e8fff308358f6974ceb155 (diff)
downloadayatana-indicator-session-add74f2cfa7c45914167bc128f0f4af12d89d39f.tar.gz
ayatana-indicator-session-add74f2cfa7c45914167bc128f0f4af12d89d39f.tar.bz2
ayatana-indicator-session-add74f2cfa7c45914167bc128f0f4af12d89d39f.zip
merge lp:~larsu/indicator-session/ng-with-types to add x-canonical-type support for the user and guest menuitems
Diffstat (limited to 'src')
-rw-r--r--src/service.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 83bfeaa..4a62bd1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -465,7 +465,15 @@ create_switch_section (IndicatorSessionService * self)
g_object_unref (item);
if (indicator_session_guest_is_allowed (p->backend_guest))
- g_menu_append (menu, _("Guest Session"), "indicator.switch-to-guest");
+ {
+ GMenuItem *item;
+
+ item = g_menu_item_new (_("Guest Session"), "indicator.switch-to-guest");
+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "indicator.guest-menu-item");
+ g_menu_append_item (menu, item);
+
+ g_object_unref (item);
+ }
/* build an array of all the users we know of */
users = g_ptr_array_new ();
@@ -489,6 +497,7 @@ create_switch_section (IndicatorSessionService * self)
const IndicatorSessionUser * u = g_ptr_array_index (users, i);
item = g_menu_item_new (u->real_name, NULL);
g_menu_item_set_action_and_target (item, "indicator.switch-to-user", "s", u->user_name);
+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "indicator.user-menu-item");
g_menu_append_item (menu, item);
g_object_unref (item);
}