summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-10-31 11:08:09 (UTC)
committer zautrix <zautrix>2005-10-31 11:08:09 (UTC)
commitf1b53f2c08c2ce384f663ae6f0a818104db8c53e (patch) (unidiff)
tree312764b7399d464483042e44b79577c8c7872c85
parentf8bb077d4016222ebd7a1cf3080010d5e5c65649 (diff)
downloadkdepimpi-f1b53f2c08c2ce384f663ae6f0a818104db8c53e.zip
kdepimpi-f1b53f2c08c2ce384f663ae6f0a818104db8c53e.tar.gz
kdepimpi-f1b53f2c08c2ce384f663ae6f0a818104db8c53e.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp47
-rw-r--r--korganizer/kotodoview.h1
2 files changed, 31 insertions, 17 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index d79a9b9..ba94057 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1343,2 +1343,22 @@ void KOTodoView::changedCategories(int index)
1343} 1343}
1344void KOTodoView::toggleRunningItemQuick()
1345{
1346 if ( !mActiveItem ) return;
1347 Todo * t = mActiveItem->todo();
1348 if ( t->isRunning() ) {
1349 if ( t->runTime() < 15) {
1350 t->stopRunning();
1351 mActiveItem->construct();
1352 topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!"));
1353 return;
1354 }
1355 else
1356 toggleRunningItem();
1357 return;
1358 } else {
1359 t->setRunning( true );
1360 mActiveItem->construct();
1361 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1362 }
1363}
1344void KOTodoView::itemDoubleClicked(QListViewItem *item) 1364void KOTodoView::itemDoubleClicked(QListViewItem *item)
@@ -1363,19 +1383,4 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1363 mActiveItem = (KOTodoViewItem *) item; 1383 mActiveItem = (KOTodoViewItem *) item;
1364 Todo * t = mActiveItem->todo(); 1384 toggleRunningItemQuick();
1365 if ( t->isRunning() ) { 1385 return;
1366 if ( t->runTime() < 15) {
1367 t->stopRunning();
1368 mActiveItem->construct();
1369 topLevelWidget()->setCaption(i18n("Todo stopped - no data saved because runtime was < 15 sec!"));
1370 return;
1371 }
1372 else
1373 toggleRunningItem();
1374 return;
1375 } else {
1376 t->setRunning( true );
1377 mActiveItem->construct();
1378 topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!"));
1379 return;
1380 }
1381 } 1386 }
@@ -1710,2 +1715,10 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e )
1710 e->ignore(); 1715 e->ignore();
1716 break;
1717 case Qt::Key_R:
1718 if (!( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton) ) {
1719 mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem();
1720 toggleRunningItemQuick();
1721 e->accept();
1722 } else
1723 e->ignore();
1711 break; 1724 break;
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 161ecb0..0cbc087 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -250,2 +250,3 @@ class KOTodoView : public KOrg::BaseView
250 void toggleRunningItem(); 250 void toggleRunningItem();
251 void toggleRunningItemQuick();
251 void paintNeeded(); 252 void paintNeeded();