aboutsummaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-05-23 18:48:56 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-05-23 18:48:56 -0400
commit2babf3e334649031a4e8fff308358f6974ceb155 (patch)
treea05ea763fb07aea5e2e69b6f61a4a5174378ce30 /src/service.c
parent08be3e1b81cb6ba58073929be8121acb37078680 (diff)
downloadayatana-indicator-session-2babf3e334649031a4e8fff308358f6974ceb155.tar.gz
ayatana-indicator-session-2babf3e334649031a4e8fff308358f6974ceb155.tar.bz2
ayatana-indicator-session-2babf3e334649031a4e8fff308358f6974ceb155.zip
Set x-canonical-type for user and guest menu items
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index d912176..59728d1 100644
--- a/src/service.c
+++ b/src/service.c
@@ -471,7 +471,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 ();
@@ -495,6 +503,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);
}