Merge lp:~mihirsoni/ubuntu-calendar-app/1342275 into lp:ubuntu-calendar-app

Proposed by Mihir Soni on 2014-08-11
Status: Work in progress
Proposed branch: lp:~mihirsoni/ubuntu-calendar-app/1342275
Merge into: lp:ubuntu-calendar-app
Diff against target: 69 lines (+37/-1)
1 file modified
calendar.qml (+37/-1)
To merge this branch: bzr merge lp:~mihirsoni/ubuntu-calendar-app/1342275
Reviewer Review Type Date Requested Status
Ubuntu Calendar Developers 2014-08-11 Pending
Review via email: mp+230386@code.launchpad.net

Commit message

If there are no accounts to sync, navigate user to account screen.

Description of the change

If there are no accounts to sync, navigate user to account screen.

To post a comment you must log in.
Mihir Soni (mihirsoni) wrote :

This might work and might not work.
We are not sure of ProivderID as of now, i have kept it as Google as of now.

392. By Mihir Soni on 2014-10-22

merge from trunk

Unmerged revisions

392. By Mihir Soni on 2014-10-22

merge from trunk

391. By Mihir Soni on 2014-08-11

If there are no accounts ,navigate to system accounts

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'calendar.qml'
2--- calendar.qml 2014-10-20 14:18:13 +0000
3+++ calendar.qml 2014-10-22 15:49:38 +0000
4@@ -20,6 +20,8 @@
5 import Ubuntu.Components.Popups 1.0
6 import QtOrganizer 5.0
7 import Ubuntu.SyncMonitor 0.1
8+import Ubuntu.OnlineAccounts 0.1
9+import Ubuntu.OnlineAccounts.Client 0.1
10
11 import "dateExt.js" as DateExt
12
13@@ -99,6 +101,10 @@
14 SyncMonitor {
15 id: syncMonitor
16 }
17+ AccountServiceModel {
18+ id: accounts
19+ service: "google"
20+ }
21
22 PageStack {
23 id: pageStack
24@@ -293,7 +299,7 @@
25 tabs.selectedTabIndex= 1;
26 }
27 } // End of Component.onCompleted:
28-
29+
30 EventActions {
31 id: commonHeaderActions
32 }
33@@ -475,6 +481,36 @@
34 }
35 }
36 }
37+ Component {
38+ id: noAccountDialog
39+ Dialog {
40+ id: noAccount
41+ objectName: "noAccountDialog"
42+ title: i18n.tr("No account available")
43+ text: i18n.tr("Please setup an account in the system settings")
44+
45+ Connections {
46+ target: accounts
47+ onCountChanged: {
48+ if (accounts.count == 1) {
49+ PopupUtils.close(noAccount)
50+ }
51+ }
52+ }
53+ Setup {
54+ id: setup
55+ applicationId: "com.ubuntu.calendar_calendar"
56+ providerId: "google"
57+ }
58+
59+ Button {
60+ objectName: "openAccountButton"
61+ text: i18n.tr("Add account")
62+ color: UbuntuColors.orange
63+ onClicked: setup.exec()
64+ }
65+ }
66+ }
67 }
68 }
69 }

Subscribers

People subscribed via source and target branches

to status/vote changes: