Merge lp:~pkunal-parmar/ubuntu-calendar-app/SettingToAccountSetup into lp:ubuntu-calendar-app

Proposed by Kunal Parmar
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 621
Merged at revision: 665
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/SettingToAccountSetup
Merge into: lp:ubuntu-calendar-app
Diff against target: 204 lines (+143/-17)
5 files modified
CalendarChoicePopup.qml (+20/-15)
CalendarListButtonDelegate.qml (+51/-0)
OnlineAccountsDummy.qml (+27/-0)
OnlineAccountsHelper.qml (+42/-0)
click/calendar.apparmor (+3/-2)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/SettingToAccountSetup
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Calendar Developers Pending
Review via email: mp+254478@code.launchpad.net

Commit message

Resolves Bug #1437031 [
The app should allow the user to create a online account without go to system settings]

Description of the change

Resolves Bug #1437031 [
The app should allow the user to create a online account without go to system settings]

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
Renato Araujo Oliveira Filho (renatofilho) wrote :

Was this visuals specified by the Designers? I would prefer to have a "add new" button on the header. What do you think?

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

> Was this visuals specified by the Designers? I would prefer to have a "add
> new" button on the header. What do you think?

We were requested to put button below the list, so yes. But using google's icon was not part of it.
If using google's icon is not preferable then I can remove it.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Could you try to make the list item at least the same size as the
others account items. And the google icon the same size as the
calendar color rectangle.

On Thu, Apr 23, 2015 at 10:11 PM, Kunal Parmar <email address hidden> wrote:
>> Was this visuals specified by the Designers? I would prefer to have a "add
>> new" button on the header. What do you think?
>
> We were requested to put button below the list, so yes. But using google's icon was not part of it.
> If using google's icon is not preferable then I can remove it.
> --
> https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/SettingToAccountSetup/+merge/254478
> You are requested to review the proposed merge of lp:~pkunal-parmar/ubuntu-calendar-app/SettingToAccountSetup into lp:ubuntu-calendar-app.

619. By Kunal Parmar

review comment

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

> Could you try to make the list item at least the same size as the
> others account items. And the google icon the same size as the
> calendar color rectangle.
>

Hi, I tried to address your comment, can you have another look

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
620. By Kunal Parmar

merge from trunk

621. By Kunal Parmar

label color changed

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
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CalendarChoicePopup.qml'
2--- CalendarChoicePopup.qml 2015-04-27 19:40:30 +0000
3+++ CalendarChoicePopup.qml 2015-05-30 00:30:28 +0000
4@@ -61,23 +61,18 @@
5 ListView {
6 id: calendarsList
7 anchors.fill: parent
8- footer: Item {
9- id: footer
10- anchors.horizontalCenter: parent.horizontalCenter
11- width: aadCalendar.width
12- Button {
13- id:aadCalendar
14- objectName: "aadCalendar"
15- text: i18n.tr("Add new Calendar")
16- anchors.top :parent.top
17- anchors.topMargin:units.gu(2)
18- color: UbuntuColors.green
19- onClicked: {
20- Qt.openUrlExternally("settings:///system/online-accounts")
21- }
22-
23+
24+ footer: CalendarListButtonDelegate {
25+ id: importFromGoogleButton
26+
27+ visible: (onlineAccountHelper.status === Loader.Ready)
28+ iconSource: "image://theme/google"
29+ labelText: i18n.tr("Add online Calendar")
30+ onClicked: {
31+ onlineAccountHelper.item.setupExec()
32 }
33 }
34+
35 model : root.model.getCollections();
36 delegate: ListItem.Standard {
37 id: delegateComp
38@@ -142,5 +137,15 @@
39 }
40 }
41
42+ Loader {
43+ id: onlineAccountHelper
44+
45+ // if running on test mode does not load online account modules
46+ property string sourceFile: Qt.resolvedUrl("OnlineAccountsHelper.qml")
47+
48+ anchors.fill: parent
49+ asynchronous: true
50+ source: sourceFile
51+ }
52 }
53
54
55=== added file 'CalendarListButtonDelegate.qml'
56--- CalendarListButtonDelegate.qml 1970-01-01 00:00:00 +0000
57+++ CalendarListButtonDelegate.qml 2015-05-30 00:30:28 +0000
58@@ -0,0 +1,51 @@
59+/*
60+ * Copyright (C) 2012-2015 Canonical, Ltd.
61+ *
62+ * This program is free software; you can redistribute it and/or modify
63+ * it under the terms of the GNU General Public License as published by
64+ * the Free Software Foundation; version 3.
65+ *
66+ * This program is distributed in the hope that it will be useful,
67+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
68+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
69+ * GNU General Public License for more details.
70+ *
71+ * You should have received a copy of the GNU General Public License
72+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
73+ */
74+
75+import QtQuick 2.0
76+import Ubuntu.Components 1.1
77+import Ubuntu.Components.ListItems 1.0 as ListItem
78+
79+ListItem.Standard {
80+ id: root
81+
82+ property alias iconSource: uShape.source
83+ property alias labelText: name.text
84+
85+ Image {
86+ id: uShape
87+
88+ width: parent.height - units.gu(2)
89+ height: width
90+
91+ anchors {
92+ left: parent.left
93+ leftMargin: units.gu(2)
94+ verticalCenter: parent.verticalCenter
95+ }
96+ }
97+
98+ Label {
99+ id: name
100+
101+ anchors {
102+ left: uShape.right
103+ margins: units.gu(2)
104+ verticalCenter: parent.verticalCenter
105+ }
106+ color: UbuntuColors.midAubergine
107+ elide: Text.ElideRight
108+ }
109+}
110
111=== added file 'OnlineAccountsDummy.qml'
112--- OnlineAccountsDummy.qml 1970-01-01 00:00:00 +0000
113+++ OnlineAccountsDummy.qml 2015-05-30 00:30:28 +0000
114@@ -0,0 +1,27 @@
115+/*
116+ * Copyright (C) 2015 Canonical, Ltd.
117+ *
118+ * This program is free software; you can redistribute it and/or modify
119+ * it under the terms of the GNU General Public License as published by
120+ * the Free Software Foundation; version 3.
121+ *
122+ * This program is distributed in the hope that it will be useful,
123+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
124+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
125+ * GNU General Public License for more details.
126+ *
127+ * You should have received a copy of the GNU General Public License
128+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
129+ */
130+
131+import QtQuick 2.2
132+
133+Item {
134+ id: root
135+
136+ property bool running: false
137+
138+ function setupExec() {
139+ root.running = true
140+ }
141+}
142
143=== added file 'OnlineAccountsHelper.qml'
144--- OnlineAccountsHelper.qml 1970-01-01 00:00:00 +0000
145+++ OnlineAccountsHelper.qml 2015-05-30 00:30:28 +0000
146@@ -0,0 +1,42 @@
147+/*
148+ * Copyright (C) 2014 Canonical, Ltd.
149+ *
150+ * This program is free software; you can redistribute it and/or modify
151+ * it under the terms of the GNU General Public License as published by
152+ * the Free Software Foundation; version 3.
153+ *
154+ * This program is distributed in the hope that it will be useful,
155+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
156+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
157+ * GNU General Public License for more details.
158+ *
159+ * You should have received a copy of the GNU General Public License
160+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
161+ */
162+
163+import QtQuick 2.2
164+import Ubuntu.Components 1.1
165+import Ubuntu.OnlineAccounts 0.1
166+import Ubuntu.OnlineAccounts.Client 0.1
167+
168+Item {
169+ id: root
170+
171+ property bool running: false
172+
173+ function setupExec(){
174+ if (!root.running) {
175+ root.running = true
176+ setup.exec()
177+ }
178+ }
179+
180+ Setup {
181+ id: setup
182+ applicationId: "com.ubuntu.calendar_calendar"
183+ providerId: "google"
184+ onFinished: {
185+ root.running = false
186+ }
187+ }
188+}
189
190=== modified file 'click/calendar.apparmor'
191--- click/calendar.apparmor 2014-09-25 15:05:45 +0000
192+++ click/calendar.apparmor 2015-05-30 00:30:28 +0000
193@@ -2,7 +2,8 @@
194 "policy_groups": [
195 "calendar",
196 "networking",
197- "contacts"
198+ "contacts",
199+ "accounts"
200 ],
201 "policy_version": 1.2
202-}
203\ No newline at end of file
204+}

Subscribers

People subscribed via source and target branches

to status/vote changes: