Merge lp:~costales/unav/0.59-new_fixes into lp:unav
- 0.59-new_fixes
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 56 | ||||
Proposed branch: | lp:~costales/unav/0.59-new_fixes | ||||
Merge into: | lp:unav | ||||
Diff against target: |
366 lines (+44/-87) 8 files modified
app-armor.json (+0/-1) nav/class/UI.js (+1/-1) nav/index.html (+2/-20) qml/Coordinate.qml (+4/-8) qml/Favorites.qml (+4/-2) qml/Location.qml (+6/-2) qml/Main.qml (+23/-51) qml/PoiListPage.qml (+4/-2) |
||||
To merge this branch: | bzr merge lp:~costales/unav/0.59-new_fixes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nekhelesh Ramananthan | Approve | ||
Review via email: mp+292422@code.launchpad.net |
Commit message
Description of the change
- Fixed dark purple in navigation panel.
- Fixed: Set a route. Search > Click on any Location entry = Bug: Center button is disabled.
- Fixed: open uNav > Click on map (you will see one popup) > click on a favorite or search > bug: popup will be the previous.
- Fixed: open uNav > Set route > Click on map (you'll see the popup) > click on current pos, destination or origin > Bug: popup will not update the text.
- 61. By costales
-
Window size for convergence in tablet
- 62. By costales
-
Restored orange in indication (blue is soft and in so many places
- 63. By costales
-
Window size for convergence in tablet
- 64. By costales
-
Removed AGPS popup
- 65. By costales
-
Fixed click on pos, destination, origin with popup
- 66. By costales
-
Updated testing code
costales (costales) wrote : | # |
@Nekhelesh: Restored to orange again. The blue is so light and it's a so blue in the UI. Not nice. The orange is the blue's complementary, then good color.
Nekhelesh Ramananthan (nik90) wrote : | # |
I didnt find any regressions. Looks good to me. I am not fully sure about the AGPS dialog removal. But I don't much about the location services to comment on that. With that I am approving this MP.
Preview Diff
1 | === modified file 'app-armor.json' |
2 | --- app-armor.json 2016-03-26 18:53:17 +0000 |
3 | +++ app-armor.json 2016-04-22 14:13:13 +0000 |
4 | @@ -2,7 +2,6 @@ |
5 | "policy_groups": [ |
6 | "networking", |
7 | "webview", |
8 | - "connectivity", |
9 | "audio", |
10 | "location", |
11 | "keep-display-on", |
12 | |
13 | === modified file 'nav/class/UI.js' |
14 | --- nav/class/UI.js 2016-04-18 20:35:22 +0000 |
15 | +++ nav/class/UI.js 2016-04-22 14:13:13 +0000 |
16 | @@ -124,7 +124,7 @@ |
17 | UI.prototype.DIST4ROTATION = 3; |
18 | UI.prototype.SPEED4ROTATION = 5; |
19 | UI.prototype.COLOR_ORANGE = '#DD4814'; |
20 | -UI.prototype.COLOR_PURPLE = '#2C001E'; |
21 | +UI.prototype.COLOR_BLACK = '#292929'; |
22 | |
23 | |
24 | UI.prototype.set_map_stretched = function(status) { |
25 | |
26 | === modified file 'nav/index.html' |
27 | --- nav/index.html 2016-04-18 17:56:28 +0000 |
28 | +++ nav/index.html 2016-04-22 14:13:13 +0000 |
29 | @@ -353,24 +353,6 @@ |
30 | clearTimeout(id_gps_died); |
31 | id_gps_died = 0; |
32 | } |
33 | - if (z1 == 5) { |
34 | - clearInterval(id_gps); |
35 | - id_gps = 0; |
36 | - if (id_auto_accept > 0) { |
37 | - clearTimeout(id_auto_accept); |
38 | - id_auto_accept = 0; |
39 | - } |
40 | - if (id_gps > 0) { |
41 | - clearTimeout(id_gps); |
42 | - id_gps = 0; |
43 | - } |
44 | - nav.set_route_status('no'); |
45 | - ui.update(); |
46 | - ui.markers_radar_clear(); |
47 | - ui.route(false); |
48 | - qml_set_center_onpos(0); |
49 | - $('#gps_denied').show(); |
50 | - } |
51 | accuracy = 300; |
52 | speed = 2; |
53 | z1++; |
54 | @@ -463,7 +445,7 @@ |
55 | longpress = (endTime - startTime < 225) ? false : true; |
56 | }); |
57 | |
58 | - /** TESTING |
59 | + /** TESTING BEGIN |
60 | $("#map").on('mousedown', function () { |
61 | startTime = new Date().getTime(); |
62 | }); |
63 | @@ -471,7 +453,7 @@ |
64 | endTime = new Date().getTime(); |
65 | longpress = (endTime - startTime < 225) ? false : true; |
66 | }); |
67 | - TESTING **/ |
68 | + TESTING END **/ |
69 | |
70 | // Drag |
71 | map.on('pointerdrag', function(evt) { |
72 | |
73 | === modified file 'qml/Coordinate.qml' |
74 | --- qml/Coordinate.qml 2016-04-18 13:59:52 +0000 |
75 | +++ qml/Coordinate.qml 2016-04-22 14:13:13 +0000 |
76 | @@ -121,12 +121,10 @@ |
77 | if (!isNaN(aux_lat) && aux_lat.toString().indexOf('.') != -1 && !isNaN(aux_lng) && aux_lng.toString().indexOf('.') != -1 && aux_lat >= -90 && aux_lat <= 90 && aux_lng >= -180 && aux_lng <= 180) { // It's a float |
78 | mainPageStack.clickedLat = parseFloat(aux_lat).toFixed(5); |
79 | mainPageStack.clickedLng = parseFloat(aux_lng).toFixed(5); |
80 | + mainPageStack.clear(); |
81 | if (mainPageStack.center_onpos === 2) |
82 | mainPageStack.center_onpos = 1; |
83 | - mainPageStack.clear(); |
84 | - mainPageStack.executeJavaScript( |
85 | - "ui.markers_POI_set([{title: '', lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}]);" |
86 | - ); |
87 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: '', lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}])"); |
88 | mainPageStack.favPopup = false; |
89 | goThereActionPopover.show(); |
90 | } |
91 | @@ -343,12 +341,10 @@ |
92 | if (aux_lat >= -90 && aux_lat <= 90 && aux_lng >= -180 && aux_lng <= 180) { |
93 | mainPageStack.clickedLat = parseFloat(aux_lat).toFixed(5); |
94 | mainPageStack.clickedLng = parseFloat(aux_lng).toFixed(5); |
95 | + mainPageStack.clear(); |
96 | if (mainPageStack.center_onpos === 2) |
97 | mainPageStack.center_onpos = 1; |
98 | - mainPageStack.clear(); |
99 | - mainPageStack.executeJavaScript( |
100 | - "ui.markers_POI_set([{title: '', lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}]);" |
101 | - ); |
102 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: '', lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}])"); |
103 | mainPageStack.favPopup = false; |
104 | goThereActionPopover.show(); |
105 | } |
106 | |
107 | === modified file 'qml/Favorites.qml' |
108 | --- qml/Favorites.qml 2016-04-17 16:42:49 +0000 |
109 | +++ qml/Favorites.qml 2016-04-22 14:13:13 +0000 |
110 | @@ -150,11 +150,13 @@ |
111 | } |
112 | |
113 | onClicked: { |
114 | - mainPageStack.clear() |
115 | + mainPageStack.clear(); |
116 | if (navApp.settings.saveHistory) { |
117 | UnavDB.saveTofavHistory(model.name, model.lat, model.lng); |
118 | } |
119 | - mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + model.name + "\", lat: " + model.lat + ", lng: " + model.lng + "}]);"); |
120 | + if (mainPageStack.center_onpos === 2) |
121 | + mainPageStack.center_onpos = 1; |
122 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + model.name + "\", lat: " + model.lat + ", lng: " + model.lng + "}])"); |
123 | } |
124 | } |
125 | } |
126 | |
127 | === modified file 'qml/Location.qml' |
128 | --- qml/Location.qml 2016-04-17 22:32:48 +0000 |
129 | +++ qml/Location.qml 2016-04-22 14:13:13 +0000 |
130 | @@ -277,7 +277,9 @@ |
131 | UnavDB.saveToSearchHistory(model.name, model.lat, model.lng); |
132 | } |
133 | mainPageStack.clear(); |
134 | - mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + model.name + "\", lat: " + model.lat + ", lng: " + model.lng + "}]);"); |
135 | + if (mainPageStack.center_onpos === 2) |
136 | + mainPageStack.center_onpos = 1; |
137 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + model.name + "\", lat: " + model.lat + ", lng: " + model.lng + "}])"); |
138 | } |
139 | |
140 | ListItemLayout { |
141 | @@ -410,10 +412,12 @@ |
142 | }) |
143 | } else { |
144 | mainPageStack.clear(); |
145 | + if (mainPageStack.center_onpos === 2) |
146 | + mainPageStack.center_onpos = 1; |
147 | mainPageStack.executeJavaScript("ui.markers_POI_set([{ title: \"" + |
148 | model.name + "\", lat: " + |
149 | model.lat + ", lng: " + |
150 | - model.lng + "}]);"); |
151 | + model.lng + "}])"); |
152 | } |
153 | } |
154 | } |
155 | |
156 | === modified file 'qml/Main.qml' |
157 | --- qml/Main.qml 2016-04-19 17:29:59 +0000 |
158 | +++ qml/Main.qml 2016-04-22 14:13:13 +0000 |
159 | @@ -17,7 +17,6 @@ |
160 | |
161 | import QtQuick 2.4 |
162 | import Ubuntu.Web 0.2 |
163 | -import Ubuntu.Connectivity 1.0 |
164 | import Ubuntu.Components 1.3 |
165 | import QtQuick.Layouts 1.1 |
166 | import Ubuntu.Components.Popups 1.3 |
167 | @@ -41,16 +40,12 @@ |
168 | // Translations |
169 | i18n.domain = "unav"; |
170 | i18n.bindtextdomain("unav", "nav/locales/mo"); |
171 | - |
172 | - // AGPS warning |
173 | - if (navApp.settings.showAGPS && !navApp.settings.showTuto && !NetworkingStatus.wifiEnabled) |
174 | - PopupUtils.open(agps); |
175 | } |
176 | |
177 | anchorToKeyboard: true |
178 | |
179 | - width: units.gu(100) |
180 | - height: units.gu(70) |
181 | + width: units.gu(150) |
182 | + height: units.gu(100) |
183 | |
184 | property string applicationVersion: "0.58" |
185 | property string mapUrl: "../nav/index.html" |
186 | @@ -71,7 +66,6 @@ |
187 | property bool saveHistory: true |
188 | property bool headerVisible: true |
189 | property bool showTuto: true |
190 | - property bool showAGPS: true |
191 | property int defaultDistancePOI: 1 |
192 | } |
193 | |
194 | @@ -139,7 +133,10 @@ |
195 | iconName: "settings" |
196 | text: i18n.tr("Settings") |
197 | enabled: navigationPage.buttonsEnabled |
198 | - onTriggered: mainPageStack.push(Qt.resolvedUrl("SettingsPage.qml")) |
199 | + onTriggered: { |
200 | + goThereActionPopover.hide(); |
201 | + mainPageStack.push(Qt.resolvedUrl("SettingsPage.qml")); |
202 | + } |
203 | }, |
204 | |
205 | Action { |
206 | @@ -160,6 +157,7 @@ |
207 | text: i18n.tr("Search") |
208 | enabled: navigationPage.buttonsEnabled |
209 | onTriggered: { |
210 | + goThereActionPopover.hide(); |
211 | mainPageStack.push(Qt.resolvedUrl("SearchPage.qml")) |
212 | } |
213 | }, |
214 | @@ -171,8 +169,9 @@ |
215 | visible: mainPageStack.routeState !== 'no' |
216 | enabled: navigationPage.buttonsEnabled |
217 | onTriggered: { |
218 | - goThereActionPopover.showMenu = true |
219 | - goThereActionPopover.show() |
220 | + goThereActionPopover.hide(); |
221 | + goThereActionPopover.showMenu = true; |
222 | + goThereActionPopover.show(); |
223 | } |
224 | } |
225 | ] |
226 | @@ -224,6 +223,7 @@ |
227 | break; |
228 | |
229 | case "http://get_routeinfo_list/": |
230 | + goThereActionPopover.hide(); |
231 | var dec_routeList = decodeURIComponent(url[1]); |
232 | mainPageStack.push(Qt.resolvedUrl("RouteInfoListPage.qml"), { routeList: JSON.parse(dec_routeList) }); |
233 | navApp.settings.headerVisible = true; |
234 | @@ -238,6 +238,7 @@ |
235 | break; |
236 | |
237 | case "http://clicked_on_map/": |
238 | + goThereActionPopover.hide(); |
239 | goThereActionPopover.osm_type = 'none'; |
240 | goThereActionPopover.osm_id = 'none'; |
241 | goThereActionPopover.phone = ''; |
242 | @@ -260,6 +261,7 @@ |
243 | |
244 | if (params[6] === 'nofollow' && mainPageStack.center_onpos === 2) |
245 | mainPageStack.center_onpos = 1; |
246 | + |
247 | mainPageStack.favPopup = false; |
248 | goThereActionPopover.show(); |
249 | |
250 | @@ -342,7 +344,7 @@ |
251 | mainPageStack.clickedLng = coord['lng']; |
252 | if (mainPageStack.center_onpos === 2) |
253 | mainPageStack.center_onpos = 1; |
254 | - mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + i18n.tr("Shared Position") + "\", lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}]);"); |
255 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + i18n.tr("Shared Position") + "\", lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}])"); |
256 | mainPageStack.favPopup = false; |
257 | goThereActionPopover.show(); |
258 | } |
259 | @@ -368,7 +370,7 @@ |
260 | mainPageStack.clickedLng = coord['lng']; |
261 | if (mainPageStack.center_onpos === 2) |
262 | mainPageStack.center_onpos = 1; |
263 | - mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + i18n.tr("Shared Position") + "\", lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}]);"); |
264 | + mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + i18n.tr("Shared Position") + "\", lat: " + mainPageStack.clickedLat + ", lng: " + mainPageStack.clickedLng + "}])"); |
265 | mainPageStack.favPopup = false; |
266 | goThereActionPopover.show(); |
267 | } |
268 | @@ -394,8 +396,9 @@ |
269 | enabled: navigationPage.buttonsEnabled |
270 | visible: mainPageStack.routeState !== 'no' |
271 | onClicked: { |
272 | - goThereActionPopover.showMenu = true |
273 | - goThereActionPopover.show() |
274 | + goThereActionPopover.hide(); |
275 | + goThereActionPopover.showMenu = true; |
276 | + goThereActionPopover.show(); |
277 | } |
278 | } |
279 | |
280 | @@ -403,6 +406,7 @@ |
281 | icon.name: "find" |
282 | enabled: navigationPage.buttonsEnabled |
283 | onClicked: { |
284 | + goThereActionPopover.hide(); |
285 | mainPageStack.push(Qt.resolvedUrl("SearchPage.qml")) |
286 | } |
287 | } |
288 | @@ -420,7 +424,10 @@ |
289 | ActionIcon { |
290 | icon.name: "settings" |
291 | enabled: navigationPage.buttonsEnabled |
292 | - onClicked: mainPageStack.push(Qt.resolvedUrl("SettingsPage.qml")) |
293 | + onClicked: { |
294 | + goThereActionPopover.hide(); |
295 | + mainPageStack.push(Qt.resolvedUrl("SettingsPage.qml")); |
296 | + } |
297 | } |
298 | } |
299 | } |
300 | @@ -739,41 +746,6 @@ |
301 | } |
302 | } |
303 | |
304 | - Component { |
305 | - id: agps |
306 | - Dialog { |
307 | - id: agpsPopup |
308 | - contentHeight: units.gu(50) |
309 | - title: i18n.tr("AGPS is disabled") |
310 | - text: i18n.tr("Enabling WiFi (even not connected) in Meizu & bq devices will auto activate the AGPS feature.\nYou'll get a location in seconds!\n\nNote: In Nexus devices AGPS is not available. Acquiring a GPS signal could take a while.") |
311 | - Button { |
312 | - text: i18n.tr("Skip") |
313 | - color: UbuntuColors.red |
314 | - onClicked: PopupUtils.close(agpsPopup); |
315 | - } |
316 | - Button { |
317 | - text: i18n.tr("WiFi Settings") |
318 | - color: UbuntuColors.lightGrey |
319 | - onClicked: { |
320 | - Qt.openUrlExternally("settings:///system/wifi"); |
321 | - PopupUtils.close(agpsPopup); |
322 | - } |
323 | - } |
324 | - ListItem { |
325 | - height: agpsPopup.height |
326 | - ListItemLayout { |
327 | - id: rememberAgps |
328 | - title.text: i18n.tr("Don't show this again") |
329 | - Switch { |
330 | - id: showAgpsSwitch |
331 | - checked: !navApp.settings.showAGPS |
332 | - onClicked: navApp.settings.showAGPS = !checked; |
333 | - } |
334 | - } |
335 | - } |
336 | - } |
337 | - } |
338 | - |
339 | Connections { |
340 | target: Qt.application |
341 | onStateChanged: |
342 | |
343 | === modified file 'qml/PoiListPage.qml' |
344 | --- qml/PoiListPage.qml 2016-04-18 21:01:07 +0000 |
345 | +++ qml/PoiListPage.qml 2016-04-22 14:13:13 +0000 |
346 | @@ -54,10 +54,10 @@ |
347 | text: i18n.tr("Show POIs on map") |
348 | visible: sortedPoiModel.count !== 0 |
349 | onTriggered: { |
350 | + mainPageStack.clear(); |
351 | if (mainPageStack.center_onpos === 2) |
352 | mainPageStack.center_onpos = 1; |
353 | - mainPageStack.executeJavaScript("ui.markers_POI_set(" + JSON.stringify(sortedPoiModel.allPOI()) + ");") |
354 | - mainPageStack.clear() |
355 | + mainPageStack.executeJavaScript("ui.markers_POI_set(" + JSON.stringify(sortedPoiModel.allPOI()) + ")"); |
356 | } |
357 | } |
358 | } |
359 | @@ -299,6 +299,8 @@ |
360 | |
361 | onClicked: { |
362 | mainPageStack.clear(); |
363 | + if (mainPageStack.center_onpos === 2) |
364 | + mainPageStack.center_onpos = 1; |
365 | mainPageStack.executeJavaScript("ui.markers_POI_set([{title: \"" + model.name + "\", lat: " + model.lat + ", lng: " + model.lng + ", osm_type: '" + model.osm_type + "', osm_id: " + model.osm_id + ", phone: \"" + model.phone + "\"}])"); |
366 | } |
367 |
Please update screenshot in welcome wizard of the navigation panel where you changed orange to blue.