summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-29 17:41:47 (UTC)
committer zautrix <zautrix>2005-01-29 17:41:47 (UTC)
commit078f8bb7d4eca69b799d79ac39d098e1752778a8 (patch) (side-by-side diff)
tree1cc29a057b3954149a5c007c2de4ba1eedde9ecc
parent41baa2e15a1ec5e14750297e0a21020c9e53d953 (diff)
downloadkdepimpi-078f8bb7d4eca69b799d79ac39d098e1752778a8.zip
kdepimpi-078f8bb7d4eca69b799d79ac39d098e1752778a8.tar.gz
kdepimpi-078f8bb7d4eca69b799d79ac39d098e1752778a8.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt7
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koagenda.cpp2
-rw-r--r--korganizer/kotodoeditor.cpp5
-rw-r--r--korganizer/kotodoview.cpp62
-rw-r--r--korganizer/kotodoview.h7
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 @@
{ "Journal view","Journal" },
+{ "Display all opened","Zeige alle geöffnet" },
+{ "Display all closed","Zeige alle geschlossen" },
+{ "Display all flat","Zeige alle flach" },
+{ "","" },
+{ "","" },
+{ "","" },
+{ "","" },
{ "","" },
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)
showTodoEditor();
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
+ mTodoEditor->newTodo(QDateTime(),parentEvent,true);
}
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)
blockNewEvent = true;
- qDebug("right ");
+ //qDebug("right ");
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)
showPage( 0 );
- if ( mRelatedTodo )
+ if ( mRelatedTodo ) {
mGeneral->setCategories (mRelatedTodo->categoriesStr ());
+ mGeneral->setSecrecy (mRelatedTodo->secrecy ());
+
+ }
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) :
mItemPopupMenu->insertSeparator();
+#if 0
mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"),
@@ -440,2 +441,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
+#endif
mPopupMenu = new QPopupMenu(this);
@@ -451,4 +453,11 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
this, SLOT( toggleRunning() ),0,5 );
+ mPopupMenu->insertItem(i18n(" set all open","Display all opened"),
+ this, SLOT( setAllOpen() ),0,6 );
+ mPopupMenu->insertItem(i18n(" set all close","Display all closed"),
+ this, SLOT( setAllClose() ),0,7 );
+ mPopupMenu->insertItem(i18n(" set all flat","Display all flat"),
+ this, SLOT( setAllFlat() ),0,8 );
mDocPrefs = new DocPrefs( name );
-
+
+ mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu );
mPopupMenu->setCheckable( true );
@@ -524,2 +533,6 @@ void KOTodoView::updateView()
}
+ if ( isFlatDisplay ) {
+ setAllFlat();
+ return;
+ }
//qDebug("update ");
@@ -999,2 +1012,49 @@ void KOTodoView::clearSelection()
}
+void KOTodoView::setAllOpen()
+{
+ if ( isFlatDisplay ) {
+ isFlatDisplay = false;
+ mPopupMenu->setItemChecked( 8,false );
+ updateView();
+ }
+ setOpen(mTodoListView->firstChild(), true);
+}
+void KOTodoView::setAllClose()
+{
+ if ( isFlatDisplay ) {
+ isFlatDisplay = false;
+ mPopupMenu->setItemChecked( 8,false );
+ updateView();
+ }
+ setOpen(mTodoListView->firstChild(), false);
+}
+void KOTodoView::setOpen( QListViewItem* item, bool setOpenI)
+{
+
+ while ( item ) {
+ setOpen( item->firstChild(), setOpenI );
+ item->setOpen( setOpenI );
+ item = item->nextSibling();
+ }
+}
+
+void KOTodoView::setAllFlat()
+{
+ pendingSubtodo = 0;
+ if ( mBlockUpdate ) {
+ return;
+ }
+ mPopupMenu->setItemChecked( 8,true );
+ isFlatDisplay = true;
+ QPtrList<Todo> todoList = calendar()->todos();
+ mTodoMap.clear();
+ mTodoListView->clear();
+ Todo *todo;
+ for(todo = todoList.first(); todo; todo = todoList.next()) {
+ KOTodoViewItem *todoItem = new KOTodoViewItem(mTodoListView,todo,this);
+ mTodoMap.insert(todo,todoItem);
+ }
+ mTodoListView->setFocus();
+ processSelectionChange();
+}
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
+ void setAllOpen();
+ void setAllClose();
+ void setAllFlat();
+
void purgeCompleted();
@@ -212,3 +216,4 @@ class KOTodoView : public KOrg::BaseView
bool checkTodo( Todo * );
-
+ bool isFlatDisplay;
+ void setOpen( QListViewItem*, bool setOpen);
KOTodoListView *mTodoListView;