Merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/move-save-cancel-buttons into lp:ubuntu-calendar-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Mihir Soni
Approved revision: 415
Merged at revision: 412
Proposed branch: lp:~ubuntu-calendar-dev/ubuntu-calendar-app/move-save-cancel-buttons
Merge into: lp:ubuntu-calendar-app
Diff against target: 164 lines (+27/-89)
3 files modified
EditToolbar.qml (+0/-62)
NewEvent.qml (+24/-25)
tests/autopilot/calendar_app/emulators.py (+3/-2)
To merge this branch: bzr merge lp:~ubuntu-calendar-dev/ubuntu-calendar-app/move-save-cancel-buttons
Reviewer Review Type Date Requested Status
Mihir Soni Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+231860@code.launchpad.net

Commit message

Moved the save and cancel buttons in the NewEvent Page to the header.

Description of the change

Moved the save and cancel buttons in the NewEvent Page to the header. Did not notice any regressions. Still need to fix AP tests.

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: Needs Fixing (continuous-integration)
415. By Nekhelesh Ramananthan

Proposing a AP fix without testing it

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
Mihir Soni (mihirsoni) wrote :

Looks good to me.
Thanks Nik90.

Thanks for the AP modification too.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'EditToolbar.qml'
2--- EditToolbar.qml 2014-08-18 16:48:54 +0000
3+++ EditToolbar.qml 1970-01-01 00:00:00 +0000
4@@ -1,62 +0,0 @@
5-/*
6- * Copyright (C) 2013-2014 Canonical Ltd
7- *
8- * This file is part of Ubuntu Calendar App
9- *
10- * Ubuntu Calendar App is free software: you can redistribute it and/or modify
11- * it under the terms of the GNU General Public License version 3 as
12- * published by the Free Software Foundation.
13- *
14- * Ubuntu Calendar App is distributed in the hope that it will be useful,
15- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17- * GNU General Public License for more details.
18- *
19- * You should have received a copy of the GNU General Public License
20- * along with this program. If not, see <http://www.gnu.org/licenses/>.
21- */
22-import QtQuick 2.0
23-import Ubuntu.Components 0.1
24-import Ubuntu.Components.ListItems 0.1 as ListItem
25-
26-Rectangle {
27- id: root
28-
29- signal reject()
30- signal accept()
31-
32- property alias acceptAction: accept.action
33- property alias rejectAction: reject.action
34-
35- color: "grey"
36-
37- Button {
38- id: reject
39- objectName: "reject"
40-
41- action: Action {
42- text: i18n.tr("Cancel")
43- }
44- anchors {
45- left: parent.left
46- leftMargin: units.gu(1)
47- verticalCenter: parent.verticalCenter
48- }
49- onClicked: root.reject()
50- }
51-
52- Button {
53- id: accept
54- objectName: "accept"
55-
56- action: Action {
57- text: i18n.tr("Done")
58- }
59- anchors {
60- right: parent.right
61- rightMargin: units.gu(1)
62- verticalCenter: parent.verticalCenter
63- }
64- onClicked: root.accept()
65- }
66-}
67
68=== modified file 'NewEvent.qml'
69--- NewEvent.qml 2014-08-21 14:23:21 +0000
70+++ NewEvent.qml 2014-08-22 11:41:15 +0000
71@@ -15,13 +15,14 @@
72 * You should have received a copy of the GNU General Public License
73 * along with this program. If not, see <http://www.gnu.org/licenses/>.
74 */
75-import QtQuick 2.0
76+
77+import QtQuick 2.2
78 import QtOrganizer 5.0
79-import Ubuntu.Components 0.1
80-import Ubuntu.Components.Popups 0.1
81-import Ubuntu.Components.ListItems 0.1
82-import Ubuntu.Components.Themes.Ambiance 0.1
83-import Ubuntu.Components.Pickers 0.1
84+import Ubuntu.Components 1.1
85+import Ubuntu.Components.Popups 1.0
86+import Ubuntu.Components.ListItems 1.0
87+import Ubuntu.Components.Themes.Ambiance 1.0
88+import Ubuntu.Components.Pickers 1.0
89 import QtOrganizer 5.0
90
91 import "Defines.js" as Defines
92@@ -51,6 +52,22 @@
93 endTimeInput.text = Qt.formatDateTime(endDate, "hh:mm");
94 }
95
96+ head {
97+ backAction: Action {
98+ iconName: "close"
99+ onTriggered: pageStack.pop();
100+ }
101+
102+ actions: [
103+ Action {
104+ iconName: "ok"
105+ objectName: "save"
106+ text: i18n.tr("Save")
107+ onTriggered: saveToQtPim();
108+ }
109+ ]
110+ }
111+
112 Component.onCompleted: {
113 //If current date is setted by an argument we don't have to change it.
114 if(typeof(date) === 'undefined'){
115@@ -370,7 +387,7 @@
116 anchors.margins: units.gu(2)
117
118 contentWidth: width
119- contentHeight: column.height + toolbar.height
120+ contentHeight: column.height
121
122 Column {
123 id: column
124@@ -717,24 +734,6 @@
125 }
126 }
127
128- EditToolbar {
129- id: toolbar
130- anchors {
131- left: parent.left
132- right: parent.right
133- bottom: parent.bottom
134- }
135- height: units.gu(6)
136- acceptAction: Action {
137- text: i18n.tr("Save")
138- onTriggered: saveToQtPim();
139- }
140- rejectAction: Action {
141- text: i18n.tr("Cancel")
142- onTriggered: pageStack.pop();
143- }
144- }
145-
146 // used to keep the field visible when the keyboard appear or dismiss
147 KeyboardRectangle {
148 id: keyboard
149
150=== modified file 'tests/autopilot/calendar_app/emulators.py'
151--- tests/autopilot/calendar_app/emulators.py 2014-08-18 18:36:35 +0000
152+++ tests/autopilot/calendar_app/emulators.py 2014-08-22 11:41:15 +0000
153@@ -530,8 +530,9 @@
154 @autopilot.logging.log_action(logger.info)
155 def _save(self):
156 """Save the new event."""
157- save_button = self.select_single('Button', objectName='accept')
158- self.pointing_device.click_object(save_button)
159+ root = self.get_root_instance()
160+ header = root.select_single(MainView).get_header()
161+ header.click_action_button('save')
162
163
164 class NewEventEntryField(ubuntuuitoolkit.TextField):

Subscribers

People subscribed via source and target branches

to status/vote changes: