-rw-r--r-- | korganizer/kotodoview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index c23a8ee..06d40b1 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1451,98 +1451,100 @@ void KOTodoView::clearSelection() | |||
1451 | void KOTodoView::setAllOpen() | 1451 | void KOTodoView::setAllOpen() |
1452 | { | 1452 | { |
1453 | if ( isFlatDisplay ) { | 1453 | if ( isFlatDisplay ) { |
1454 | isFlatDisplay = false; | 1454 | isFlatDisplay = false; |
1455 | mPopupMenu->setItemChecked( 8,false ); | 1455 | mPopupMenu->setItemChecked( 8,false ); |
1456 | updateView(); | 1456 | updateView(); |
1457 | } else { | 1457 | } else { |
1458 | storeCurrentItem(); | 1458 | storeCurrentItem(); |
1459 | } | 1459 | } |
1460 | setOpen(mTodoListView->firstChild(), true); | 1460 | setOpen(mTodoListView->firstChild(), true); |
1461 | resetCurrentItem(); | 1461 | resetCurrentItem(); |
1462 | } | 1462 | } |
1463 | void KOTodoView::setAllClose() | 1463 | void KOTodoView::setAllClose() |
1464 | { | 1464 | { |
1465 | if ( isFlatDisplay ) { | 1465 | if ( isFlatDisplay ) { |
1466 | isFlatDisplay = false; | 1466 | isFlatDisplay = false; |
1467 | mPopupMenu->setItemChecked( 8,false ); | 1467 | mPopupMenu->setItemChecked( 8,false ); |
1468 | updateView(); | 1468 | updateView(); |
1469 | } else { | 1469 | } else { |
1470 | storeCurrentItem(); | 1470 | storeCurrentItem(); |
1471 | } | 1471 | } |
1472 | setOpen(mTodoListView->firstChild(), false); | 1472 | setOpen(mTodoListView->firstChild(), false); |
1473 | resetCurrentItem(); | 1473 | resetCurrentItem(); |
1474 | } | 1474 | } |
1475 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1475 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) |
1476 | { | 1476 | { |
1477 | 1477 | ||
1478 | while ( item ) { | 1478 | while ( item ) { |
1479 | setOpen( item->firstChild(), setOpenI ); | 1479 | setOpen( item->firstChild(), setOpenI ); |
1480 | item->setOpen( setOpenI ); | 1480 | item->setOpen( setOpenI ); |
1481 | item = item->nextSibling(); | 1481 | item = item->nextSibling(); |
1482 | } | 1482 | } |
1483 | } | 1483 | } |
1484 | 1484 | ||
1485 | void KOTodoView::displayAllFlat() | 1485 | void KOTodoView::displayAllFlat() |
1486 | { | 1486 | { |
1487 | storeCurrentItem(); | 1487 | storeCurrentItem(); |
1488 | pendingSubtodo = 0; | 1488 | pendingSubtodo = 0; |
1489 | if ( mBlockUpdate ) { | 1489 | if ( mBlockUpdate ) { |
1490 | return; | 1490 | return; |
1491 | } | 1491 | } |
1492 | mPopupMenu->setItemChecked( 8,true ); | 1492 | mPopupMenu->setItemChecked( 8,true ); |
1493 | isFlatDisplay = true; | 1493 | isFlatDisplay = true; |
1494 | QPtrList<Todo> todoList = calendar()->todos(); | 1494 | QPtrList<Todo> todoList = calendar()->todos(); |
1495 | mTodoMap.clear(); | 1495 | mTodoMap.clear(); |
1496 | mTodoListView->clear(); | 1496 | mTodoListView->clear(); |
1497 | Todo *todo; | 1497 | Todo *todo; |
1498 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1498 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
1499 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1499 | if ( checkTodo( todo ) ) { |
1500 | mTodoMap.insert(todo,todoItem); | 1500 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1501 | mTodoMap.insert(todo,todoItem); | ||
1502 | } | ||
1501 | } | 1503 | } |
1502 | resetCurrentItem(); | 1504 | resetCurrentItem(); |
1503 | } | 1505 | } |
1504 | 1506 | ||
1505 | void KOTodoView::setAllFlat() | 1507 | void KOTodoView::setAllFlat() |
1506 | { | 1508 | { |
1507 | if ( isFlatDisplay ) { | 1509 | if ( isFlatDisplay ) { |
1508 | isFlatDisplay = false; | 1510 | isFlatDisplay = false; |
1509 | mPopupMenu->setItemChecked( 8,false ); | 1511 | mPopupMenu->setItemChecked( 8,false ); |
1510 | updateView(); | 1512 | updateView(); |
1511 | return; | 1513 | return; |
1512 | } | 1514 | } |
1513 | displayAllFlat(); | 1515 | displayAllFlat(); |
1514 | } | 1516 | } |
1515 | 1517 | ||
1516 | void KOTodoView::purgeCompleted() | 1518 | void KOTodoView::purgeCompleted() |
1517 | { | 1519 | { |
1518 | emit purgeCompletedSignal(); | 1520 | emit purgeCompletedSignal(); |
1519 | 1521 | ||
1520 | } | 1522 | } |
1521 | void KOTodoView::toggleQuickTodo() | 1523 | void KOTodoView::toggleQuickTodo() |
1522 | { | 1524 | { |
1523 | if ( mQuickBar->isVisible() ) { | 1525 | if ( mQuickBar->isVisible() ) { |
1524 | mQuickBar->hide(); | 1526 | mQuickBar->hide(); |
1525 | KOPrefs::instance()->mEnableQuickTodo = false; | 1527 | KOPrefs::instance()->mEnableQuickTodo = false; |
1526 | } | 1528 | } |
1527 | else { | 1529 | else { |
1528 | mQuickBar->show(); | 1530 | mQuickBar->show(); |
1529 | KOPrefs::instance()->mEnableQuickTodo = true; | 1531 | KOPrefs::instance()->mEnableQuickTodo = true; |
1530 | } | 1532 | } |
1531 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 1533 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
1532 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 1534 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
1533 | } | 1535 | } |
1534 | 1536 | ||
1535 | void KOTodoView::toggleRunning() | 1537 | void KOTodoView::toggleRunning() |
1536 | { | 1538 | { |
1537 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | 1539 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; |
1538 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 1540 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
1539 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 1541 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
1540 | updateView(); | 1542 | updateView(); |
1541 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | 1543 | if ( KOPrefs::instance()->mHideNonStartedTodos ) |
1542 | topLevelWidget()->setCaption(i18n("Hide not Running")); | 1544 | topLevelWidget()->setCaption(i18n("Hide not Running")); |
1543 | else | 1545 | else |
1544 | topLevelWidget()->setCaption(i18n("Show not Running")); | 1546 | topLevelWidget()->setCaption(i18n("Show not Running")); |
1545 | } | 1547 | } |
1546 | 1548 | ||
1547 | void KOTodoView::toggleCompleted() | 1549 | void KOTodoView::toggleCompleted() |
1548 | { | 1550 | { |