Merge lp:~neokore/ubuntu-weather-app/ActivityIndicatorLoading into lp:ubuntu-weather-app/obsolete.trunk

Proposed by Raúl Yeguas
Status: Merged
Approved by: Martin Borho
Approved revision: 20
Merged at revision: 19
Proposed branch: lp:~neokore/ubuntu-weather-app/ActivityIndicatorLoading
Merge into: lp:ubuntu-weather-app/obsolete.trunk
Diff against target: 51 lines (+11/-5)
1 file modified
ubuntu-weather-app.qml (+11/-5)
To merge this branch: bzr merge lp:~neokore/ubuntu-weather-app/ActivityIndicatorLoading
Reviewer Review Type Date Requested Status
Martin Borho Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+161897@code.launchpad.net

Commit message

Added an ActivityIndicator to appear while loading data or adding a new location

Description of the change

Added an ActivityIndicator to appear while loading data or adding a new location

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Martin Borho (martin-borho) wrote :

Fine!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu-weather-app.qml'
2--- ubuntu-weather-app.qml 2013-05-01 17:10:19 +0000
3+++ ubuntu-weather-app.qml 2013-05-01 17:43:30 +0000
4@@ -55,8 +55,9 @@
5 tabsString += "Components.LocationTabEmpty { }"
6 }
7 tabsString += "}"; // END Tabs componen
8- if(loading != null)
9- loading.destroy();
10+ if(bigLoading !== null)
11+ bigLoading.destroy();
12+ loading.running = false;
13 tabsObject = Qt.createQmlObject(tabsString, tabPage, "tabs")
14 if(focusToLast)
15 tabsObject.selectedTabIndex = locLength -1;
16@@ -71,7 +72,8 @@
17 locationDataWorker.sendMessage({
18 action: "newLocationData",
19 params: {location:locationObj, units:"metric"}
20- })
21+ });
22+ loading.running = true;
23 }
24
25 function onNewLocationDataSuccess(resp) {
26@@ -80,6 +82,8 @@
27 }
28
29 function refreshData() {
30+ if(bigLoading === null)
31+ loading.running = true;
32 storage.getLocations(function(locations) {
33 locationDataWorker.sendMessage({
34 action: "updateData",
35@@ -104,12 +108,14 @@
36 Page {
37 id: tabPage
38 title: "Simple page"
39-
40+ ActivityIndicator{id:loading; running: false; z: 1; anchors{top: parent.top; topMargin: units.gu(0.5); right: parent.right; rightMargin: units.gu(1)}}
41 Tabs {
42 id: tabs
43 objectName: "Tabs"
44 anchors.fill: parent
45- Tab {Components.LoadingComponent{id:loading; anchors.fill: tabs}}
46+ Tab {
47+ Components.LoadingComponent{id:bigLoading; anchors.fill: parent; z: 2;}
48+ }
49 }
50 }
51 }

Subscribers

People subscribed via source and target branches