-rw-r--r-- | core/pim/today/today.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 0f6e598..7a2d0c9 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -169,91 +169,90 @@ void Today::getDates() | |||
169 | it!=list.end(); ++it ) { | 169 | it!=list.end(); ++it ) { |
170 | 170 | ||
171 | count++; | 171 | count++; |
172 | 172 | ||
173 | if ( count <= MAX_LINES_MEET ) | 173 | if ( count <= MAX_LINES_MEET ) |
174 | { | 174 | { |
175 | //only get events past current time (start or end??) | 175 | //only get events past current time (start or end??) |
176 | //cout << time.toString() << endl; | 176 | //cout << time.toString() << endl; |
177 | //cout << TimeString::dateString((*it).event().end()) << endl; | 177 | //cout << TimeString::dateString((*it).event().end()) << endl; |
178 | // still some bug in here, 1 h off | 178 | // still some bug in here, 1 h off |
179 | 179 | ||
180 | // decide if to get all day or only later appointments | 180 | // decide if to get all day or only later appointments |
181 | if (!ONLY_LATER) | 181 | if (!ONLY_LATER) |
182 | { | 182 | { |
183 | msg += "<B>" + (*it).description() + "</B>"; | 183 | msg += "<B>" + (*it).description() + "</B>"; |
184 | // include location or not | 184 | // include location or not |
185 | if (SHOW_LOCATION == 1) | 185 | if (SHOW_LOCATION == 1) |
186 | { | 186 | { |
187 | msg+= "<BR>" + (*it).location(); | 187 | msg+= "<BR>" + (*it).location(); |
188 | } | 188 | } |
189 | msg += "<BR>" | 189 | msg += "<BR>" |
190 | // start time of event | 190 | // start time of event |
191 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 191 | + TimeString::timeString(QTime((*it).event().start().time()) ) |
192 | // end time of event | 192 | // end time of event |
193 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 193 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) |
194 | + "<BR>"; | 194 | + "<BR>"; |
195 | // include possible note or not | 195 | // include possible note or not |
196 | if (SHOW_NOTES == 1) | 196 | if (SHOW_NOTES == 1) |
197 | { | 197 | { |
198 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 198 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
199 | } | 199 | } |
200 | } | 200 | } |
201 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) && ONLY_LATER ) | 201 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) |
202 | { | 202 | { |
203 | msg += "<B>" + (*it).description() + "</B>"; | 203 | msg += "<B>" + (*it).description() + "</B>"; |
204 | // include location or not | 204 | // include location or not |
205 | if (SHOW_LOCATION == 1) | 205 | if (SHOW_LOCATION == 1) |
206 | { | 206 | { |
207 | msg+= "<BR>" + (*it).location(); | 207 | msg+= "<BR>" + (*it).location(); |
208 | } | 208 | } |
209 | msg += "<BR>" | 209 | msg += "<BR>" |
210 | // start time of event | 210 | // start time of event |
211 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 211 | + TimeString::timeString(QTime((*it).event().start().time()) ) |
212 | // end time of event | 212 | // end time of event |
213 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 213 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) |
214 | + "<BR>"; | 214 | + "<BR>"; |
215 | // include possible note or not | 215 | // include possible note or not |
216 | if (SHOW_NOTES == 1) | 216 | if (SHOW_NOTES == 1) |
217 | { | 217 | { |
218 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 218 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
219 | } | 219 | } |
220 | } | 220 | } |
221 | } | 221 | } |
222 | |||
223 | if (msg.isEmpty()) | ||
224 | { | ||
225 | msg = "No more appointments today"; | ||
226 | } | ||
227 | } | 222 | } |
223 | if (msg.isEmpty()) | ||
224 | { | ||
225 | msg = "No more appointments today"; | ||
226 | } | ||
228 | DatesField->setText(msg); | 227 | DatesField->setText(msg); |
229 | } | 228 | } |
230 | } | 229 | } |
231 | 230 | ||
232 | /* | 231 | /* |
233 | * Parse in the todolist.xml | 232 | * Parse in the todolist.xml |
234 | * | 233 | * |
235 | */ | 234 | */ |
236 | QList<TodoItem> Today::loadTodo(const char *filename) | 235 | QList<TodoItem> Today::loadTodo(const char *filename) |
237 | { | 236 | { |
238 | DOM *todo; | 237 | DOM *todo; |
239 | ELE *tasks; | 238 | ELE *tasks; |
240 | ELE **tasklist; | 239 | ELE **tasklist; |
241 | ATT **attlist; | 240 | ATT **attlist; |
242 | int i, j; | 241 | int i, j; |
243 | char *description; | 242 | char *description; |
244 | int completed; | 243 | int completed; |
245 | int priority; | 244 | int priority; |
246 | TodoItem *tmp; | 245 | TodoItem *tmp; |
247 | QList<TodoItem> loadtodolist; | 246 | QList<TodoItem> loadtodolist; |
248 | 247 | ||
249 | todo = minidom_load(filename); | 248 | todo = minidom_load(filename); |
250 | 249 | ||
251 | tasks = todo->el; | 250 | tasks = todo->el; |
252 | tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/ | 251 | tasks = tasks->el[0]; /*!DOCTYPE-quickhack*/ |
253 | if(tasks) | 252 | if(tasks) |
254 | { | 253 | { |
255 | tasklist = tasks->el; | 254 | tasklist = tasks->el; |
256 | i = 0; | 255 | i = 0; |
257 | while((tasklist) && (tasklist[i])) | 256 | while((tasklist) && (tasklist[i])) |
258 | { | 257 | { |
259 | attlist = tasklist[i]->at; | 258 | attlist = tasklist[i]->at; |