summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Unidiff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index f46a103..82c0f4c 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1336,66 +1336,66 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1336 } 1336 }
1337 } 1337 }
1338 } 1338 }
1339 if ( KOPrefs::instance()->mEditOnDoubleClick ) 1339 if ( KOPrefs::instance()->mEditOnDoubleClick )
1340 editItem( item ); 1340 editItem( item );
1341 else 1341 else
1342 showItem( item , QPoint(), 0 ); 1342 showItem( item , QPoint(), 0 );
1343} 1343}
1344void KOTodoView::toggleRunningItem() 1344void KOTodoView::toggleRunningItem()
1345{ 1345{
1346 // qDebug("KOTodoView::toggleRunning() "); 1346 // qDebug("KOTodoView::toggleRunning() ");
1347 if ( ! mActiveItem ) 1347 if ( ! mActiveItem )
1348 return; 1348 return;
1349 Todo * t = mActiveItem->todo(); 1349 Todo * t = mActiveItem->todo();
1350 if ( t->isRunning() ) { 1350 if ( t->isRunning() ) {
1351 KOStopTodoPrefs tp ( t, this ); 1351 KOStopTodoPrefs tp ( t, this );
1352 if (QApplication::desktop()->width() <= 800 ){ 1352 if (QApplication::desktop()->width() <= 800 ){
1353 int wid = tp.width(); 1353 int wid = tp.width();
1354 int hei = tp.height(); 1354 int hei = tp.height();
1355 int xx = (QApplication::desktop()->width()-wid)/2; 1355 int xx = (QApplication::desktop()->width()-wid)/2;
1356 int yy = (QApplication::desktop()->height()-hei)/2; 1356 int yy = (QApplication::desktop()->height()-hei)/2;
1357 tp.setGeometry( xx,yy,wid,hei ); 1357 tp.setGeometry( xx,yy,wid,hei );
1358 } 1358 }
1359 tp.exec(); 1359 tp.exec();
1360 mActiveItem->construct(); 1360 updateTodo ( t, 0 );
1361 } else { 1361 } else {
1362 KOStartTodoPrefs tp ( t->summary(), this ); 1362 KOStartTodoPrefs tp ( t->summary(), this );
1363 if (QApplication::desktop()->width() <= 800 ){ 1363 if (QApplication::desktop()->width() <= 800 ){
1364 int wid = tp.width(); 1364 int wid = tp.width();
1365 int hei = tp.height(); 1365 int hei = tp.height();
1366 int xx = (QApplication::desktop()->width()-wid)/2; 1366 int xx = (QApplication::desktop()->width()-wid)/2;
1367 int yy = (QApplication::desktop()->height()-hei)/2; 1367 int yy = (QApplication::desktop()->height()-hei)/2;
1368 tp.setGeometry( xx,yy,wid,hei ); 1368 tp.setGeometry( xx,yy,wid,hei );
1369 } 1369 }
1370 if ( !tp.exec() ) return; 1370 if ( !tp.exec() ) return;
1371 if ( tp.stopAll() ) { 1371 if ( tp.stopAll() ) {
1372 mCalendar->stopAllTodos(); 1372 mCalendar->stopAllTodos();
1373 t->setRunning( true ); 1373 t->setRunning( true );
1374 updateView(); 1374 updateView();
1375 } else { 1375 } else {
1376 t->setRunning( true ); 1376 t->setRunning( true );
1377 mActiveItem->construct(); 1377 updateTodo ( t, 0 );
1378 } 1378 }
1379 } 1379 }
1380} 1380}
1381 1381
1382void KOTodoView::itemClicked(QListViewItem *item) 1382void KOTodoView::itemClicked(QListViewItem *item)
1383{ 1383{
1384 //qDebug("KOTodoView::itemClicked %d", item); 1384 //qDebug("KOTodoView::itemClicked %d", item);
1385 if (!item) { 1385 if (!item) {
1386 if ( pendingSubtodo != 0 ) { 1386 if ( pendingSubtodo != 0 ) {
1387 topLevelWidget()->setCaption(i18n("Reparenting aborted!")); 1387 topLevelWidget()->setCaption(i18n("Reparenting aborted!"));
1388 } 1388 }
1389 pendingSubtodo = 0; 1389 pendingSubtodo = 0;
1390 return; 1390 return;
1391 } 1391 }
1392 KOTodoViewItem *todoItem = (KOTodoViewItem *)item; 1392 KOTodoViewItem *todoItem = (KOTodoViewItem *)item;
1393 if ( pendingSubtodo != 0 ) { 1393 if ( pendingSubtodo != 0 ) {
1394 bool allowReparent = true; 1394 bool allowReparent = true;
1395 QListViewItem *par = item; 1395 QListViewItem *par = item;
1396 while ( par ) { 1396 while ( par ) {
1397 if ( par == pendingSubtodo ) { 1397 if ( par == pendingSubtodo ) {
1398 allowReparent = false; 1398 allowReparent = false;
1399 break; 1399 break;
1400 } 1400 }
1401 par = par->parent(); 1401 par = par->parent();