-rw-r--r-- | core/pim/today/today.cpp | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 9e5c27e..1f6f34e 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -180,57 +180,72 @@ void Today::getDates() // decide if to get all day or only later appointments if (!ONLY_LATER) { msg += "<B>" + (*it).description() + "</B>"; if ( (*it).event().hasAlarm() ) { msg += " <b>[with alarm]</b>"; } // include location or not if (SHOW_LOCATION == 1) { - msg+= "<BR>" + (*it).location(); + msg+= "<BR><i>" + (*it).location(); } - msg += "<BR>" + msg += "</i><BR>"; + if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) + { + msg += "All day"; + } + else + { // start time of event - + TimeString::timeString(QTime((*it).event().start().time()) ) + msg += TimeString::timeString(QTime((*it).event().start().time()) ) // end time of event - + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) - + "<BR>"; + + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); + } + msg += "<BR>"; // include possible note or not if (SHOW_NOTES == 1) { msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; } } else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) { msg += "<B>" + (*it).description() + "</B>"; if ( (*it).event().hasAlarm() ) { msg += " <b>[with alarm]</b>"; } // include location or not if (SHOW_LOCATION == 1) { - msg+= "<BR>" + (*it).location(); + msg+= "<BR><i>" + (*it).location(); } - msg += "<BR>" + msg += "</i><BR>"; + + if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) + { + msg += "All day"; + } + else + { // start time of event - + TimeString::timeString(QTime((*it).event().start().time()) ) + msg += TimeString::timeString(QTime((*it).event().start().time()) ) // end time of event - + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) - + "<BR>"; + + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); + } + msg += "<BR>"; // include possible note or not if (SHOW_NOTES == 1) { msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; } } } } if (msg.isEmpty()) { msg = "No more appointments today"; } |