author | zautrix <zautrix> | 2005-07-06 21:26:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-06 21:26:48 (UTC) |
commit | 630904c92dc014538ff0b08731efb10dcc25426f (patch) (unidiff) | |
tree | fe27e7572546f070aa16445aaaa5084d5f84a965 | |
parent | e1731d8790403a079613f291b4ac172d8f04c960 (diff) | |
download | kdepimpi-630904c92dc014538ff0b08731efb10dcc25426f.zip kdepimpi-630904c92dc014538ff0b08731efb10dcc25426f.tar.gz kdepimpi-630904c92dc014538ff0b08731efb10dcc25426f.tar.bz2 |
fixx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 6 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index d6b2dc7..79de197 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,98 +1,104 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.14 ************ | ||
4 | |||
5 | Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. | ||
6 | Added a button to add a subtodo quickly. | ||
7 | |||
8 | |||
3 | ********** VERSION 2.1.13 ************ | 9 | ********** VERSION 2.1.13 ************ |
4 | 10 | ||
5 | Fixed a problem in KA/Pi search. | 11 | Fixed a problem in KA/Pi search. |
6 | Fixed some minor problems in KO/Pi. | 12 | Fixed some minor problems in KO/Pi. |
7 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. | 13 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. |
8 | 14 | ||
9 | Fixed memory usage problems in KA/Pi: | 15 | Fixed memory usage problems in KA/Pi: |
10 | When loading data KA/Pi did load the file data twice. | 16 | When loading data KA/Pi did load the file data twice. |
11 | Example: | 17 | Example: |
12 | A 600k file did consume 1200k memory during loading process. | 18 | A 600k file did consume 1200k memory during loading process. |
13 | This is fixed, it does now consume only 600k during loading process. | 19 | This is fixed, it does now consume only 600k during loading process. |
14 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. | 20 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. |
15 | This is fixed. | 21 | This is fixed. |
16 | Example: | 22 | Example: |
17 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. | 23 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. |
18 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. | 24 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. |
19 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. | 25 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. |
20 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. | 26 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. |
21 | The saving of data may be a bit slower now. | 27 | The saving of data may be a bit slower now. |
22 | 28 | ||
23 | Fixed memory usage problems in KO/Pi: | 29 | Fixed memory usage problems in KO/Pi: |
24 | When KO/Pi did save the data to file, it did not release the used buffers after saving. | 30 | When KO/Pi did save the data to file, it did not release the used buffers after saving. |
25 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. | 31 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. |
26 | This is fixed. | 32 | This is fixed. |
27 | Example: | 33 | Example: |
28 | When saving a 400k file KO/Pi do now use 400k less memory now. | 34 | When saving a 400k file KO/Pi do now use 400k less memory now. |
29 | 35 | ||
30 | Optimized memory usage in KO/Pi Agenda view: | 36 | Optimized memory usage in KO/Pi Agenda view: |
31 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. | 37 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. |
32 | These buffers were not made smaller (i.e. downsized) because of performance reasons. | 38 | These buffers were not made smaller (i.e. downsized) because of performance reasons. |
33 | The handling of these buffers are now much smarter: | 39 | The handling of these buffers are now much smarter: |
34 | Two (of six) buffers are removed completely. | 40 | Two (of six) buffers are removed completely. |
35 | The remaing four buffers are now downsized after not using the agenda view for 45 seconds. | 41 | The remaing four buffers are now downsized after not using the agenda view for 45 seconds. |
36 | Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. | 42 | Such that the memory usage of KO/Pi is smaller now in general ( because 2 buffers are removed) and is much smaller when not using the agenda view. That is very important when using fastload for KO/Pi. |
37 | 43 | ||
38 | Worst case example ( for a maximum size agenda content): | 44 | Worst case example ( for a maximum size agenda content): |
39 | When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. | 45 | When resizing the agenda content to a large scale, KO/Pi did use 17Meg of mem ( and did not use less memory until it was stopped). Now KO/Pi is using on the same operation only 14.3 Meg of mem and after 45 seconds not using the agenda view it uses only 9.4 Meg of mem. |
40 | 46 | ||
41 | When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. | 47 | When switching to an unused Agenda view now KO/Pi is upizing the buffers again. This takes less than a second. Such that switching to Agenda view (after not using it for more than 45 seconds) is now a bit slower. |
42 | 48 | ||
43 | Summary: | 49 | Summary: |
44 | Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. | 50 | Many memory wasting problems of KA/Pi and KO/Pi fixed such that it is better to use on the Zaurus. |
45 | 51 | ||
46 | ********** VERSION 2.1.12 ************ | 52 | ********** VERSION 2.1.12 ************ |
47 | 53 | ||
48 | KO/Pi: | 54 | KO/Pi: |
49 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. | 55 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. |
50 | Fixed a problem with the month view when file was saved but KO/Pi was not the active window. | 56 | Fixed a problem with the month view when file was saved but KO/Pi was not the active window. |
51 | Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). | 57 | Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). |
52 | Fixed some other small problems. | 58 | Fixed some other small problems. |
53 | 59 | ||
54 | ********** VERSION 2.1.11 ************ | 60 | ********** VERSION 2.1.11 ************ |
55 | 61 | ||
56 | KO/Pi: | 62 | KO/Pi: |
57 | Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. | 63 | Because we can have many calendars now in KO/Pi we can have more than one journal entry per day. |
58 | Added features to handle (and add ) more than one journal entry per day. | 64 | Added features to handle (and add ) more than one journal entry per day. |
59 | Added option for a journal title. | 65 | Added option for a journal title. |
60 | 66 | ||
61 | Added info about the calendar, the item belongs to, to the event/todo/journal viewer. | 67 | Added info about the calendar, the item belongs to, to the event/todo/journal viewer. |
62 | Fixed a problem of the alarm of completed recurring todos. | 68 | Fixed a problem of the alarm of completed recurring todos. |
63 | Added to the event/todo editor to set quickly the category of an item. | 69 | Added to the event/todo editor to set quickly the category of an item. |
64 | 70 | ||
65 | 71 | ||
66 | Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. | 72 | Fixed some problems when calling KO/Pi or KA/Pi from the alarm applet. |
67 | 73 | ||
68 | Added KA/Pi multi sync to the multi sync called from the alarm applet. | 74 | Added KA/Pi multi sync to the multi sync called from the alarm applet. |
69 | 75 | ||
70 | ********** VERSION 2.1.10 ************ | 76 | ********** VERSION 2.1.10 ************ |
71 | 77 | ||
72 | KO/Pi: | 78 | KO/Pi: |
73 | Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. | 79 | Importing Birthdays will now create another file resource "Birthdays" and import the birthday data from KA/Pi into that file. |
74 | When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. | 80 | When a multidayevent is selected in monthview all occurences of this event in the monthview are now hightlighted. |
75 | Fixed a bug in searching for a small timerange, i.e. one day. | 81 | Fixed a bug in searching for a small timerange, i.e. one day. |
76 | 82 | ||
77 | KA/Pi: | 83 | KA/Pi: |
78 | Fixed two problems in csv export. | 84 | Fixed two problems in csv export. |
79 | Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. | 85 | Fixed problems when calling the contact selection dialog from KO/Pi or OM/Pi. |
80 | 86 | ||
81 | ********** VERSION 2.1.9 ************ | 87 | ********** VERSION 2.1.9 ************ |
82 | 88 | ||
83 | KO/Pi: | 89 | KO/Pi: |
84 | Fixed some problems of the new search options in the search dialog. | 90 | Fixed some problems of the new search options in the search dialog. |
85 | Fixed some problems in the new resource config options. | 91 | Fixed some problems in the new resource config options. |
86 | Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. | 92 | Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. |
87 | Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: | 93 | Fixed a problem creating new events in the agenda view if at the day/time is already an agenda item shown: |
88 | Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. | 94 | Now you can click on the bottom/top of an allday agenda item or on the left/right side of an agenda item to get the "new todo/new event" popup. |
89 | 95 | ||
90 | Fixed a problem in recurrence range in syncing with DTM. | 96 | Fixed a problem in recurrence range in syncing with DTM. |
91 | 97 | ||
92 | KA/Pi: | 98 | KA/Pi: |
93 | Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) | 99 | Made it posiible to show in the contact overview the details of all data available for that contact( e.g. office, spouse, children, nickname ...) |
94 | 100 | ||
95 | PwM/Pi: | 101 | PwM/Pi: |
96 | Added "sec" to the timeout config settings to make it clear the timeout values are seconds. | 102 | Added "sec" to the timeout config settings to make it clear the timeout values are seconds. |
97 | 103 | ||
98 | ********** VERSION 2.1.8 ************ | 104 | ********** VERSION 2.1.8 ************ |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index c23a8ee..06d40b1 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -1403,195 +1403,197 @@ void KOTodoView::itemStateChanged( QListViewItem *item ) | |||
1403 | { | 1403 | { |
1404 | if (!item) return; | 1404 | if (!item) return; |
1405 | 1405 | ||
1406 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 1406 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
1407 | 1407 | ||
1408 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 1408 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
1409 | 1409 | ||
1410 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 1410 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 1413 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
1414 | { | 1414 | { |
1415 | mTodoListView->saveLayout(config,group); | 1415 | mTodoListView->saveLayout(config,group); |
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 1418 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
1419 | { | 1419 | { |
1420 | mTodoListView->restoreLayout(config,group); | 1420 | mTodoListView->restoreLayout(config,group); |
1421 | } | 1421 | } |
1422 | 1422 | ||
1423 | void KOTodoView::processSelectionChange() | 1423 | void KOTodoView::processSelectionChange() |
1424 | { | 1424 | { |
1425 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 1425 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
1426 | 1426 | ||
1427 | KOTodoViewItem *item = | 1427 | KOTodoViewItem *item = |
1428 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 1428 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
1429 | 1429 | ||
1430 | if ( !item ) { | 1430 | if ( !item ) { |
1431 | emit incidenceSelected( 0 ); | 1431 | emit incidenceSelected( 0 ); |
1432 | mNewSubBut->setEnabled( false ); | 1432 | mNewSubBut->setEnabled( false ); |
1433 | } else { | 1433 | } else { |
1434 | emit incidenceSelected( item->todo() ); | 1434 | emit incidenceSelected( item->todo() ); |
1435 | mNewSubBut->setEnabled( true ); | 1435 | mNewSubBut->setEnabled( true ); |
1436 | } | 1436 | } |
1437 | } | 1437 | } |
1438 | 1438 | ||
1439 | void KOTodoView::modified(bool b) | 1439 | void KOTodoView::modified(bool b) |
1440 | { | 1440 | { |
1441 | emit isModified(b); | 1441 | emit isModified(b); |
1442 | } | 1442 | } |
1443 | void KOTodoView::setTodoModified( Todo* todo ) | 1443 | void KOTodoView::setTodoModified( Todo* todo ) |
1444 | { | 1444 | { |
1445 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); | 1445 | todoModified( todo, KOGlobals::UNKNOWN_MODIFIED ); |
1446 | } | 1446 | } |
1447 | void KOTodoView::clearSelection() | 1447 | void KOTodoView::clearSelection() |
1448 | { | 1448 | { |
1449 | mTodoListView->selectAll( false ); | 1449 | mTodoListView->selectAll( false ); |
1450 | } | 1450 | } |
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 | if ( checkTodo( todo ) ) { | ||
1499 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | 1500 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); |
1500 | mTodoMap.insert(todo,todoItem); | 1501 | mTodoMap.insert(todo,todoItem); |
1501 | } | 1502 | } |
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 | { |
1549 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 1551 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
1550 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 1552 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
1551 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 1553 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
1552 | updateView(); | 1554 | updateView(); |
1553 | if ( KOPrefs::instance()->mShowCompletedTodo ) | 1555 | if ( KOPrefs::instance()->mShowCompletedTodo ) |
1554 | topLevelWidget()->setCaption(i18n("Show Completed")); | 1556 | topLevelWidget()->setCaption(i18n("Show Completed")); |
1555 | else | 1557 | else |
1556 | topLevelWidget()->setCaption(i18n("Hide Completed")); | 1558 | topLevelWidget()->setCaption(i18n("Hide Completed")); |
1557 | } | 1559 | } |
1558 | 1560 | ||
1559 | void KOTodoView::addQuickTodo() | 1561 | void KOTodoView::addQuickTodo() |
1560 | { | 1562 | { |
1561 | addQuickTodoPar( 0 ); | 1563 | addQuickTodoPar( 0 ); |
1562 | } | 1564 | } |
1563 | void KOTodoView::addQuickTodoPar( Todo * parentTodo) | 1565 | void KOTodoView::addQuickTodoPar( Todo * parentTodo) |
1564 | { | 1566 | { |
1565 | Todo *todo = new Todo(); | 1567 | Todo *todo = new Todo(); |
1566 | todo->setSummary(mQuickAdd->text()); | 1568 | todo->setSummary(mQuickAdd->text()); |
1567 | todo->setOrganizer(KOPrefs::instance()->email()); | 1569 | todo->setOrganizer(KOPrefs::instance()->email()); |
1568 | if ( parentTodo ) { | 1570 | if ( parentTodo ) { |
1569 | todo->setRelatedTo(parentTodo); | 1571 | todo->setRelatedTo(parentTodo); |
1570 | 1572 | ||
1571 | todo->setCategories (parentTodo->categoriesStr ()); | 1573 | todo->setCategories (parentTodo->categoriesStr ()); |
1572 | todo->setSecrecy (parentTodo->secrecy ()); | 1574 | todo->setSecrecy (parentTodo->secrecy ()); |
1573 | if ( parentTodo->priority() < 3 ) | 1575 | if ( parentTodo->priority() < 3 ) |
1574 | todo->setPriority( parentTodo->priority() ); | 1576 | todo->setPriority( parentTodo->priority() ); |
1575 | todo->setCalID( parentTodo->calID() ); | 1577 | todo->setCalID( parentTodo->calID() ); |
1576 | } else { | 1578 | } else { |
1577 | CalFilter * cf = mCalendar->filter(); | 1579 | CalFilter * cf = mCalendar->filter(); |
1578 | if ( cf ) { | 1580 | if ( cf ) { |
1579 | if ( cf->isEnabled()&& cf->showCategories()) { | 1581 | if ( cf->isEnabled()&& cf->showCategories()) { |
1580 | todo->setCategories(cf->categoryList()); | 1582 | todo->setCategories(cf->categoryList()); |
1581 | } | 1583 | } |
1582 | if ( cf->isEnabled() ) | 1584 | if ( cf->isEnabled() ) |
1583 | todo->setSecrecy( cf->getSecrecy()); | 1585 | todo->setSecrecy( cf->getSecrecy()); |
1584 | } | 1586 | } |
1585 | } | 1587 | } |
1586 | mCalendar->addTodo(todo); | 1588 | mCalendar->addTodo(todo); |
1587 | mQuickAdd->setText(""); | 1589 | mQuickAdd->setText(""); |
1588 | todoModified (todo, KOGlobals::EVENTADDED ); | 1590 | todoModified (todo, KOGlobals::EVENTADDED ); |
1589 | updateView(); | 1591 | updateView(); |
1590 | 1592 | ||
1591 | } | 1593 | } |
1592 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1594 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
1593 | { | 1595 | { |
1594 | // e->ignore(); | 1596 | // e->ignore(); |
1595 | //return; | 1597 | //return; |
1596 | //qDebug("KOTodoView::keyPressEvent "); | 1598 | //qDebug("KOTodoView::keyPressEvent "); |
1597 | switch ( e->key() ) { | 1599 | switch ( e->key() ) { |