Merge lp:~larsu/indicator-session/ng-with-types into lp:~charlesk/indicator-session/ng

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 407
Merged at revision: 413
Proposed branch: lp:~larsu/indicator-session/ng-with-types
Merge into: lp:~charlesk/indicator-session/ng
Diff against target: 50 lines (+12/-3)
2 files modified
README (+2/-2)
src/service.c (+10/-1)
To merge this branch: bzr merge lp:~larsu/indicator-session/ng-with-types
Reviewer Review Type Date Requested Status
Charles Kerr Pending
Review via email: mp+165504@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2013-03-22 21:53:58 +0000
3+++ README 2013-05-23 22:53:26 +0000
4@@ -12,7 +12,7 @@
5 visual components: (1) an Active Session Mark, the user's (2) icon, (3) name,
6 and (4) a Logged In Mark.
7
8-== User menuitems can be recognized by their "indicator.switch-to-user" action.
9+== User menuitems have "x-canonical-type" set to "indicator.user-menu-item"
10 Their four visual components are determined by:
11
12 1. You can test for the Action Session Mark by checking the action's state.
13@@ -30,7 +30,7 @@
14 an array of usernames. If the array contains the username in this
15 menuitem's "target" attribute, show the Logged In Mark.
16
17-== The Guest switcher can be recognized by its "indicator.switch-to-guest"
18+== The Guest switcher has "x-canonical-type" set to "indicator.guest-menu-item"
19 action. Its four visual components are determined by:
20
21 1. You can test for the Active Session Mark by checking the action's state.
22
23=== modified file 'src/service.c'
24--- src/service.c 2013-04-18 17:30:14 +0000
25+++ src/service.c 2013-05-23 22:53:26 +0000
26@@ -471,7 +471,15 @@
27 g_object_unref (item);
28
29 if (indicator_session_guest_is_allowed (p->backend_guest))
30- g_menu_append (menu, _("Guest Session"), "indicator.switch-to-guest");
31+ {
32+ GMenuItem *item;
33+
34+ item = g_menu_item_new (_("Guest Session"), "indicator.switch-to-guest");
35+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "indicator.guest-menu-item");
36+ g_menu_append_item (menu, item);
37+
38+ g_object_unref (item);
39+ }
40
41 /* build an array of all the users we know of */
42 users = g_ptr_array_new ();
43@@ -495,6 +503,7 @@
44 const IndicatorSessionUser * u = g_ptr_array_index (users, i);
45 item = g_menu_item_new (u->real_name, NULL);
46 g_menu_item_set_action_and_target (item, "indicator.switch-to-user", "s", u->user_name);
47+ g_menu_item_set_attribute (item, "x-canonical-type", "s", "indicator.user-menu-item");
48 g_menu_append_item (menu, item);
49 g_object_unref (item);
50 }

Subscribers

People subscribed via source and target branches

to all changes: