Merge lp:~dpniel/ubuntu-calendar-app/ScrollView2 into lp:ubuntu-calendar-app

Proposed by Dan Chapman 
Status: Work in progress
Proposed branch: lp:~dpniel/ubuntu-calendar-app/ScrollView2
Merge into: lp:ubuntu-calendar-app
Diff against target: 1313 lines (+555/-486)
4 files modified
NewEvent.qml (+305/-301)
TimeLineBaseComponent.qml (+133/-132)
YearView.qml (+20/-8)
po/com.ubuntu.calendar.pot (+97/-45)
To merge this branch: bzr merge lp:~dpniel/ubuntu-calendar-app/ScrollView2
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Needs Fixing
Ubuntu Calendar Developers Pending
Review via email: mp+285027@code.launchpad.net

Commit message

Adds ScrollView component to view Flickables

It's not possible to add the ScrollView to the PathView where used for
horizontal traversing, like in year view as Path doesn't inherit
Flickable. So another solution will Probably be needed for those areas.

Description of the change

Adds ScrollView component to view Flickables

It's not possible to add the ScrollView to the PathView where used for
horizontal traversing, like in year view as Path doesn't inherit
Flickable. So another solution will Probably be needed for those areas.

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
759. By Dan Chapman 

Forward on yearviewdelegate refresh call

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

759. By Dan Chapman 

Forward on yearviewdelegate refresh call

758. By Dan Chapman 

Adds ScrollView component to view Flickables

It's not possible to add the ScrollView to the PathView where used for
horizontal traversing, like in year view as Path doesn't inherit
Flickable. So another solution will Probably be needed for those areas.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'NewEvent.qml'
--- NewEvent.qml 2016-02-02 22:54:03 +0000
+++ NewEvent.qml 2016-02-04 10:08:25 +0000
@@ -344,321 +344,325 @@
344 id:eventUtils344 id:eventUtils
345 }345 }
346346
347 Flickable{347 ScrollView {
348 id: flickable
349 clip: true
350
351 property var activeItem: null
352
353 function makeMeVisible(item) {
354 if (!item) {
355 return
356 }
357
358 activeItem = item
359 var position = flickable.contentItem.mapFromItem(item, 0, 0);
360
361 // check if the item is already visible
362 var bottomY = flickable.contentY + flickable.height
363 var itemBottom = position.y + item.height
364 if (position.y >= flickable.contentY && itemBottom <= bottomY) {
365 return;
366 }
367
368 // if it is not, try to scroll and make it visible
369 var targetY = position.y + item.height - flickable.height
370 if (targetY >= 0 && position.y) {
371 flickable.contentY = targetY;
372 } else if (position.y < flickable.contentY) {
373 // if it is hidden at the top, also show it
374 flickable.contentY = position.y;
375 }
376 flickable.returnToBounds()
377 }
378
379 anchors.fill: parent348 anchors.fill: parent
380 contentWidth: width349
381 contentHeight: column.height + units.gu(10)350 Flickable{
382351 id: flickable
383 Column {352 clip: true
384 id: column353
385354 property var activeItem: null
386 width: parent.width355
387356 function makeMeVisible(item) {
388 NewEventTimePicker{357 if (!item) {
389 id: startDateTimeInput358 return
390 header: i18n.tr("From")359 }
391 showTimePicker: !allDayEventCheckbox.checked360
392 anchors {361 activeItem = item
393 left: parent.left362 var position = flickable.contentItem.mapFromItem(item, 0, 0);
394 right: parent.right363
395 }364 // check if the item is already visible
396 onDateTimeChanged: {365 var bottomY = flickable.contentY + flickable.height
397 startDate = dateTime;366 var itemBottom = position.y + item.height
398 }367 if (position.y >= flickable.contentY && itemBottom <= bottomY) {
399 }368 return;
400369 }
401 NewEventTimePicker{370
402 id: endDateTimeInput371 // if it is not, try to scroll and make it visible
403 header: i18n.tr("To")372 var targetY = position.y + item.height - flickable.height
404 showTimePicker: !allDayEventCheckbox.checked373 if (targetY >= 0 && position.y) {
405 anchors {374 flickable.contentY = targetY;
406 left: parent.left375 } else if (position.y < flickable.contentY) {
407 right: parent.right376 // if it is hidden at the top, also show it
408 }377 flickable.contentY = position.y;
409 onDateTimeChanged: {378 }
410 endDate = dateTime;379 flickable.returnToBounds()
411 }380 }
412 }381
413382 anchors.fill: parent
414 ListItem.Standard {383 contentWidth: width
415 anchors {384 contentHeight: column.height + units.gu(10)
416 left: parent.left385
417 right: parent.right386 Column {
418 }387 id: column
419388
420 text: i18n.tr("All day event")389 width: parent.width
421 showDivider: false390
422 control: CheckBox {391 NewEventTimePicker{
423 objectName: "allDayEventCheckbox"392 id: startDateTimeInput
424 id: allDayEventCheckbox393 header: i18n.tr("From")
425 checked: false394 showTimePicker: !allDayEventCheckbox.checked
426 }395 anchors {
427 }396 left: parent.left
428397 right: parent.right
429 ListItem.ThinDivider {}398 }
430399 onDateTimeChanged: {
431 Column {400 startDate = dateTime;
432 width: parent.width401 }
433 spacing: units.gu(1)402 }
434403
435 ListItem.Header{404 NewEventTimePicker{
436 text: i18n.tr("Event Details")405 id: endDateTimeInput
437 }406 header: i18n.tr("To")
438407 showTimePicker: !allDayEventCheckbox.checked
439 TextField {408 anchors {
440 id: titleEdit409 left: parent.left
441 objectName: "newEventName"410 right: parent.right
442411 }
443 anchors {412 onDateTimeChanged: {
444 left: parent.left413 endDate = dateTime;
445 right: parent.right414 }
446 margins: units.gu(2)415 }
447 }416
448417 ListItem.Standard {
449 placeholderText: i18n.tr("Event Name")418 anchors {
450 onFocusChanged: {419 left: parent.left
451 if(titleEdit.focus) {420 right: parent.right
452 flickable.makeMeVisible(titleEdit);421 }
453 }422
454 }423 text: i18n.tr("All day event")
455 }424 showDivider: false
456425 control: CheckBox {
457 TextArea{426 objectName: "allDayEventCheckbox"
458 id: messageEdit427 id: allDayEventCheckbox
459 objectName: "eventDescriptionInput"428 checked: false
460429 }
461 anchors {430 }
462 left: parent.left431
463 right: parent.right432 ListItem.ThinDivider {}
464 margins: units.gu(2)433
465 }434 Column {
466435 width: parent.width
467 placeholderText: i18n.tr("Description")436 spacing: units.gu(1)
468 onFocusChanged: {437
469 if(messageEdit.focus) {438 ListItem.Header{
470 flickable.makeMeVisible(messageEdit);439 text: i18n.tr("Event Details")
471 }440 }
472 }441
473 }442 TextField {
474443 id: titleEdit
475 TextField {444 objectName: "newEventName"
476 id: locationEdit445
477 objectName: "eventLocationInput"446 anchors {
478447 left: parent.left
479 anchors {448 right: parent.right
480 left: parent.left449 margins: units.gu(2)
481 right: parent.right450 }
482 margins: units.gu(2)451
483 }452 placeholderText: i18n.tr("Event Name")
484453 onFocusChanged: {
485 placeholderText: i18n.tr("Location")454 if(titleEdit.focus) {
486455 flickable.makeMeVisible(titleEdit);
487 onFocusChanged: {456 }
488 if(locationEdit.focus) {457 }
489 flickable.makeMeVisible(locationEdit);458 }
490 }459
491 }460 TextArea{
492 }461 id: messageEdit
493 }462 objectName: "eventDescriptionInput"
494463
495 Column {464 anchors {
496 width: parent.width465 left: parent.left
497 spacing: units.gu(1)466 right: parent.right
498467 margins: units.gu(2)
499 ListItem.Header {468 }
500 text: i18n.tr("Calendar")469
501 }470 placeholderText: i18n.tr("Description")
502471 onFocusChanged: {
503 OptionSelector{472 if(messageEdit.focus) {
504 id: calendarsOption473 flickable.makeMeVisible(messageEdit);
505 objectName: "calendarsOption"474 }
506475 }
507 anchors {476 }
508 left: parent.left477
509 right: parent.right478 TextField {
510 margins: units.gu(2)479 id: locationEdit
511 }480 objectName: "eventLocationInput"
512481
513 containerHeight: itemHeight * 4482 anchors {
514 model: root.model.getWritableCollections();483 left: parent.left
515484 right: parent.right
516 delegate: OptionSelectorDelegate{485 margins: units.gu(2)
517 text: modelData.name486 }
518487
519 UbuntuShape{488 placeholderText: i18n.tr("Location")
520 id: calColor489
521 width: height490 onFocusChanged: {
522 height: parent.height - units.gu(2)491 if(locationEdit.focus) {
523 color: modelData.color492 flickable.makeMeVisible(locationEdit);
524 anchors.right: parent.right493 }
525 anchors.rightMargin: units.gu(2)494 }
526 anchors.verticalCenter: parent.verticalCenter495 }
527 }496 }
528 }497
529 onExpandedChanged: Qt.inputMethod.hide();498 Column {
530 }499 width: parent.width
531 }500 spacing: units.gu(1)
532501
533 Column {502 ListItem.Header {
534 width: parent.width503 text: i18n.tr("Calendar")
535 spacing: units.gu(1)504 }
536505
537 ListItem.Header {506 OptionSelector{
538 text: i18n.tr("Guests")507 id: calendarsOption
539 }508 objectName: "calendarsOption"
540509
541 Button{510 anchors {
542 text: i18n.tr("Add Guest")511 left: parent.left
543 objectName: "addGuestButton"512 right: parent.right
544513 margins: units.gu(2)
545 anchors {514 }
546 left: parent.left515
547 right: parent.right516 containerHeight: itemHeight * 4
548 margins: units.gu(2)517 model: root.model.getWritableCollections();
549 }518
550519 delegate: OptionSelectorDelegate{
551 onClicked: {520 text: modelData.name
552 var popup = PopupUtils.open(Qt.resolvedUrl("ContactChoicePopup.qml"), contactList);521
553 popup.contactSelected.connect( function(contact) {522 UbuntuShape{
554 var t = internal.contactToAttendee(contact);523 id: calColor
555 if( !internal.isContactAlreadyAdded(contact) ) {524 width: height
556 contactModel.append(t);525 height: parent.height - units.gu(2)
557 contactList.array.push(t);526 color: modelData.color
558 }527 anchors.right: parent.right
559 });528 anchors.rightMargin: units.gu(2)
560 }529 anchors.verticalCenter: parent.verticalCenter
561 }530 }
562531 }
563 UbuntuShape {532 onExpandedChanged: Qt.inputMethod.hide();
564 anchors {533 }
565 left: parent.left534 }
566 right: parent.right535
567 margins: units.gu(2)536 Column {
568 }537 width: parent.width
569538 spacing: units.gu(1)
570 height: contactList.height539
571540 ListItem.Header {
572 Column{541 text: i18n.tr("Guests")
573 id: contactList542 }
574 objectName: "guestList"543
575544 Button{
576 spacing: units.gu(1)545 text: i18n.tr("Add Guest")
577 width: parent.width546 objectName: "addGuestButton"
578 clip: true547
579548 anchors {
580 property var array: []549 left: parent.left
581550 right: parent.right
582 ListModel{551 margins: units.gu(2)
583 id: contactModel552 }
584 }553
585554 onClicked: {
586 Repeater{555 var popup = PopupUtils.open(Qt.resolvedUrl("ContactChoicePopup.qml"), contactList);
587 model: contactModel556 popup.contactSelected.connect( function(contact) {
588 delegate: ListItem.Standard {557 var t = internal.contactToAttendee(contact);
589 objectName: "eventGuest%1".arg(index)558 if( !internal.isContactAlreadyAdded(contact) ) {
590 height: units.gu(4)559 contactModel.append(t);
591 text: name560 contactList.array.push(t);
592 removable: true561 }
593 onItemRemoved: {562 });
594 contactList.array.splice(index, 1)563 }
595 contactModel.remove(index)564 }
596 }565
597 }566 UbuntuShape {
598 }567 anchors {
599 }568 left: parent.left
569 right: parent.right
570 margins: units.gu(2)
571 }
572
573 height: contactList.height
574
575 Column{
576 id: contactList
577 objectName: "guestList"
578
579 spacing: units.gu(1)
580 width: parent.width
581 clip: true
582
583 property var array: []
584
585 ListModel{
586 id: contactModel
587 }
588
589 Repeater{
590 model: contactModel
591 delegate: ListItem.Standard {
592 objectName: "eventGuest%1".arg(index)
593 height: units.gu(4)
594 text: name
595 removable: true
596 onItemRemoved: {
597 contactList.array.splice(index, 1)
598 contactModel.remove(index)
599 }
600 }
601 }
602 }
603 }
604
605 ListItem.ThinDivider {
606 visible: event.itemType === Type.Event
607 }
608
609 }
610
611 ListItem.Subtitled{
612 id:thisHappens
613 objectName :"thisHappens"
614
615 anchors {
616 left: parent.left
617 }
618
619 showDivider: false
620 progression: true
621 visible: event.itemType === Type.Event
622 text: i18n.tr("Repeats")
623 subText: event.itemType === Type.Event ? rule === null ? Defines.recurrenceLabel[0] : eventUtils.getRecurrenceString(rule) : ""
624 onClicked: pageStack.push(Qt.resolvedUrl("EventRepetition.qml"),{"eventRoot": root,"isEdit":isEdit});
600 }625 }
601626
602 ListItem.ThinDivider {627 ListItem.ThinDivider {
603 visible: event.itemType === Type.Event628 visible: event.itemType === Type.Event
604 }629 }
605630
606 }631 ListItem.Subtitled{
607632 id:eventReminder
608 ListItem.Subtitled{633 objectName : "eventReminder"
609 id:thisHappens634
610 objectName :"thisHappens"635 anchors.left:parent.left
611636 showDivider: false
612 anchors {637 progression: true
613 left: parent.left638 text: i18n.tr("Reminder")
614 }639
615640 RemindersModel {
616 showDivider: false641 id: reminderModel
617 progression: true642 }
618 visible: event.itemType === Type.Event643
619 text: i18n.tr("Repeats")644 subText:{
620 subText: event.itemType === Type.Event ? rule === null ? Defines.recurrenceLabel[0] : eventUtils.getRecurrenceString(rule) : ""645 if(visualReminder.secondsBeforeStart !== -1) {
621 onClicked: pageStack.push(Qt.resolvedUrl("EventRepetition.qml"),{"eventRoot": root,"isEdit":isEdit});646 for( var i=0; i<reminderModel.count; i++ ) {
622 }647 if(visualReminder.secondsBeforeStart === reminderModel.get(i).value) {
623648 return reminderModel.get(i).label
624 ListItem.ThinDivider {649 }
625 visible: event.itemType === Type.Event
626 }
627
628 ListItem.Subtitled{
629 id:eventReminder
630 objectName : "eventReminder"
631
632 anchors.left:parent.left
633 showDivider: false
634 progression: true
635 text: i18n.tr("Reminder")
636
637 RemindersModel {
638 id: reminderModel
639 }
640
641 subText:{
642 if(visualReminder.secondsBeforeStart !== -1) {
643 for( var i=0; i<reminderModel.count; i++ ) {
644 if(visualReminder.secondsBeforeStart === reminderModel.get(i).value) {
645 return reminderModel.get(i).label
646 }650 }
651 } else {
652 return reminderModel.get(0).label
647 }653 }
648 } else {654
649 return reminderModel.get(0).label
650 }655 }
651656
657 onClicked: pageStack.push(Qt.resolvedUrl("EventReminder.qml"),
658 {"visualReminder": visualReminder,
659 "audibleReminder": audibleReminder,
660 "reminderModel": reminderModel,
661 "eventTitle": titleEdit.text})
652 }662 }
653663
654 onClicked: pageStack.push(Qt.resolvedUrl("EventReminder.qml"),664 ListItem.ThinDivider {}
655 {"visualReminder": visualReminder,
656 "audibleReminder": audibleReminder,
657 "reminderModel": reminderModel,
658 "eventTitle": titleEdit.text})
659 }665 }
660
661 ListItem.ThinDivider {}
662 }666 }
663 }667 }
664 // used to keep the field visible when the keyboard appear or dismiss668 // used to keep the field visible when the keyboard appear or dismiss
665669
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2016-01-29 14:35:14 +0000
+++ TimeLineBaseComponent.qml 2016-02-04 10:08:25 +0000
@@ -111,11 +111,11 @@
111 }111 }
112112
113 Timer{113 Timer{
114 interval: 200; running: true; repeat: false114 interval: 200; running: true; repeat: false
115 onTriggered: {115 onTriggered: {
116 mainModel = modelComponent.createObject();116 mainModel = modelComponent.createObject();
117 activityLoader.running = Qt.binding( function (){ return mainModel.isLoading;});117 activityLoader.running = Qt.binding( function (){ return mainModel.isLoading;});
118 }118 }
119 }119 }
120120
121 Component {121 Component {
@@ -171,139 +171,140 @@
171 width: units.gu(0.1)171 width: units.gu(0.1)
172 height: parent.height172 height: parent.height
173 }173 }
174174 ScrollView {
175 Flickable {
176 id: timeLineView
177 objectName: "timelineview"
178
179 height: parent.height175 height: parent.height
180 width: parent.width - units.gu(6)176 width: parent.width - units.gu(6)
181177
182 boundsBehavior: Flickable.StopAtBounds178 Flickable {
183179 id: timeLineView
184 property int delegateWidth: {180 objectName: "timelineview"
185 if( type == ViewType.ViewTypeWeek ) {
186 width/3 - units.gu(1) /*partial visible area*/
187 } else {
188 width
189 }
190 }
191
192 contentHeight: units.gu(8) * 24
193 contentWidth: {
194 if( type == ViewType.ViewTypeWeek ) {
195 delegateWidth*7
196 } else {
197 width
198 }
199 }
200
201 onContentWidthChanged: {
202 scrollToCurrentTime();
203 scrollTocurrentDate();
204 }
205
206 clip: true
207
208 TimeLineBackground{}
209
210 Row {
211 id: week
212 anchors.fill: parent181 anchors.fill: parent
213 Repeater {182 boundsBehavior: Flickable.StopAtBounds
214 model: type == ViewType.ViewTypeWeek ? 7 : 1183
215184 property int delegateWidth: {
216 delegate: TimeLineBase {185 if( type == ViewType.ViewTypeWeek ) {
217 property int idx: index186 width/3 - units.gu(1) /*partial visible area*/
218 anchors.top: parent.top187 } else {
219 width: {188 width
220 if( type == ViewType.ViewTypeWeek ) {189 }
221 parent.width / 7190 }
222 } else {191
223 (parent.width)192 contentHeight: units.gu(8) * 24
224 }193 contentWidth: {
225 }194 if( type == ViewType.ViewTypeWeek ) {
226 height: parent.height195 delegateWidth*7
227 delegate: comp196 } else {
228 day: startDay.addDays(index)197 width
229 model: mainModel198 }
230199 }
231 Connections{200
232 target: mainModel201 onContentWidthChanged: {
233202 scrollToCurrentTime();
234 onModelChanged: {203 scrollTocurrentDate();
235 createEvents();204 }
236 }205
237 }206 clip: true
238207
239 DropArea {208 TimeLineBackground{}
240 id: dropArea209
241 objectName: "mouseArea"210 Row {
242 anchors.fill: parent211 id: week
243212 anchors.fill: parent
244 function modifyEventForDrag(drag) {213 Repeater {
245 var event = drag.source.event;214 model: type == ViewType.ViewTypeWeek ? 7 : 1
246 var diff = event.endDateTime.getTime() - event.startDateTime.getTime();215
247216 delegate: TimeLineBase {
248 var startDate = getTimeFromYPos(drag.y, day);217 property int idx: index
249 var endDate = new Date( startDate.getTime() + diff );218 anchors.top: parent.top
250219 width: {
251 event.startDateTime = startDate;220 if( type == ViewType.ViewTypeWeek ) {
252 event.endDateTime = endDate;221 parent.width / 7
253222 } else {
254 return event;223 (parent.width)
255 }224 }
256225 }
257 onDropped: {
258 var event = dropArea.modifyEventForDrag(drop);
259 model.saveItem(event);
260 }
261
262 onPositionChanged: {
263 dropArea.modifyEventForDrag(drag)
264 var eventBubble = drag.source;
265 eventBubble.assingnBgColor();
266 eventBubble.setDetails();
267
268 if( eventBubble.y + eventBubble.height + units.gu(8) > timeLineView.contentY + timeLineView.height ) {
269 var diff = Math.abs((eventBubble.y + eventBubble.height + units.gu(8)) -
270 (timeLineView.height + timeLineView.contentY));
271 timeLineView.contentY += diff
272
273 if(timeLineView.contentY >= timeLineView.contentHeight - timeLineView.height) {
274 timeLineView.contentY = timeLineView.contentHeight - timeLineView.height
275 }
276 }
277
278 if(eventBubble.y - units.gu(8) < timeLineView.contentY ) {
279 var diff = Math.abs((eventBubble.y - units.gu(8)) - timeLineView.contentY);
280 timeLineView.contentY -= diff
281
282 if(timeLineView.contentY <= 0) {
283 timeLineView.contentY = 0;
284 }
285 }
286 }
287 }
288
289 Loader{
290 objectName: "weekdevider"
291 height: parent.height226 height: parent.height
292 width: units.gu(0.15)227 delegate: comp
293 sourceComponent: type == ViewType.ViewTypeWeek ? weekDividerComponent : undefined228 day: startDay.addDays(index)
294 }229 model: mainModel
295230
296 Component {231 Connections{
297 id: weekDividerComponent232 target: mainModel
298 SimpleDivider{233
234 onModelChanged: {
235 createEvents();
236 }
237 }
238
239 DropArea {
240 id: dropArea
241 objectName: "mouseArea"
299 anchors.fill: parent242 anchors.fill: parent
300 }243
301 }244 function modifyEventForDrag(drag) {
302245 var event = drag.source.event;
303 Connections{246 var diff = event.endDateTime.getTime() - event.startDateTime.getTime();
304 target: mainModel247
305 onStartPeriodChanged:{248 var startDate = getTimeFromYPos(drag.y, day);
306 destroyAllChildren();249 var endDate = new Date( startDate.getTime() + diff );
250
251 event.startDateTime = startDate;
252 event.endDateTime = endDate;
253
254 return event;
255 }
256
257 onDropped: {
258 var event = dropArea.modifyEventForDrag(drop);
259 model.saveItem(event);
260 }
261
262 onPositionChanged: {
263 dropArea.modifyEventForDrag(drag)
264 var eventBubble = drag.source;
265 eventBubble.assingnBgColor();
266 eventBubble.setDetails();
267
268 if( eventBubble.y + eventBubble.height + units.gu(8) > timeLineView.contentY + timeLineView.height ) {
269 var diff = Math.abs((eventBubble.y + eventBubble.height + units.gu(8)) -
270 (timeLineView.height + timeLineView.contentY));
271 timeLineView.contentY += diff
272
273 if(timeLineView.contentY >= timeLineView.contentHeight - timeLineView.height) {
274 timeLineView.contentY = timeLineView.contentHeight - timeLineView.height
275 }
276 }
277
278 if(eventBubble.y - units.gu(8) < timeLineView.contentY ) {
279 var diff = Math.abs((eventBubble.y - units.gu(8)) - timeLineView.contentY);
280 timeLineView.contentY -= diff
281
282 if(timeLineView.contentY <= 0) {
283 timeLineView.contentY = 0;
284 }
285 }
286 }
287 }
288
289 Loader{
290 objectName: "weekdevider"
291 height: parent.height
292 width: units.gu(0.15)
293 sourceComponent: type == ViewType.ViewTypeWeek ? weekDividerComponent : undefined
294 }
295
296 Component {
297 id: weekDividerComponent
298 SimpleDivider{
299 anchors.fill: parent
300 }
301 }
302
303 Connections{
304 target: mainModel
305 onStartPeriodChanged:{
306 destroyAllChildren();
307 }
307 }308 }
308 }309 }
309 }310 }
310311
=== modified file 'YearView.qml'
--- YearView.qml 2016-02-03 08:06:25 +0000
+++ YearView.qml 2016-02-04 10:08:25 +0000
@@ -89,15 +89,27 @@
8989
90 Component{90 Component{
91 id: delegateComponent91 id: delegateComponent
9292 ScrollView {
93 YearViewDelegate{93 id: scrollView
94 focus: index == yearPathView.currentIndex
95
96 scrollMonth: 0;
97 isCurrentItem: index == yearPathView.currentIndex
98 year: (currentYear + yearPathView.indexType(index))
99
100 anchors.fill: parent94 anchors.fill: parent
95 // This is just forwarding the function call on to the delegate
96 signal refresh()
97
98 YearViewDelegate{
99 id: yrView
100 focus: index == yearPathView.currentIndex
101
102 scrollMonth: 0;
103 isCurrentItem: index == yearPathView.currentIndex
104 year: (currentYear + yearPathView.indexType(index))
105
106 anchors.fill: parent
107
108 Connections {
109 target: scrollView
110 onRefresh: yrView.refresh()
111 }
112 }
101 }113 }
102 }114 }
103 }115 }
104116
=== modified file 'po/com.ubuntu.calendar.pot'
--- po/com.ubuntu.calendar.pot 2016-02-03 14:55:42 +0000
+++ po/com.ubuntu.calendar.pot 2016-02-04 10:08:25 +0000
@@ -1,6 +1,6 @@
1# SOME DESCRIPTIVE TITLE.1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR Canonical Ltd.2# Copyright (C) YEAR Canonical Ltd.
3# This file is distributed under the same license as the PACKAGE package.3# This file is distributed under the same license as the package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#5#
6#, fuzzy6#, fuzzy
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: \n"9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2016-01-11 21:36+0800\n"11"POT-Creation-Date: 2016-02-04 10:03+0000\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,30 +18,39 @@
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"19"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
2020
21#: ../AgendaView.qml:51 ../DayView.qml:40 ../MonthView.qml:3921#: ../AgendaView.qml:52 ../DayView.qml:41 ../MonthView.qml:40
22#: ../WeekView.qml:44 ../YearView.qml:3622#: ../WeekView.qml:45 ../YearView.qml:43
23msgid "Today"23msgid "Today"
24msgstr ""24msgstr ""
2525
26#: ../AgendaView.qml:9226#: ../AgendaView.qml:62 ../calendar.qml:291 ../calendar.qml:512
27msgid "Agenda"
28msgstr ""
29
30#: ../AgendaView.qml:101
27msgid "No upcoming events"31msgid "No upcoming events"
28msgstr ""32msgstr ""
2933
30#: ../AgendaView.qml:9534#: ../AgendaView.qml:104
31msgid "You have no calendars enabled"35msgid "You have no calendars enabled"
32msgstr ""36msgstr ""
3337
34#: ../AgendaView.qml:10538#: ../AgendaView.qml:114
35msgid "Enable calendars"39msgid "Enable calendars"
36msgstr ""40msgstr ""
3741
38#. TRANSLATORS: the first argument (%1) refers to a start time for an event,42#. TRANSLATORS: the first argument (%1) refers to a start time for an event,
39#. while the second one (%2) refers to the end time43#. while the second one (%2) refers to the end time
40#: ../AgendaView.qml:168 ../EventBubble.qml:13344#: ../AgendaView.qml:177 ../EventBubble.qml:133
41#, qt-format45#, qt-format
42msgid "%1 - %2"46msgid "%1 - %2"
43msgstr ""47msgstr ""
4448
49#: ../AgendaView.qml:183
50#, qt-format
51msgid "%1 %2 %3 %4 %5"
52msgstr ""
53
45#. TRANSLATORS: the first parameter refers to the number of all-day events54#. TRANSLATORS: the first parameter refers to the number of all-day events
46#. on a given day. "Ev." is short form for "Events".55#. on a given day. "Ev." is short form for "Events".
47#. Please keep the translation of "Ev." to 3 characters only, as the week view56#. Please keep the translation of "Ev." to 3 characters only, as the week view
@@ -59,21 +68,21 @@
59msgstr[0] ""68msgstr[0] ""
60msgstr[1] ""69msgstr[1] ""
6170
62#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:6071#: ../CalendarChoicePopup.qml:33 ../EventActions.qml:63
63msgid "Calendars"72msgid "Calendars"
64msgstr ""73msgstr ""
6574
66#: ../CalendarChoicePopup.qml:3775#: ../CalendarChoicePopup.qml:37 ../Settings.qml:32
67msgid "Back"76msgid "Back"
68msgstr ""77msgstr ""
6978
70#. TRANSLATORS: Please translate this string to 15 characters only.79#. TRANSLATORS: Please translate this string to 15 characters only.
71#. Currently ,there is no way we can increase width of action menu currently.80#. Currently ,there is no way we can increase width of action menu currently.
72#: ../CalendarChoicePopup.qml:51 ../EventActions.qml:3681#: ../CalendarChoicePopup.qml:51 ../EventActions.qml:37
73msgid "Sync"82msgid "Sync"
74msgstr ""83msgstr ""
7584
76#: ../CalendarChoicePopup.qml:51 ../EventActions.qml:3685#: ../CalendarChoicePopup.qml:51 ../EventActions.qml:37
77msgid "Syncing"86msgid "Syncing"
78msgstr ""87msgstr ""
7988
@@ -101,10 +110,16 @@
101#. TRANSLATORS: this is a time formatting string,110#. TRANSLATORS: this is a time formatting string,
102#. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.111#. see http://qt-project.org/doc/qt-5/qml-qtqml-date.html#details for valid expressions.
103#. It's used in the header of the month and week views112#. It's used in the header of the month and week views
104#: ../DayView.qml:59 ../MonthView.qml:60 ../WeekView.qml:63113#: ../DayView.qml:64 ../DayView.qml:157 ../MonthView.qml:62
114#: ../MonthView.qml:149 ../WeekView.qml:68 ../WeekView.qml:180
105msgid "MMMM yyyy"115msgid "MMMM yyyy"
106msgstr ""116msgstr ""
107117
118#: ../DayView.qml:155 ../MonthView.qml:144 ../WeekView.qml:178
119#, qt-format
120msgid "%1 %2"
121msgstr ""
122
108#: ../DeleteConfirmationDialog.qml:31123#: ../DeleteConfirmationDialog.qml:31
109msgid "Delete Recurring Event"124msgid "Delete Recurring Event"
110msgstr ""125msgstr ""
@@ -136,7 +151,7 @@
136msgid "Delete"151msgid "Delete"
137msgstr ""152msgstr ""
138153
139#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:324154#: ../EditEventConfirmationDialog.qml:29 ../NewEvent.qml:325
140msgid "Edit Event"155msgid "Edit Event"
141msgstr ""156msgstr ""
142157
@@ -154,10 +169,14 @@
154msgid "Edit this"169msgid "Edit this"
155msgstr ""170msgstr ""
156171
157#: ../EventActions.qml:50 ../NewEvent.qml:324172#: ../EventActions.qml:52 ../NewEvent.qml:325
158msgid "New Event"173msgid "New Event"
159msgstr ""174msgstr ""
160175
176#: ../EventActions.qml:75 ../Settings.qml:30
177msgid "Settings"
178msgstr ""
179
161#. TRANSLATORS: the first argument (%1) refers to a time for an event,180#. TRANSLATORS: the first argument (%1) refers to a time for an event,
162#. while the second one (%2) refers to title of event181#. while the second one (%2) refers to title of event
163#: ../EventBubble.qml:144 ../EventBubble.qml:149182#: ../EventBubble.qml:144 ../EventBubble.qml:149
@@ -165,35 +184,55 @@
165msgid "%1 <b>%2</b>"184msgid "%1 <b>%2</b>"
166msgstr ""185msgstr ""
167186
168#: ../EventDetails.qml:43 ../NewEvent.qml:435187#: ../EventDetails.qml:44 ../NewEvent.qml:439
169msgid "Event Details"188msgid "Event Details"
170msgstr ""189msgstr ""
171190
172#. TRANSLATORS: the first parameter refers to the name of event calendar.191#. TRANSLATORS: the first parameter refers to the name of event calendar.
173#: ../EventDetails.qml:68192#: ../EventDetails.qml:69
174#, qt-format193#, qt-format
175msgid "%1 Calendar"194msgid "%1 Calendar"
176msgstr ""195msgstr ""
177196
178#: ../EventDetails.qml:129197#: ../EventDetails.qml:143
198#, qt-format
199msgid "%1 %2 %3 - %4 %5 %6 (All Day)"
200msgstr ""
201
202#: ../EventDetails.qml:147
179#, qt-format203#, qt-format
180msgid "%1 - %2 (All Day)"204msgid "%1 - %2 (All Day)"
181msgstr ""205msgstr ""
182206
183#: ../EventDetails.qml:133207#: ../EventDetails.qml:153
208#, qt-format
209msgid "%1 %2 %3 (All Day)"
210msgstr ""
211
212#: ../EventDetails.qml:156
184#, qt-format213#, qt-format
185msgid "%1 (All Day)"214msgid "%1 (All Day)"
186msgstr ""215msgstr ""
187216
188#: ../EventDetails.qml:203217#: ../EventDetails.qml:162
218#, qt-format
219msgid "%1 %2 %3, %4 - %5 %6 %7, %8"
220msgstr ""
221
222#: ../EventDetails.qml:171
223#, qt-format
224msgid "%1 %2 %3, %4 - %5"
225msgstr ""
226
227#: ../EventDetails.qml:238
189msgid "Edit"228msgid "Edit"
190msgstr ""229msgstr ""
191230
192#: ../EventDetails.qml:354 ../NewEvent.qml:537231#: ../EventDetails.qml:389 ../NewEvent.qml:541
193msgid "Guests"232msgid "Guests"
194msgstr ""233msgstr ""
195234
196#: ../EventDetails.qml:397 ../EventReminder.qml:35 ../NewEvent.qml:634235#: ../EventDetails.qml:432 ../EventReminder.qml:35 ../NewEvent.qml:638
197msgid "Reminder"236msgid "Reminder"
198msgstr ""237msgstr ""
199238
@@ -216,7 +255,7 @@
216#. TRANSLATORS: this refers to how often a recurrent event repeats255#. TRANSLATORS: this refers to how often a recurrent event repeats
217#. and it is shown as the header of the option selector to choose256#. and it is shown as the header of the option selector to choose
218#. its repetition257#. its repetition
219#: ../EventRepetition.qml:242 ../NewEvent.qml:618258#: ../EventRepetition.qml:242 ../NewEvent.qml:622
220msgid "Repeats"259msgid "Repeats"
221msgstr ""260msgstr ""
222261
@@ -247,6 +286,11 @@
247msgid "Weekly on %1"286msgid "Weekly on %1"
248msgstr ""287msgstr ""
249288
289#: ../HeaderDateComponent.qml:90
290#, qt-format
291msgid "%1 %2 %3"
292msgstr ""
293
250#: ../LimitLabelModel.qml:25294#: ../LimitLabelModel.qml:25
251msgid "Never"295msgid "Never"
252msgstr ""296msgstr ""
@@ -259,6 +303,10 @@
259msgid "After Date"303msgid "After Date"
260msgstr ""304msgstr ""
261305
306#: ../MonthComponent.qml:262
307msgid "Wk"
308msgstr ""
309
262#: ../NewEvent.qml:84310#: ../NewEvent.qml:84
263msgid "Save"311msgid "Save"
264msgstr ""312msgstr ""
@@ -267,43 +315,43 @@
267msgid "End time can't be before start time"315msgid "End time can't be before start time"
268msgstr ""316msgstr ""
269317
270#: ../NewEvent.qml:334318#: ../NewEvent.qml:335
271msgid "Error"319msgid "Error"
272msgstr ""320msgstr ""
273321
274#: ../NewEvent.qml:336322#: ../NewEvent.qml:337
275msgid "OK"323msgid "OK"
276msgstr ""324msgstr ""
277325
278#: ../NewEvent.qml:389326#: ../NewEvent.qml:393
279msgid "From"327msgid "From"
280msgstr ""328msgstr ""
281329
282#: ../NewEvent.qml:402330#: ../NewEvent.qml:406
283msgid "To"331msgid "To"
284msgstr ""332msgstr ""
285333
286#: ../NewEvent.qml:419334#: ../NewEvent.qml:423
287msgid "All day event"335msgid "All day event"
288msgstr ""336msgstr ""
289337
290#: ../NewEvent.qml:448338#: ../NewEvent.qml:452
291msgid "Event Name"339msgid "Event Name"
292msgstr ""340msgstr ""
293341
294#: ../NewEvent.qml:466342#: ../NewEvent.qml:470
295msgid "Description"343msgid "Description"
296msgstr ""344msgstr ""
297345
298#: ../NewEvent.qml:484346#: ../NewEvent.qml:488
299msgid "Location"347msgid "Location"
300msgstr ""348msgstr ""
301349
302#: ../NewEvent.qml:499 com.ubuntu.calendar_calendar.desktop.in.in.h:1350#: ../NewEvent.qml:503 com.ubuntu.calendar_calendar.desktop.in.in.h:1
303msgid "Calendar"351msgid "Calendar"
304msgstr ""352msgstr ""
305353
306#: ../NewEvent.qml:541354#: ../NewEvent.qml:545
307msgid "Add Guest"355msgid "Add Guest"
308msgstr ""356msgstr ""
309357
@@ -390,52 +438,56 @@
390msgid "2 weeks"438msgid "2 weeks"
391msgstr ""439msgstr ""
392440
441#: ../Settings.qml:60
442msgid "Show week numbers"
443msgstr ""
444
445#: ../Settings.qml:91
446msgid "Show lunar calendar"
447msgstr ""
448
393#: ../TimeLineBase.qml:73449#: ../TimeLineBase.qml:73
394msgid "Untitled"450msgid "Untitled"
395msgstr ""451msgstr ""
396452
397#. TRANSLATORS: W refers to Week, followed by the actual week number (%1)453#. TRANSLATORS: W refers to Week, followed by the actual week number (%1)
398#: ../TimeLineHeader.qml:54454#: ../TimeLineHeader.qml:53
399#, qt-format455#, qt-format
400msgid "W%1"456msgid "W%1"
401msgstr ""457msgstr ""
402458
403#: ../TimeLineHeader.qml:66459#: ../TimeLineHeader.qml:65
404msgid "All Day"460msgid "All Day"
405msgstr ""461msgstr ""
406462
407#: ../YearView.qml:54463#: ../YearView.qml:61 ../YearView.qml:124
408#, qt-format464#, qt-format
409msgid "Year %1"465msgid "Year %1"
410msgstr ""466msgstr ""
411467
412#: ../calendar.qml:45468#: ../calendar.qml:46
413msgid ""469msgid ""
414"Calendar app accept four arguments: --starttime, --endtime, --newevent and --"470"Calendar app accept four arguments: --starttime, --endtime, --newevent and --"
415"eventid. They will be managed by system. See the source for a full comment "471"eventid. They will be managed by system. See the source for a full comment "
416"about them"472"about them"
417msgstr ""473msgstr ""
418474
419#: ../calendar.qml:354475#: ../calendar.qml:259 ../calendar.qml:428
420msgid "Year"476msgid "Year"
421msgstr ""477msgstr ""
422478
423#: ../calendar.qml:388479#: ../calendar.qml:267 ../calendar.qml:449
424msgid "Month"480msgid "Month"
425msgstr ""481msgstr ""
426482
427#: ../calendar.qml:421483#: ../calendar.qml:275 ../calendar.qml:470
428msgid "Week"484msgid "Week"
429msgstr ""485msgstr ""
430486
431#: ../calendar.qml:459487#: ../calendar.qml:283 ../calendar.qml:491
432msgid "Day"488msgid "Day"
433msgstr ""489msgstr ""
434490
435#: ../calendar.qml:491
436msgid "Agenda"
437msgstr ""
438
439#: com.ubuntu.calendar_calendar.desktop.in.in.h:2491#: com.ubuntu.calendar_calendar.desktop.in.in.h:2
440msgid "A calendar for Ubuntu which syncs with online accounts."492msgid "A calendar for Ubuntu which syncs with online accounts."
441msgstr ""493msgstr ""

Subscribers

People subscribed via source and target branches

to status/vote changes: