-rw-r--r-- | bin/kdepim/WhatsNew.txt | 8 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 88 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 3 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 3 | ||||
-rw-r--r-- | microkde/kdeui/klistview.cpp | 7 | ||||
-rw-r--r-- | microkde/kdeui/klistview.h | 1 |
9 files changed, 122 insertions, 7 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index eb232fa..e17297a 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -2,2 +2,10 @@ Info about the changes in new versions of KDE-Pim/Pi | |||
2 | 2 | ||
3 | ********** VERSION 1.9.8 ************ | ||
4 | |||
5 | Fixed character decoding in OM/Pi. | ||
6 | (e.g. German "Umlaute" were not displayed properly.) | ||
7 | |||
8 | Made is possible to reparent todos in KO/Pi. | ||
9 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | ||
10 | |||
3 | ********** VERSION 1.9.7 ************ | 11 | ********** VERSION 1.9.7 ************ |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e4a11f5..1f8ad5b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -421,2 +421,4 @@ void CalendarView::init() | |||
421 | 421 | ||
422 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | ||
423 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); | ||
422 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, | 424 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, |
@@ -2748,2 +2750,16 @@ void CalendarView::appointment_delete() | |||
2748 | 2750 | ||
2751 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | ||
2752 | { | ||
2753 | if (!sub) return; | ||
2754 | if (!parent) return; | ||
2755 | if ( sub->relatedTo() ) | ||
2756 | sub->relatedTo()->removeRelation(sub); | ||
2757 | sub->setRelatedTo(parent); | ||
2758 | sub->setRelatedToUid(parent->uid()); | ||
2759 | parent->addRelation(sub); | ||
2760 | sub->updated(); | ||
2761 | parent->updated(); | ||
2762 | setModified(true); | ||
2763 | updateView(); | ||
2764 | } | ||
2749 | void CalendarView::todo_unsub(Todo *anTodo ) | 2765 | void CalendarView::todo_unsub(Todo *anTodo ) |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 660cce7..9f56cc8 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -356,2 +356,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
356 | void todo_unsub( Todo * ); | 356 | void todo_unsub( Todo * ); |
357 | void todo_resub( Todo * parent, Todo * sub ); | ||
357 | 358 | ||
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ca5eadd..a8143a0 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -213,2 +213,3 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | |||
213 | { | 213 | { |
214 | |||
214 | #ifndef KORG_NODND | 215 | #ifndef KORG_NODND |
@@ -276,2 +277,4 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
276 | QListView::keyPressEvent ( e ); | 277 | QListView::keyPressEvent ( e ); |
278 | e->accept(); | ||
279 | return; | ||
277 | break; | 280 | break; |
@@ -416,3 +419,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
416 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 419 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
417 | SLOT (unparentTodo())); | 420 | SLOT (unparentTodo()),0,21); |
421 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | ||
422 | SLOT (reparentTodo()),0,22); | ||
418 | mItemPopupMenu->insertSeparator(); | 423 | mItemPopupMenu->insertSeparator(); |
@@ -441,2 +446,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
441 | SLOT( editItem( QListViewItem *) ) ); | 446 | SLOT( editItem( QListViewItem *) ) ); |
447 | /* | ||
442 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 448 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
@@ -444,2 +450,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
444 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 450 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
451 | */ | ||
452 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | ||
453 | const QPoint &,int ) ), | ||
454 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | ||
445 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 455 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
@@ -697,3 +707,2 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) | |||
697 | { | 707 | { |
698 | |||
699 | mActiveItem = (KOTodoViewItem *)item; | 708 | mActiveItem = (KOTodoViewItem *)item; |
@@ -732,2 +741,11 @@ void KOTodoView::unparentTodo() | |||
732 | } | 741 | } |
742 | |||
743 | void KOTodoView::reparentTodo() | ||
744 | { | ||
745 | if (mActiveItem) { | ||
746 | qDebug("KOTodoView::reparentTodo() "); | ||
747 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | ||
748 | pendingSubtodo = mActiveItem; | ||
749 | } | ||
750 | } | ||
733 | void KOTodoView::editTodo() | 751 | void KOTodoView::editTodo() |
@@ -845,2 +863,6 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) | |||
845 | { | 863 | { |
864 | if ( pendingSubtodo != 0 ) { | ||
865 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | ||
866 | } | ||
867 | pendingSubtodo = 0; | ||
846 | if (!item) { | 868 | if (!item) { |
@@ -856,7 +878,33 @@ void KOTodoView::itemClicked(QListViewItem *item) | |||
856 | { | 878 | { |
879 | |||
857 | if (!item) { | 880 | if (!item) { |
881 | if ( pendingSubtodo != 0 ) { | ||
882 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | ||
883 | } | ||
884 | pendingSubtodo = 0; | ||
858 | return; | 885 | return; |
859 | } | 886 | } |
860 | |||
861 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 887 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
888 | if ( pendingSubtodo != 0 ) { | ||
889 | bool allowReparent = true; | ||
890 | QListViewItem *par = item; | ||
891 | while ( par ) { | ||
892 | if ( par == pendingSubtodo ) { | ||
893 | allowReparent = false; | ||
894 | break; | ||
895 | } | ||
896 | par = par->parent(); | ||
897 | } | ||
898 | if ( !allowReparent ) { | ||
899 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | ||
900 | qDebug("Recursive reparenting not possible "); | ||
901 | pendingSubtodo = 0; | ||
902 | } else { | ||
903 | Todo* newParent = todoItem->todo(); | ||
904 | Todo* newSub = pendingSubtodo->todo(); | ||
905 | pendingSubtodo = 0; | ||
906 | emit reparentTodoSignal( newParent,newSub ); | ||
907 | return; | ||
908 | } | ||
909 | } | ||
862 | int completed = todoItem->todo()->isCompleted(); // Completed or not? | 910 | int completed = todoItem->todo()->isCompleted(); // Completed or not? |
@@ -976,2 +1024,3 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
976 | //return; | 1024 | //return; |
1025 | //qDebug("KOTodoView::keyPressEvent "); | ||
977 | switch ( e->key() ) { | 1026 | switch ( e->key() ) { |
@@ -985,3 +1034,34 @@ void KOTodoView::keyPressEvent ( QKeyEvent * e ) | |||
985 | break; | 1034 | break; |
986 | 1035 | case Qt::Key_U: | |
1036 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1037 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1038 | unparentTodo(); | ||
1039 | e->accept(); | ||
1040 | } else | ||
1041 | e->ignore(); | ||
1042 | break; | ||
1043 | case Qt::Key_S: | ||
1044 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1045 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1046 | reparentTodo(); | ||
1047 | e->accept(); | ||
1048 | } else | ||
1049 | e->ignore(); | ||
1050 | break; | ||
1051 | case Qt::Key_P: | ||
1052 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1053 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1054 | if ( pendingSubtodo ) | ||
1055 | itemClicked(mActiveItem); | ||
1056 | e->accept(); | ||
1057 | } else | ||
1058 | e->ignore(); | ||
1059 | break; | ||
1060 | case Qt::Key_Escape: | ||
1061 | if ( pendingSubtodo ) { | ||
1062 | itemClicked(0); | ||
1063 | e->accept(); | ||
1064 | } else | ||
1065 | e->ignore(); | ||
1066 | break; | ||
987 | default: | 1067 | default: |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 6bf0203..0c08677 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -149,2 +149,3 @@ class KOTodoView : public KOrg::BaseView | |||
149 | void unparentTodo(); | 149 | void unparentTodo(); |
150 | void reparentTodo(); | ||
150 | void showTodo(); | 151 | void showTodo(); |
@@ -175,2 +176,3 @@ class KOTodoView : public KOrg::BaseView | |||
175 | void unparentTodoSignal(Todo *); | 176 | void unparentTodoSignal(Todo *); |
177 | void reparentTodoSignal( Todo *,Todo * ); | ||
176 | void showTodoSignal(Todo *); | 178 | void showTodoSignal(Todo *); |
@@ -228,2 +230,3 @@ class KOTodoView : public KOrg::BaseView | |||
228 | void keyPressEvent ( QKeyEvent * ) ; | 230 | void keyPressEvent ( QKeyEvent * ) ; |
231 | KOTodoViewItem * pendingSubtodo; | ||
229 | }; | 232 | }; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8e6cc53..391f98c 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -500,2 +500,4 @@ void KOViewManager::showTodoView() | |||
500 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); | 500 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); |
501 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | ||
502 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); | ||
501 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), | 503 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8daacc7..06470b8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1149,2 +1149,5 @@ void MainWindow::keyBindings() | |||
1149 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1149 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1150 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | ||
1151 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | ||
1152 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | ||
1150 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1153 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp index 2856f2d..6477d11 100644 --- a/microkde/kdeui/klistview.cpp +++ b/microkde/kdeui/klistview.cpp | |||
@@ -1889,6 +1889,7 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i) | |||
1889 | 1889 | ||
1890 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int) | 1890 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) |
1891 | { | 1891 | { |
1892 | qDebug("KListView::emitContextMenu "); | 1892 | qDebug("KListView::emitContextMenu col"); |
1893 | emit contextMenu (this, i, p); | 1893 | emit contextRequest( i, p, col ); |
1894 | emit contextMenu (this, i, p); | ||
1894 | } | 1895 | } |
diff --git a/microkde/kdeui/klistview.h b/microkde/kdeui/klistview.h index f7d9f85..8d933f6 100644 --- a/microkde/kdeui/klistview.h +++ b/microkde/kdeui/klistview.h | |||
@@ -415,2 +415,3 @@ signals: | |||
415 | void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); | 415 | void doubleClicked( QListViewItem *item, const QPoint &pos, int c ); |
416 | void contextRequest( QListViewItem *item, const QPoint &pos, int c ); | ||
416 | 417 | ||