author | zautrix <zautrix> | 2005-01-31 09:21:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-31 09:21:57 (UTC) |
commit | 1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd (patch) (unidiff) | |
tree | dd55b89fd37ffb8a880c175c5237f5ca57ca6d4c /korganizer | |
parent | 9b13105b4cc0ede4ca2d01a3d998fdb90bf67b58 (diff) | |
download | kdepimpi-1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd.zip kdepimpi-1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd.tar.gz kdepimpi-1c5f4d993bf5eeb4a21bacf61671a1a08ed1f3cd.tar.bz2 |
fix
-rw-r--r-- | korganizer/kodaymatrix.cpp | 18 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 4 |
2 files changed, 13 insertions, 9 deletions
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 9812321..ca896b5 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -207,25 +207,25 @@ void KODayMatrix::recalculateToday() | |||
207 | } | 207 | } |
208 | 208 | ||
209 | void KODayMatrix::updateView() | 209 | void KODayMatrix::updateView() |
210 | { | 210 | { |
211 | updateView(startdate); | 211 | updateView(startdate); |
212 | } | 212 | } |
213 | void KODayMatrix::repaintViewTimed() | 213 | void KODayMatrix::repaintViewTimed() |
214 | { | 214 | { |
215 | //qDebug("KODayMatrix::repaintViewTimed "); | 215 | qDebug("KODayMatrix::repaintViewTimed "); |
216 | mRepaintTimer->stop(); | 216 | mRepaintTimer->stop(); |
217 | repaint(false); | 217 | repaint(false); |
218 | } | 218 | } |
219 | void KODayMatrix::updateViewTimed() | 219 | void KODayMatrix::updateViewTimed() |
220 | { | 220 | { |
221 | 221 | ||
222 | mUpdateTimer->stop(); | 222 | mUpdateTimer->stop(); |
223 | //qDebug("KODayMatrix::updateView(QDate actdate) %d", ++iii ); | 223 | qDebug("KODayMatrix::updateView(QDate actdate)"); |
224 | for(int i = 0; i < NUMDAYS; i++) { | 224 | for(int i = 0; i < NUMDAYS; i++) { |
225 | 225 | ||
226 | // if events are set for the day then remember to draw it bold | 226 | // if events are set for the day then remember to draw it bold |
227 | QPtrList<Event> eventlist = mCalendar->events(days[i]); | 227 | QPtrList<Event> eventlist = mCalendar->events(days[i]); |
228 | Event *event; | 228 | Event *event; |
229 | int numEvents = eventlist.count(); | 229 | int numEvents = eventlist.count(); |
230 | 230 | ||
231 | for(event=eventlist.first();event != 0;event=eventlist.next()) { | 231 | for(event=eventlist.first();event != 0;event=eventlist.next()) { |
@@ -283,26 +283,26 @@ void KODayMatrix::updateView(QDate actdate) | |||
283 | if( mSelEnd > NUMDAYS || mSelEnd < 0 ) | 283 | if( mSelEnd > NUMDAYS || mSelEnd < 0 ) |
284 | mSelEnd = mSelEnd + tmp; | 284 | mSelEnd = mSelEnd + tmp; |
285 | } | 285 | } |
286 | } | 286 | } |
287 | startdate = actdate; | 287 | startdate = actdate; |
288 | mDayChanged = true; | 288 | mDayChanged = true; |
289 | recalculateToday(); | 289 | recalculateToday(); |
290 | } | 290 | } |
291 | //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); | 291 | qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() ); |
292 | if ( !isVisible() ) { | 292 | if ( !isVisible() ) { |
293 | mPendingUpdateBeforeRepaint = true; | 293 | mPendingUpdateBeforeRepaint = true; |
294 | } else { | 294 | } else { |
295 | #ifdef DESKTOP_VERSION | 295 | #ifdef DESKTOP_VERSION |
296 | mRepaintTimer->start( 250 ); | 296 | //mRepaintTimer->start( 250 ); |
297 | mUpdateTimer->start( 2000 ); | 297 | mUpdateTimer->start( 250 ); |
298 | #else | 298 | #else |
299 | mRepaintTimer->start( 350 ); | 299 | mRepaintTimer->start( 350 ); |
300 | mUpdateTimer->start( 4000 ); | 300 | mUpdateTimer->start( 2000 ); |
301 | #endif | 301 | #endif |
302 | } | 302 | } |
303 | } | 303 | } |
304 | 304 | ||
305 | const QDate& KODayMatrix::getDate(int offset) | 305 | const QDate& KODayMatrix::getDate(int offset) |
306 | { | 306 | { |
307 | if (offset < 0 || offset > NUMDAYS-1) { | 307 | if (offset < 0 || offset > NUMDAYS-1) { |
308 | qDebug("Wrong offset2 "); | 308 | qDebug("Wrong offset2 "); |
@@ -484,18 +484,18 @@ void KODayMatrix::dropEvent(QDropEvent *e) | |||
484 | // ---------------------------------------------------------------------------- | 484 | // ---------------------------------------------------------------------------- |
485 | // P A I N T E V E N T H A N D L I N G | 485 | // P A I N T E V E N T H A N D L I N G |
486 | // ---------------------------------------------------------------------------- | 486 | // ---------------------------------------------------------------------------- |
487 | 487 | ||
488 | void KODayMatrix::paintEvent(QPaintEvent * pevent) | 488 | void KODayMatrix::paintEvent(QPaintEvent * pevent) |
489 | { | 489 | { |
490 | //kdDebug() << "KODayMatrix::paintEvent() BEGIN" << endl; | 490 | //kdDebug() << "KODayMatrix::paintEvent() BEGIN" << endl; |
491 | if ( mPendingUpdateBeforeRepaint ) { | 491 | if ( mPendingUpdateBeforeRepaint ) { |
492 | updateViewTimed(); | 492 | updateViewTimed(); |
493 | mPendingUpdateBeforeRepaint = false; | 493 | mPendingUpdateBeforeRepaint = false; |
494 | } | 494 | } |
495 | QPainter p(this); | 495 | QPainter p(this); |
496 | 496 | ||
497 | QRect sz = frameRect(); | 497 | QRect sz = frameRect(); |
498 | int dheight = daysize.height(); | 498 | int dheight = daysize.height(); |
499 | int dwidth = daysize.width(); | 499 | int dwidth = daysize.width(); |
500 | int row,col; | 500 | int row,col; |
501 | int selw, selh; | 501 | int selw, selh; |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index 1edddac..6bdee18 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -203,16 +203,20 @@ void KOTodoViewItem::stateChange(bool state) | |||
203 | // qDebug("KOTodoViewItem::stateChange "); | 203 | // qDebug("KOTodoViewItem::stateChange "); |
204 | // do not change setting on startup | 204 | // do not change setting on startup |
205 | if ( m_init ) return; | 205 | if ( m_init ) return; |
206 | if (isOn()!=state) { | 206 | if (isOn()!=state) { |
207 | setOn(state); | 207 | setOn(state); |
208 | //qDebug("SETON "); | 208 | //qDebug("SETON "); |
209 | return; | 209 | return; |
210 | } | 210 | } |
211 | if ( mTodo->isCompleted() == state ) { | ||
212 | //qDebug("STATECHANGE:nothing to do "); | ||
213 | return; | ||
214 | } | ||
211 | QString keyd = "=="; | 215 | QString keyd = "=="; |
212 | QString keyt = "=="; | 216 | QString keyt = "=="; |
213 | //qDebug("KOTodoViewItem::stateChange %s ", text(0).latin1()); | 217 | //qDebug("KOTodoViewItem::stateChange %s ", text(0).latin1()); |
214 | mTodo->setCompleted(state); | 218 | mTodo->setCompleted(state); |
215 | if (state) mTodo->setCompleted(QDateTime::currentDateTime()); | 219 | if (state) mTodo->setCompleted(QDateTime::currentDateTime()); |
216 | 220 | ||
217 | if (mTodo->hasDueDate()) { | 221 | if (mTodo->hasDueDate()) { |
218 | setText(3, mTodo->dtDueDateStr()); | 222 | setText(3, mTodo->dtDueDateStr()); |