-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 7 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 2 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 5 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 62 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 7 |
6 files changed, 80 insertions, 5 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 8572bf9..0538511 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1202,2 +1202,9 @@ | |||
1202 | { "Journal view","Journal" }, | 1202 | { "Journal view","Journal" }, |
1203 | { "Display all opened","Zeige alle geöffnet" }, | ||
1204 | { "Display all closed","Zeige alle geschlossen" }, | ||
1205 | { "Display all flat","Zeige alle flach" }, | ||
1206 | { "","" }, | ||
1207 | { "","" }, | ||
1208 | { "","" }, | ||
1209 | { "","" }, | ||
1203 | { "","" }, | 1210 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e7b6755..0c39590 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2718,3 +2718,3 @@ void CalendarView::newSubTodo(Todo *parentEvent) | |||
2718 | showTodoEditor(); | 2718 | showTodoEditor(); |
2719 | mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true); | 2719 | mTodoEditor->newTodo(QDateTime(),parentEvent,true); |
2720 | } | 2720 | } |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 0eeacb3..002234d 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -440,3 +440,3 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
440 | blockNewEvent = true; | 440 | blockNewEvent = true; |
441 | qDebug("right "); | 441 | //qDebug("right "); |
442 | int x,y; | 442 | int x,y; |
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index abeb068..16c19a4 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp | |||
@@ -275,4 +275,7 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) | |||
275 | showPage( 0 ); | 275 | showPage( 0 ); |
276 | if ( mRelatedTodo ) | 276 | if ( mRelatedTodo ) { |
277 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); | 277 | mGeneral->setCategories (mRelatedTodo->categoriesStr ()); |
278 | mGeneral->setSecrecy (mRelatedTodo->secrecy ()); | ||
279 | |||
280 | } | ||
278 | mGeneral->setFocusOn( 2 ); | 281 | mGeneral->setFocusOn( 2 ); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 30adb06..22486ba 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -431,2 +431,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
431 | mItemPopupMenu->insertSeparator(); | 431 | mItemPopupMenu->insertSeparator(); |
432 | #if 0 | ||
432 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 433 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
@@ -440,2 +441,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
440 | 441 | ||
442 | #endif | ||
441 | mPopupMenu = new QPopupMenu(this); | 443 | mPopupMenu = new QPopupMenu(this); |
@@ -451,4 +453,11 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
451 | this, SLOT( toggleRunning() ),0,5 ); | 453 | this, SLOT( toggleRunning() ),0,5 ); |
454 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | ||
455 | this, SLOT( setAllOpen() ),0,6 ); | ||
456 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | ||
457 | this, SLOT( setAllClose() ),0,7 ); | ||
458 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | ||
459 | this, SLOT( setAllFlat() ),0,8 ); | ||
452 | mDocPrefs = new DocPrefs( name ); | 460 | mDocPrefs = new DocPrefs( name ); |
453 | 461 | ||
462 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | ||
454 | mPopupMenu->setCheckable( true ); | 463 | mPopupMenu->setCheckable( true ); |
@@ -524,2 +533,6 @@ void KOTodoView::updateView() | |||
524 | } | 533 | } |
534 | if ( isFlatDisplay ) { | ||
535 | setAllFlat(); | ||
536 | return; | ||
537 | } | ||
525 | //qDebug("update "); | 538 | //qDebug("update "); |
@@ -999,2 +1012,49 @@ void KOTodoView::clearSelection() | |||
999 | } | 1012 | } |
1013 | void KOTodoView::setAllOpen() | ||
1014 | { | ||
1015 | if ( isFlatDisplay ) { | ||
1016 | isFlatDisplay = false; | ||
1017 | mPopupMenu->setItemChecked( 8,false ); | ||
1018 | updateView(); | ||
1019 | } | ||
1020 | setOpen(mTodoListView->firstChild(), true); | ||
1021 | } | ||
1022 | void KOTodoView::setAllClose() | ||
1023 | { | ||
1024 | if ( isFlatDisplay ) { | ||
1025 | isFlatDisplay = false; | ||
1026 | mPopupMenu->setItemChecked( 8,false ); | ||
1027 | updateView(); | ||
1028 | } | ||
1029 | setOpen(mTodoListView->firstChild(), false); | ||
1030 | } | ||
1031 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | ||
1032 | { | ||
1033 | |||
1034 | while ( item ) { | ||
1035 | setOpen( item->firstChild(), setOpenI ); | ||
1036 | item->setOpen( setOpenI ); | ||
1037 | item = item->nextSibling(); | ||
1038 | } | ||
1039 | } | ||
1040 | |||
1041 | void KOTodoView::setAllFlat() | ||
1042 | { | ||
1043 | pendingSubtodo = 0; | ||
1044 | if ( mBlockUpdate ) { | ||
1045 | return; | ||
1046 | } | ||
1047 | mPopupMenu->setItemChecked( 8,true ); | ||
1048 | isFlatDisplay = true; | ||
1049 | QPtrList<Todo> todoList = calendar()->todos(); | ||
1050 | mTodoMap.clear(); | ||
1051 | mTodoListView->clear(); | ||
1052 | Todo *todo; | ||
1053 | for(todo = todoList.first(); todo; todo = todoList.next()) { | ||
1054 | KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this); | ||
1055 | mTodoMap.insert(todo,todoItem); | ||
1056 | } | ||
1057 | mTodoListView->setFocus(); | ||
1058 | processSelectionChange(); | ||
1059 | } | ||
1000 | 1060 | ||
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 5ca0362..f11518d 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -163,2 +163,6 @@ class KOTodoView : public KOrg::BaseView | |||
163 | 163 | ||
164 | void setAllOpen(); | ||
165 | void setAllClose(); | ||
166 | void setAllFlat(); | ||
167 | |||
164 | void purgeCompleted(); | 168 | void purgeCompleted(); |
@@ -212,3 +216,4 @@ class KOTodoView : public KOrg::BaseView | |||
212 | bool checkTodo( Todo * ); | 216 | bool checkTodo( Todo * ); |
213 | 217 | bool isFlatDisplay; | |
218 | void setOpen( QListViewItem*, bool setOpen); | ||
214 | KOTodoListView *mTodoListView; | 219 | KOTodoListView *mTodoListView; |