Merge lp:~xavi-garcia-mena/indicator-location/bug-1351299-location-settings into lp:indicator-location/16.04

Proposed by Xavi Garcia
Status: Merged
Approved by: Xavi Garcia
Approved revision: 153
Merged at revision: 149
Proposed branch: lp:~xavi-garcia-mena/indicator-location/bug-1351299-location-settings
Merge into: lp:indicator-location/16.04
Diff against target: 87 lines (+15/-17)
3 files modified
debian/changelog (+6/-0)
src/phone.cc (+3/-11)
tests/phone-test.cc (+6/-6)
To merge this branch: bzr merge lp:~xavi-garcia-mena/indicator-location/bug-1351299-location-settings
Reviewer Review Type Date Requested Status
Xavi Garcia Approve
Review via email: mp+278355@code.launchpad.net

Commit message

Xenial merge

Description of the change

Xenial merge

To post a comment you must log in.
Revision history for this message
Xavi Garcia (xavi-garcia-mena) :
review: Approve
154. By Xavi Garcia

Avoid disabling GPS when turning off location to keep settings when turning location on again

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-07-27 18:06:47 +0000
3+++ debian/changelog 2015-11-27 11:07:39 +0000
4@@ -1,3 +1,9 @@
5+indicator-location (13.10.0+15.10.20150727-0ubuntu2) UNRELEASED; urgency=medium
6+
7+ * Updated layout removing the GPS item and adding Location Settings
8+
9+ -- xavigarcia <xavi.garcia.mena@canonical.com> Mon, 23 Nov 2015 18:22:55 +0100
10+
11 indicator-location (13.10.0+15.10.20150727-0ubuntu1) wily; urgency=medium
12
13 [ CI Train Bot ]
14
15=== modified file 'src/phone.cc'
16--- src/phone.cc 2015-04-15 14:23:25 +0000
17+++ src/phone.cc 2015-11-27 11:07:39 +0000
18@@ -77,9 +77,8 @@
19 return false;
20
21 // as per "Indicators - RTM Usability Fix" document:
22- // visible iff location and/or GPS is enabled
23- return controller->is_location_service_enabled()
24- || controller->is_gps_enabled();
25+ // visible iff location is enabled
26+ return controller->is_location_service_enabled();
27 }
28
29 GVariant *
30@@ -327,9 +326,6 @@
31 /* populate the submenu */
32 rebuild_submenu();
33
34- // disabled for 13.04 -- the location settings panel isn't complete
35- // g_menu_append (submenu, _("Location settingsā€¦"), "indicator." SETTINGS_ACTION_KEY "::location");
36-
37 /* add the submenu to a new header */
38 header = g_menu_item_new (nullptr, "indicator." HEADER_ACTION_KEY);
39 g_menu_item_set_attribute (header, "x-canonical-type", "s", "com.canonical.indicator.root");
40@@ -359,9 +355,5 @@
41 "indicator." LICENCE_ACTION_KEY);
42 }
43
44- GMenuItem * gps = g_menu_item_new(_("GPS"), "indicator." GPS_ACTION_KEY);
45- g_menu_item_set_attribute(gps, "x-canonical-type", "s",
46- "com.canonical.indicator.switch");
47- g_menu_append_item(submenu.get(), gps);
48- g_object_unref(gps);
49+ g_menu_append (submenu.get(), _("Location settingsā€¦"), "indicator." SETTINGS_ACTION_KEY "::security-privacy");
50 }
51
52=== modified file 'tests/phone-test.cc'
53--- tests/phone-test.cc 2015-04-15 14:24:14 +0000
54+++ tests/phone-test.cc 2015-11-27 11:07:39 +0000
55@@ -97,8 +97,8 @@
56 TEST_F (PhoneTest, MenuitemsExist)
57 {
58 ASSERT_TRUE (action_menuitem_exists ("indicator.location-detection-enabled"));
59- ASSERT_TRUE (action_menuitem_exists ("indicator.gps-detection-enabled"));
60- //ASSERT_TRUE (action_menuitem_exists ("indicator.settings"));
61+ ASSERT_FALSE (action_menuitem_exists ("indicator.gps-detection-enabled"));
62+ ASSERT_TRUE (action_menuitem_exists ("indicator.settings"));
63 }
64
65 TEST_F (PhoneTest, IsValidEnabled)
66@@ -125,9 +125,9 @@
67 TEST_F (PhoneTest, IsValidVisible)
68 {
69 // make sure something's enabled so that the indicator should be visible
70- if (!myController->is_gps_enabled()) {
71- myController->set_gps_enabled(true);
72- wait_for_action_state_change("gps-detection-enabled");
73+ if (!myController->is_location_service_enabled()) {
74+ myController->set_location_service_enabled(true);
75+ wait_for_action_state_change("location-detection-enabled");
76 }
77
78 // test the header's 'invisible' entry tracks the controller's is_valid() state
79@@ -327,7 +327,7 @@
80 bool expected_visible;
81 } visibility_tests[] = {
82 { false, false, false },
83- { true, false, true },
84+ { true, false, false },
85 { false, true, true },
86 { true, true, true }
87 };

Subscribers

People subscribed via source and target branches