Merge lp:~gary-wzl77/ubuntu-calendar-app/fix-1472081 into lp:ubuntu-calendar-app

Proposed by Gary.Wang
Status: Merged
Approved by: Mihir Soni
Approved revision: 692
Merged at revision: 703
Proposed branch: lp:~gary-wzl77/ubuntu-calendar-app/fix-1472081
Merge into: lp:ubuntu-calendar-app
Diff against target: 233 lines (+41/-32)
4 files modified
EventDetails.qml (+4/-2)
NewEvent.qml (+7/-4)
TimeLineBase.qml (+6/-2)
po/com.ubuntu.calendar.pot (+24/-24)
To merge this branch: bzr merge lp:~gary-wzl77/ubuntu-calendar-app/fix-1472081
Reviewer Review Type Date Requested Status
Mihir Soni Approve
Alan Pope 🍺🐧🐱 πŸ¦„ (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+264152@code.launchpad.net

Commit message

1.fix display bug for multiple all day events
2.skip event bubble display in case of endDateTime == dd-MM-yyyy 12:00 AM

Description of the change

1.fix display bug for multiple all day events
2.skip event bubble display in case of endDateTime == dd-MM-yyyy 12:00 AM

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
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :

Looks good to me, thanks!

review: Approve
Revision history for this message
Mihir Soni (mihirsoni) wrote :

Looks good to me !!
Could you please make sure when you commit next time , you revert the pot Files manually ?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventDetails.qml'
2--- EventDetails.qml 2015-06-27 17:52:44 +0000
3+++ EventDetails.qml 2015-07-08 13:39:43 +0000
4@@ -23,6 +23,7 @@
5 import QtOrganizer 5.0
6
7 import "Defines.js" as Defines
8+import "dateExt.js" as DateExt
9
10 Page {
11 id: root
12@@ -114,10 +115,11 @@
13 var endTime = e.endDateTime.toLocaleTimeString(Qt.locale(), Locale.ShortFormat)
14
15 if( e.allDay ) {
16- if( !e.startDateTime.isSameDay( e.endDateTime) ) {
17+ var days = Math.floor((e.endDateTime - e.startDateTime) / Date.msPerDay);
18+ if( days !== 1 ) {
19 dateLabel.text = i18n.tr("%1 - %2 (All Day)")
20 .arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
21- .arg( e.endDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
22+ .arg( e.endDateTime.addDays(-1).toLocaleDateString(Qt.locale(), Locale.LongFormat))
23 } else {
24 dateLabel.text = i18n.tr("%1 (All Day)").arg( e.startDateTime.toLocaleDateString(Qt.locale(), Locale.LongFormat))
25 }
26
27=== modified file 'NewEvent.qml'
28--- NewEvent.qml 2015-06-27 17:52:44 +0000
29+++ NewEvent.qml 2015-07-08 13:39:43 +0000
30@@ -155,6 +155,7 @@
31 }
32 if(e.allDay){
33 allDayEventCheckbox.checked =true;
34+ endDate = endDate.addDays(-1);
35 }
36
37 if(e.location) {
38@@ -202,12 +203,14 @@
39 }
40
41 event.allDay = allDayEventCheckbox.checked;
42-
43 event.startDateTime = startDate;
44- if (event.allDay)
45- event.endDateTime = startDate.addDays(1);
46- else
47+
48+ if (event.allDay){
49+ event.endDateTime = endDate.addDays(1);
50+ } else {
51 event.endDateTime = endDate;
52+ }
53+
54 event.displayLabel = titleEdit.text;
55 event.description = messageEdit.text;
56 event.location = locationEdit.text
57
58=== modified file 'TimeLineBase.qml'
59--- TimeLineBase.qml 2015-06-21 08:29:02 +0000
60+++ TimeLineBase.qml 2015-07-08 13:39:43 +0000
61@@ -224,6 +224,10 @@
62 var hour = 0;
63 var durationMin = 0;
64
65+ // skip it in case of endDateTime == dd-MM-yyyy 12:00 AM
66+ if (event.endDateTime - day == 0)
67+ return;
68+
69 if (event.endDateTime.getDate() - day.getDate() == 0 &&
70 event.startDateTime.getDate() - day.getDate() == 0) {
71 hour = event.startDateTime.getHours();
72@@ -244,8 +248,8 @@
73 yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + hour * hourHeight
74 durationMin = (24 - event.startDateTime.getHours()) * 60;
75 }
76- if (event.endDateTime - day > Date.msPerDay &&
77- event.startDateTime- day < 0) {
78+ if (event.endDateTime - day >= Date.msPerDay &&
79+ event.startDateTime- day <= 0) {
80 hour = 0;
81 yPos = 0;
82 durationMin = 24 * 60;
83
84=== modified file 'po/com.ubuntu.calendar.pot'
85--- po/com.ubuntu.calendar.pot 2015-06-23 15:59:08 +0000
86+++ po/com.ubuntu.calendar.pot 2015-07-08 13:39:43 +0000
87@@ -8,7 +8,7 @@
88 msgstr ""
89 "Project-Id-Version: \n"
90 "Report-Msgid-Bugs-To: \n"
91-"POT-Creation-Date: 2015-06-23 23:57+0800\n"
92+"POT-Creation-Date: 2015-07-08 21:32+0800\n"
93 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
94 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
95 "Language-Team: LANGUAGE <LL@li.org>\n"
96@@ -132,11 +132,11 @@
97 msgid "Delete this"
98 msgstr ""
99
100-#: ../DeleteConfirmationDialog.qml:51 ../EventDetails.qml:188
101+#: ../DeleteConfirmationDialog.qml:51 ../NewEvent.qml:68
102 msgid "Delete"
103 msgstr ""
104
105-#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:304
106+#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:322
107 msgid "Edit Event"
108 msgstr ""
109
110@@ -154,7 +154,7 @@
111 msgid "Edit this"
112 msgstr ""
113
114-#: ../EventActions.qml:50 ../NewEvent.qml:304
115+#: ../EventActions.qml:50 ../NewEvent.qml:322
116 msgid "New Event"
117 msgstr ""
118
119@@ -165,35 +165,35 @@
120 msgid "%1 <b>%2</b>"
121 msgstr ""
122
123-#: ../EventDetails.qml:42 ../NewEvent.qml:415
124+#: ../EventDetails.qml:43 ../NewEvent.qml:433
125 msgid "Event Details"
126 msgstr ""
127
128 #. TRANSLATORS: the first parameter refers to the name of event calendar.
129-#: ../EventDetails.qml:66
130+#: ../EventDetails.qml:67
131 #, qt-format
132 msgid "%1 Calendar"
133 msgstr ""
134
135-#: ../EventDetails.qml:118
136+#: ../EventDetails.qml:120
137 #, qt-format
138 msgid "%1 - %2 (All Day)"
139 msgstr ""
140
141-#: ../EventDetails.qml:122
142+#: ../EventDetails.qml:124
143 #, qt-format
144 msgid "%1 (All Day)"
145 msgstr ""
146
147-#: ../EventDetails.qml:201
148+#: ../EventDetails.qml:194
149 msgid "Edit"
150 msgstr ""
151
152-#: ../EventDetails.qml:352 ../NewEvent.qml:517
153+#: ../EventDetails.qml:345 ../NewEvent.qml:535
154 msgid "Guests"
155 msgstr ""
156
157-#: ../EventDetails.qml:395 ../EventReminder.qml:35 ../NewEvent.qml:614
158+#: ../EventDetails.qml:388 ../EventReminder.qml:35 ../NewEvent.qml:632
159 msgid "Reminder"
160 msgstr ""
161
162@@ -216,7 +216,7 @@
163 #. TRANSLATORS: this refers to how often a recurrent event repeats
164 #. and it is shown as the header of the option selector to choose
165 #. its repetition
166-#: ../EventRepetition.qml:237 ../NewEvent.qml:598
167+#: ../EventRepetition.qml:237 ../NewEvent.qml:616
168 msgid "Repeats"
169 msgstr ""
170
171@@ -259,51 +259,51 @@
172 msgid "After Date"
173 msgstr ""
174
175-#: ../NewEvent.qml:68
176+#: ../NewEvent.qml:84
177 msgid "Save"
178 msgstr ""
179
180-#: ../NewEvent.qml:177
181+#: ../NewEvent.qml:193
182 msgid "End time can't be before start time"
183 msgstr ""
184
185-#: ../NewEvent.qml:314
186+#: ../NewEvent.qml:332
187 msgid "Error"
188 msgstr ""
189
190-#: ../NewEvent.qml:316
191+#: ../NewEvent.qml:334
192 msgid "OK"
193 msgstr ""
194
195-#: ../NewEvent.qml:369
196+#: ../NewEvent.qml:387
197 msgid "From"
198 msgstr ""
199
200-#: ../NewEvent.qml:382
201+#: ../NewEvent.qml:400
202 msgid "To"
203 msgstr ""
204
205-#: ../NewEvent.qml:399
206+#: ../NewEvent.qml:417
207 msgid "All day event"
208 msgstr ""
209
210-#: ../NewEvent.qml:428
211+#: ../NewEvent.qml:446
212 msgid "Event Name"
213 msgstr ""
214
215-#: ../NewEvent.qml:446
216+#: ../NewEvent.qml:464
217 msgid "Description"
218 msgstr ""
219
220-#: ../NewEvent.qml:464
221+#: ../NewEvent.qml:482
222 msgid "Location"
223 msgstr ""
224
225-#: ../NewEvent.qml:479 com.ubuntu.calendar_calendar.desktop.in.in.h:1
226+#: ../NewEvent.qml:497 com.ubuntu.calendar_calendar.desktop.in.in.h:1
227 msgid "Calendar"
228 msgstr ""
229
230-#: ../NewEvent.qml:521
231+#: ../NewEvent.qml:539
232 msgid "Add Guest"
233 msgstr ""
234

Subscribers

People subscribed via source and target branches

to status/vote changes: