Merge lp:~nick-dedekind/indicator-location/lp1245711 into lp:indicator-location/14.04

Proposed by Nick Dedekind
Status: Merged
Approved by: Charles Kerr
Approved revision: 52
Merged at revision: 54
Proposed branch: lp:~nick-dedekind/indicator-location/lp1245711
Merge into: lp:indicator-location/14.04
Diff against target: 27 lines (+13/-2)
1 file modified
src/phone.cc (+13/-2)
To merge this branch: bzr merge lp:~nick-dedekind/indicator-location/lp1245711
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+192978@code.launchpad.net

Commit message

Location & GPS menu items should be switches

Description of the change

Location & GPS menu items should be switches, not checkboxes.

To post a comment you must log in.
52. By Nick Dedekind

Merged with trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Nice catch nick!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/phone.cc'
2--- src/phone.cc 2013-10-08 18:05:58 +0000
3+++ src/phone.cc 2013-10-29 00:24:26 +0000
4@@ -246,11 +246,22 @@
5 GMenu * menu;
6 GMenu * submenu;
7 GMenuItem * header;
8+ GMenuItem * location;
9+ GMenuItem * gps;
10
11 /* create the submenu */
12 submenu = g_menu_new ();
13- g_menu_append (submenu, _("Location detection"), "indicator." LOCATION_ACTION_KEY);
14- g_menu_append (submenu, _("GPS"), "indicator." GPS_ACTION_KEY);
15+
16+ location = g_menu_item_new (_("Location detection"), "indicator." LOCATION_ACTION_KEY);
17+ g_menu_item_set_attribute (location, "x-canonical-type", "s", "com.canonical.indicator.switch");
18+ g_menu_append_item (submenu, location);
19+ g_object_unref (location);
20+
21+ gps = g_menu_item_new (_("GPS"), "indicator." GPS_ACTION_KEY);
22+ g_menu_item_set_attribute (gps, "x-canonical-type", "s", "com.canonical.indicator.switch");
23+ g_menu_append_item (submenu, gps);
24+ g_object_unref (gps);
25+
26 // disabled for 13.04 -- the location settings panel isn't complete
27 // g_menu_append (submenu, _("Location settingsā€¦"), "indicator." SETTINGS_ACTION_KEY "::location");
28

Subscribers

People subscribed via source and target branches