summaryrefslogtreecommitdiff
path: root/core/pim/today
authorharlekin <harlekin>2002-06-27 14:33:51 (UTC)
committer harlekin <harlekin>2002-06-27 14:33:51 (UTC)
commit63d7fd9b233a5b6a9e3670b6ef1c09a2e87ffa42 (patch) (side-by-side diff)
treee5c81e0728f394fba918f9e71cbacd33de870aee /core/pim/today
parent540fd6a4a7cc86070c94f41833c4b9b9fa0e9824 (diff)
downloadopie-63d7fd9b233a5b6a9e3670b6ef1c09a2e87ffa42.zip
opie-63d7fd9b233a5b6a9e3670b6ef1c09a2e87ffa42.tar.gz
opie-63d7fd9b233a5b6a9e3670b6ef1c09a2e87ffa42.tar.bz2
should fix bug #83
Diffstat (limited to 'core/pim/today') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp40
1 files changed, 23 insertions, 17 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index ad1ec90..62becb0 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -22,7 +22,6 @@
#include <qpe/timestring.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
-//#include <qpe/qprocess.h>
#include <qpe/resource.h>
#include <qpe/contact.h>
#include <qpe/global.h>
@@ -38,12 +37,10 @@
#include <qlabel.h>
#include <qtimer.h>
#include <qpixmap.h>
-//#include <qfileinfo.h>
#include <qlayout.h>
#include <qtl.h>
-//#include <iostream.h>
#include <unistd.h>
#include <stdlib.h>
@@ -384,10 +381,15 @@ void Today::getTodo() {
qBubbleSort(overDueList);
for ( QValueList<ToDoEvent>::Iterator it=overDueList.begin();
it!=overDueList.end(); ++it ) {
- if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) {
- tmpout += "<font color=#e00000><b>-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "</b></font><br>";
- ammount++;
- }
+ if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) {
+ QString desc = (*it).summary();
+ if( desc.isEmpty() ) {
+ desc = (*it).description();
+ }
+ tmpout += "<font color=#e00000><b>-" + desc.mid(0, MAX_CHAR_CLIP) + "</b></font><br>";
+
+ ammount++;
+ }
}
// get total number of still open todos
@@ -395,15 +397,19 @@ void Today::getTodo() {
qBubbleSort(openTodo);
for ( QValueList<ToDoEvent>::Iterator it=openTodo.begin();
it!=openTodo.end(); ++it ) {
- if (!(*it).isCompleted()){
- count +=1;
- // not the overdues, we allready got them, and not if we are
- // over the maxlines
- if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) {
- tmpout += "<b>-</b>" + ((*it).description()).mid(0, MAX_CHAR_CLIP) + "<br>";
- ammount++;
+ if (!(*it).isCompleted()){
+ count +=1;
+ // not the overdues, we allready got them, and not if we are
+ // over the maxlines
+ if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) {
+ QString desc = (*it).summary();
+ if( desc.isEmpty() ) {
+ desc = (*it).description();
+ }
+ tmpout += "<b>-</b>" + desc.mid(0, MAX_CHAR_CLIP) + "<br>";
+ ammount++;
+ }
}
- }
}
@@ -444,8 +450,8 @@ void Today::editCard() {
* launches datebook
*/
void Today::startDatebook() {
- QCopEnvelope e("QPE/System", "execute(QString)");
- e << QString("datebook");
+ QCopEnvelope e("QPE/System", "execute(QString)");
+ e << QString("datebook");
}
/*