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
=== removed file 'EditToolbar.qml'
--- EditToolbar.qml 2014-08-18 16:48:54 +0000
+++ EditToolbar.qml 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
1/*
2 * Copyright (C) 2013-2014 Canonical Ltd
3 *
4 * This file is part of Ubuntu Calendar App
5 *
6 * Ubuntu Calendar App is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 3 as
8 * published by the Free Software Foundation.
9 *
10 * Ubuntu Calendar App is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18import QtQuick 2.0
19import Ubuntu.Components 0.1
20import Ubuntu.Components.ListItems 0.1 as ListItem
21
22Rectangle {
23 id: root
24
25 signal reject()
26 signal accept()
27
28 property alias acceptAction: accept.action
29 property alias rejectAction: reject.action
30
31 color: "grey"
32
33 Button {
34 id: reject
35 objectName: "reject"
36
37 action: Action {
38 text: i18n.tr("Cancel")
39 }
40 anchors {
41 left: parent.left
42 leftMargin: units.gu(1)
43 verticalCenter: parent.verticalCenter
44 }
45 onClicked: root.reject()
46 }
47
48 Button {
49 id: accept
50 objectName: "accept"
51
52 action: Action {
53 text: i18n.tr("Done")
54 }
55 anchors {
56 right: parent.right
57 rightMargin: units.gu(1)
58 verticalCenter: parent.verticalCenter
59 }
60 onClicked: root.accept()
61 }
62}
630
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2014-08-21 14:23:21 +0000
+++ NewEvent.qml 2014-08-22 11:41:15 +0000
@@ -15,13 +15,14 @@
15 * You should have received a copy of the GNU General Public License15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */17 */
18import QtQuick 2.018
19import QtQuick 2.2
19import QtOrganizer 5.020import QtOrganizer 5.0
20import Ubuntu.Components 0.121import Ubuntu.Components 1.1
21import Ubuntu.Components.Popups 0.122import Ubuntu.Components.Popups 1.0
22import Ubuntu.Components.ListItems 0.123import Ubuntu.Components.ListItems 1.0
23import Ubuntu.Components.Themes.Ambiance 0.124import Ubuntu.Components.Themes.Ambiance 1.0
24import Ubuntu.Components.Pickers 0.125import Ubuntu.Components.Pickers 1.0
25import QtOrganizer 5.026import QtOrganizer 5.0
2627
27import "Defines.js" as Defines28import "Defines.js" as Defines
@@ -51,6 +52,22 @@
51 endTimeInput.text = Qt.formatDateTime(endDate, "hh:mm");52 endTimeInput.text = Qt.formatDateTime(endDate, "hh:mm");
52 }53 }
5354
55 head {
56 backAction: Action {
57 iconName: "close"
58 onTriggered: pageStack.pop();
59 }
60
61 actions: [
62 Action {
63 iconName: "ok"
64 objectName: "save"
65 text: i18n.tr("Save")
66 onTriggered: saveToQtPim();
67 }
68 ]
69 }
70
54 Component.onCompleted: {71 Component.onCompleted: {
55 //If current date is setted by an argument we don't have to change it.72 //If current date is setted by an argument we don't have to change it.
56 if(typeof(date) === 'undefined'){73 if(typeof(date) === 'undefined'){
@@ -370,7 +387,7 @@
370 anchors.margins: units.gu(2)387 anchors.margins: units.gu(2)
371388
372 contentWidth: width389 contentWidth: width
373 contentHeight: column.height + toolbar.height390 contentHeight: column.height
374391
375 Column {392 Column {
376 id: column393 id: column
@@ -717,24 +734,6 @@
717 }734 }
718 }735 }
719736
720 EditToolbar {
721 id: toolbar
722 anchors {
723 left: parent.left
724 right: parent.right
725 bottom: parent.bottom
726 }
727 height: units.gu(6)
728 acceptAction: Action {
729 text: i18n.tr("Save")
730 onTriggered: saveToQtPim();
731 }
732 rejectAction: Action {
733 text: i18n.tr("Cancel")
734 onTriggered: pageStack.pop();
735 }
736 }
737
738 // used to keep the field visible when the keyboard appear or dismiss737 // used to keep the field visible when the keyboard appear or dismiss
739 KeyboardRectangle {738 KeyboardRectangle {
740 id: keyboard739 id: keyboard
741740
=== modified file 'tests/autopilot/calendar_app/emulators.py'
--- tests/autopilot/calendar_app/emulators.py 2014-08-18 18:36:35 +0000
+++ tests/autopilot/calendar_app/emulators.py 2014-08-22 11:41:15 +0000
@@ -530,8 +530,9 @@
530 @autopilot.logging.log_action(logger.info)530 @autopilot.logging.log_action(logger.info)
531 def _save(self):531 def _save(self):
532 """Save the new event."""532 """Save the new event."""
533 save_button = self.select_single('Button', objectName='accept')533 root = self.get_root_instance()
534 self.pointing_device.click_object(save_button)534 header = root.select_single(MainView).get_header()
535 header.click_action_button('save')
535536
536537
537class NewEventEntryField(ubuntuuitoolkit.TextField):538class NewEventEntryField(ubuntuuitoolkit.TextField):

Subscribers

People subscribed via source and target branches

to status/vote changes: