author | harlekin <harlekin> | 2002-05-13 21:56:32 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-05-13 21:56:32 (UTC) |
commit | 654f18b7201655379a515d12e30e06de4ae2e564 (patch) (unidiff) | |
tree | 7faec6092629ab4a9387c7d9b9633ae6ea6e6115 | |
parent | addcce2881f07c1f04113e4df2ec7e4186d4cee4 (diff) | |
download | opie-654f18b7201655379a515d12e30e06de4ae2e564.zip opie-654f18b7201655379a515d12e30e06de4ae2e564.tar.gz opie-654f18b7201655379a515d12e30e06de4ae2e564.tar.bz2 |
serveral bugfixes regarding todo section
-rw-r--r-- | core/pim/today/changelog | 4 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 12 |
3 files changed, 11 insertions, 7 deletions
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index c687cea..93bbcac 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,8 +1,12 @@ | |||
1 | 0.3.4 | ||
2 | |||
3 | * Several bugfixes regarding todo section. | ||
4 | |||
1 | 0.3.3 | 5 | 0.3.3 |
2 | 6 | ||
3 | * Changed the logo so it better scales to bigger display and also | 7 | * Changed the logo so it better scales to bigger display and also |
4 | made the "Today" string translatable. | 8 | made the "Today" string translatable. |
5 | * some am/pm fixes | 9 | * some am/pm fixes |
6 | * clickable labels now in libopie | 10 | * clickable labels now in libopie |
7 | 11 | ||
8 | 0.3.2 | 12 | 0.3.2 |
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index da9d9fa..46c0d71 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control | |||
@@ -1,14 +1,14 @@ | |||
1 | Files: bin/today apps/Applications/today.desktop pics/today/* | 1 | Files: bin/today apps/Applications/today.desktop pics/today/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> | 4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.3.3-$SUB_VERSION | 6 | Version: 0.3.4-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) |
8 | License: GPL | 8 | License: GPL |
9 | Description: today screen | 9 | Description: today screen |
10 | This today screen app gives an overview of appointments | 10 | This today screen app gives an overview of appointments |
11 | and todos. | 11 | and todos. |
12 | It also shows incoming and outgoing mails from opiemail. | 12 | It also shows incoming and outgoing mails from opiemail. |
13 | When using Opie (opie.handhelds.org) today can be autostarted | 13 | When using Opie (opie.handhelds.org) today can be autostarted |
14 | on resume. | 14 | on resume. |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 0f4cbdb..4368201 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -77,18 +77,18 @@ Today::Today( QWidget* parent, const char* name, WFlags fl ) | |||
77 | #endif | 77 | #endif |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | 80 | ||
81 | 81 | ||
82 | db = NULL; | 82 | db = NULL; |
83 | setOwnerField(); | 83 | setOwnerField(); |
84 | todo = new ToDoDB; | 84 | todo = new ToDoDB; |
85 | getTodo(); | ||
86 | draw(); | 85 | draw(); |
86 | getTodo(); | ||
87 | autoStart(); | 87 | autoStart(); |
88 | } | 88 | } |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * Qcop receive method. | 91 | * Qcop receive method. |
92 | */ | 92 | */ |
93 | void Today::channelReceived(const QCString &msg, const QByteArray & data) { | 93 | void Today::channelReceived(const QCString &msg, const QByteArray & data) { |
94 | QDataStream stream(data, IO_ReadOnly ); | 94 | QDataStream stream(data, IO_ReadOnly ); |
@@ -149,17 +149,17 @@ void Today::autoStart() { | |||
149 | * Repaint method. Reread all fields. | 149 | * Repaint method. Reread all fields. |
150 | */ | 150 | */ |
151 | void Today::draw() { | 151 | void Today::draw() { |
152 | init(); | 152 | init(); |
153 | getDates(); | 153 | getDates(); |
154 | getMail(); | 154 | getMail(); |
155 | 155 | ||
156 | // if the todolist.xml file was not modified in between, do not parse it. | 156 | // if the todolist.xml file was not modified in between, do not parse it. |
157 | if (checkIfModified()) { | 157 | if (checkIfModified() || NEW_START==1) { |
158 | if (todo) delete todo; | 158 | if (todo) delete todo; |
159 | todo = new ToDoDB; | 159 | todo = new ToDoDB; |
160 | getTodo(); | 160 | getTodo(); |
161 | } | 161 | } |
162 | 162 | ||
163 | // how often refresh | 163 | // how often refresh |
164 | QTimer::singleShot( 20*1000, this, SLOT(draw() ) ); | 164 | QTimer::singleShot( 20*1000, this, SLOT(draw() ) ); |
165 | } | 165 | } |
@@ -384,20 +384,20 @@ void Today::getTodo() { | |||
384 | it!=overDueList.end(); ++it ) { | 384 | it!=overDueList.end(); ++it ) { |
385 | if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) { | 385 | if (!(*it).isCompleted() && ( ammount < MAX_LINES_TASK) ) { |
386 | tmpout += "<font color=#e00000><b>-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "</b></font><br>"; | 386 | tmpout += "<font color=#e00000><b>-" +((*it).description()).mid(0, MAX_CHAR_CLIP) + "</b></font><br>"; |
387 | ammount++; | 387 | ammount++; |
388 | } | 388 | } |
389 | } | 389 | } |
390 | 390 | ||
391 | // get total number of still open todos | 391 | // get total number of still open todos |
392 | QValueList<ToDoEvent> open = todo->rawToDos(); | 392 | QValueList<ToDoEvent> openTodo = todo->rawToDos(); |
393 | qBubbleSort(open); | 393 | qBubbleSort(openTodo); |
394 | for ( QValueList<ToDoEvent>::Iterator it=open.begin(); | 394 | for ( QValueList<ToDoEvent>::Iterator it=openTodo.begin(); |
395 | it!=open.end(); ++it ) { | 395 | it!=openTodo.end(); ++it ) { |
396 | if (!(*it).isCompleted()){ | 396 | if (!(*it).isCompleted()){ |
397 | count +=1; | 397 | count +=1; |
398 | // not the overdues, we allready got them, and not if we are | 398 | // not the overdues, we allready got them, and not if we are |
399 | // over the maxlines | 399 | // over the maxlines |
400 | if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) { | 400 | if (!(*it).isOverdue() && ( ammount < MAX_LINES_TASK) ) { |
401 | tmpout += "<b>-</b>" + ((*it).description()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 401 | tmpout += "<b>-</b>" + ((*it).description()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
402 | ammount++; | 402 | ammount++; |
403 | } | 403 | } |