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

Proposed by Kunal Parmar on 2015-01-15
Status: Merged
Approved by: Mihir Soni on 2015-01-16
Approved revision: 570
Merged at revision: 569
Proposed branch: lp:~pkunal-parmar/ubuntu-calendar-app/Default-View
Merge into: lp:ubuntu-calendar-app
Diff against target: 68 lines (+17/-4)
3 files modified
TimeLineBaseComponent.qml (+1/-0)
calendar.qml (+4/-4)
tests/autopilot/calendar_app/tests/test_weekview.py (+12/-0)
To merge this branch: bzr merge lp:~pkunal-parmar/ubuntu-calendar-app/Default-View
Reviewer Review Type Date Requested Status
Mihir Soni Approve on 2015-01-16
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-01-16
Alan Pope 🍺🐧🐱 πŸ¦„ 2015-01-15 Approve on 2015-01-15
Review via email: mp+246564@code.launchpad.net

Commit Message

Changing default view to week view

Description of the Change

Changing default view to week view

To post a comment you must log in.

Looks good to me!

review: Approve
Mihir Soni (mihirsoni) wrote :

Looks good to me !!
Thanks Kunal

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'TimeLineBaseComponent.qml'
2--- TimeLineBaseComponent.qml 2014-11-29 06:12:41 +0000
3+++ TimeLineBaseComponent.qml 2015-01-16 11:52:11 +0000
4@@ -126,6 +126,7 @@
5
6 Flickable {
7 id: timeLineView
8+ objectName: "timelineview"
9
10 height: parent.height
11 width: parent.width - units.gu(6)
12
13=== modified file 'calendar.qml'
14--- calendar.qml 2014-11-08 11:26:37 +0000
15+++ calendar.qml 2015-01-16 11:52:11 +0000
16@@ -195,7 +195,7 @@
17 property int starttime: -1;
18 property int endtime: -1;
19
20- selectedTabIndex: monthTab.index
21+ selectedTabIndex: weekTab.index
22
23 function newEvent() {
24 var startDate = new Date();
25@@ -276,17 +276,17 @@
26 }
27 else {
28 // If no endtime has been setted, open the starttime date in day view
29- tabs.selectedTabIndex = 3;
30+ tabs.selectedTabIndex = dayTab.index;
31 }
32 } // End of else if (starttime)
33 else {
34 // Due to bug #1231558 {if (args.defaultArgument.at(0))} is always true
35 // After the fix we can delete this else
36- tabs.selectedTabIndex= 1;
37+ tabs.selectedTabIndex = weekTab.index;
38 }
39 } // End of if about args.values
40 else {
41- tabs.selectedTabIndex= 1;
42+ tabs.selectedTabIndex = weekTab.index;
43 }
44 } // End of Component.onCompleted:
45
46
47=== modified file 'tests/autopilot/calendar_app/tests/test_weekview.py'
48--- tests/autopilot/calendar_app/tests/test_weekview.py 2014-11-29 06:21:29 +0000
49+++ tests/autopilot/calendar_app/tests/test_weekview.py 2015-01-16 11:52:11 +0000
50@@ -46,6 +46,18 @@
51 # prevent timing issues with swiping
52 old_day = self.app.main_view.to_local_date(
53 self.week_view.dayStart.datetime)
54+
55+ pathView = self.week_view.select_single("PathViewBase")
56+ timeLineBase = pathView.select_single("TimeLineBaseComponent",
57+ isActive=True)
58+ timelineview = timeLineBase.select_single(objectName="timelineview")
59+ val = 0
60+ if direction == 1:
61+ val = timelineview.contentWidth - timelineview.width
62+
63+ while timelineview.contentX != val:
64+ self.app.main_view.swipe_view(direction, self.week_view)
65+
66 self.app.main_view.swipe_view(direction, self.week_view)
67 self.assertThat(lambda:
68 self.app.main_view.to_local_date(

Subscribers

People subscribed via source and target branches

to status/vote changes: