~chris.gagnon/ubuntu-calendar-app/fix_1293489

« back to all changes in this revision

Viewing changes to EventBubble.qml

  • Committer: Tarmac
  • Author(s): Kunal Parmar
  • Date: 2013-10-14 13:57:42 UTC
  • mfrom: (124.3.10 ubuntu-calendar-app)
  • Revision ID: tarmac-20131014135742-xatlilnykrxfy2as
DataModel moved to use QtOrganizer,
Organizer uses EDS as data source,
Related changes required to use QtOrganizer
.

Approved by David Planella, Ubuntu Phone Apps Jenkins Bot, Renato Araujo Oliveira Filho.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import QtQuick 2.0
2
2
import Ubuntu.Components 0.1
3
3
 
4
 
import "dataService.js" as DataService
5
 
 
6
4
Item{
7
5
    id: infoBubble
8
6
 
36
34
        // TRANSLATORS: this is a time formatting string,
37
35
        // see http://qt-project.org/doc/qt-5.0/qtqml/qml-qtquick2-date.html#details for valid expressions
38
36
        var timeFormat = i18n.tr("hh:mm");
39
 
        var startTime = event.startTime.toLocaleTimeString(Qt.locale(), timeFormat)
40
 
        var endTime = event.endTime.toLocaleTimeString(Qt.locale(), timeFormat)
 
37
        var startTime = event.startDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
 
38
        var endTime = event.endDateTime.toLocaleTimeString(Qt.locale(), timeFormat)
41
39
        // TRANSLATORS: the first argument (%1) refers to a start time for an event,
42
40
        // while the second one (%2) refers to the end time
43
41
        var timeString = i18n.tr("%1 - %2").arg(startTime).arg(endTime)
49
47
        if( type == wideType) {
50
48
            timeLabel.text = timeString
51
49
 
52
 
            if( event.title)
53
 
                titleLabel.text = event.title;
 
50
            if( event.displayLabel)
 
51
                titleLabel.text = event.displayLabel;
54
52
 
55
 
            if( event.message)
56
 
                descriptionLabel.text = event.message
 
53
            if( event.description)
 
54
                descriptionLabel.text = event.description
57
55
        } else {
58
56
            timeLabel.text = startTime
59
57
        }