-rw-r--r-- | bin/kdepim/WhatsNew.txt | 8 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 2 | ||||
-rw-r--r-- | korganizer/kodialogmanager.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 2 | ||||
-rw-r--r-- | korganizer/koprefs.h | 2 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 13 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 78 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 7 | ||||
-rw-r--r-- | korganizer/kotodoviewitem.cpp | 33 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 1 | ||||
-rw-r--r-- | version | 2 |
12 files changed, 124 insertions, 30 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index ec75fad..bfe87f0 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.16 ************ | ||
4 | |||
5 | KO/Pi: | ||
6 | Fixed search dialog size on Z 6000 (480x640 display). | ||
7 | Added setting to hide/show time in agenda items. | ||
8 | Added setting to hide not running todos in todo view. | ||
9 | Added columns for start date/time in todo view. | ||
10 | |||
3 | ********** VERSION 1.9.15 ************ | 11 | ********** VERSION 1.9.15 ************ |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a46cd87..7ddbe23 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -268,2 +268,3 @@ void CalendarView::init() | |||
268 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 268 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
269 | mTodoList->setNavigator( mNavigator ); | ||
269 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 270 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
@@ -313,2 +314,3 @@ void CalendarView::init() | |||
313 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); | 314 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); |
315 | mTodoList->setNavigator( mNavigator ); | ||
314 | 316 | ||
@@ -2146,2 +2148,4 @@ void CalendarView::updateView() | |||
2146 | updateView( tmpList.first(), tmpList.last() ); | 2148 | updateView( tmpList.first(), tmpList.last() ); |
2149 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | ||
2150 | mTodoList->updateView(); | ||
2147 | } | 2151 | } |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 46184ac..6965ba7 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -500,3 +500,3 @@ void KOAgendaItem::computeText() | |||
500 | } else { | 500 | } else { |
501 | if ( !(mIncidence->doesFloat())) | 501 | if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda) |
502 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + "-" + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; | 502 | mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + "-" + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ; |
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index db7c3f2..c99c0cb 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp | |||
@@ -193,3 +193,3 @@ void KODialogManager::showSearchDialog() | |||
193 | #ifndef DESKTOP_VERSION | 193 | #ifndef DESKTOP_VERSION |
194 | mSearchDialog->setMaximumSize( 640, 480 ); | 194 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
195 | //mSearchDialog->setGeometry( 40,40, 400, 300); | 195 | //mSearchDialog->setGeometry( 40,40, 400, 300); |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 1cdb2fb..aae4692 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -112,2 +112,4 @@ KOPrefs::KOPrefs() : | |||
112 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 112 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
113 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | ||
114 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | ||
113 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 115 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index f2fe77a..69722a1 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -192,2 +192,4 @@ class KOPrefs : public KPimPrefs | |||
192 | bool mShowTodoInAgenda; | 192 | bool mShowTodoInAgenda; |
193 | bool mShowTimeInAgenda; | ||
194 | bool mHideNonStartedTodos; | ||
193 | 195 | ||
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 578c0e9..8aa24ee 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp | |||
@@ -95,2 +95,5 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | |||
95 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
96 | |||
97 | if ( QApplication::desktop()->height() == 480 ) | ||
98 | hideButtons(); | ||
96 | } | 99 | } |
@@ -602,2 +605,7 @@ void KOPrefsDialog::setupViewsTab() | |||
602 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 605 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
606 | |||
607 | dummy = | ||
608 | addWidBool(i18n("Show time in agenda items"), | ||
609 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | ||
610 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
603 | 611 | ||
@@ -835,2 +843,7 @@ void KOPrefsDialog::setupViewsTab() | |||
835 | ii = 0; | 843 | ii = 0; |
844 | dummy = | ||
845 | addWidBool(i18n("Hide not running Todos in To-do view"), | ||
846 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | ||
847 | topLayout->addWidget(dummy->checkBox(),ii++,0); | ||
848 | |||
836 | 849 | ||
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 9cafc60..5d7b066 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -334,2 +334,3 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
334 | { | 334 | { |
335 | mNavigator = 0; | ||
335 | QBoxLayout *topLayout = new QVBoxLayout(this); | 336 | QBoxLayout *topLayout = new QVBoxLayout(this); |
@@ -354,3 +355,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
354 | mTodoListView->addColumn(i18n("Complete")); | 355 | mTodoListView->addColumn(i18n("Complete")); |
355 | mTodoListView->setColumnAlignment(2,AlignHCenter); | 356 | mTodoListView->setColumnAlignment(2,AlignCenter); |
357 | |||
356 | mTodoListView->addColumn(i18n("Due Date")); | 358 | mTodoListView->addColumn(i18n("Due Date")); |
@@ -359,2 +361,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
359 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 361 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
362 | |||
363 | mTodoListView->addColumn(i18n("Start Date")); | ||
364 | mTodoListView->setColumnAlignment(5,AlignLeft); | ||
365 | mTodoListView->addColumn(i18n("Start Time")); | ||
366 | mTodoListView->setColumnAlignment(6,AlignHCenter); | ||
367 | |||
360 | mTodoListView->addColumn(i18n("Cancelled")); | 368 | mTodoListView->addColumn(i18n("Cancelled")); |
@@ -377,6 +385,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
377 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 385 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
378 | mTodoListView->setColumnAlignment( 2, AlignCenter ); | 386 | mTodoListView->setColumnWidthMode(7, QListView::Manual); |
379 | #if 0 | 387 | mTodoListView->setColumnWidthMode(8, QListView::Manual); |
380 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 388 | |
381 | #endif | ||
382 | 389 | ||
@@ -430,2 +437,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
430 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 437 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
438 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | ||
439 | this, SLOT( toggleRunning() ),0, 35 ); | ||
431 | 440 | ||
@@ -440,2 +449,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
440 | this, SLOT( toggleQuickTodo() ),0,4 ); | 449 | this, SLOT( toggleQuickTodo() ),0,4 ); |
450 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | ||
451 | this, SLOT( toggleRunning() ),0,5 ); | ||
441 | mDocPrefs = new DocPrefs( name ); | 452 | mDocPrefs = new DocPrefs( name ); |
@@ -444,2 +455,14 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
444 | mItemPopupMenu->setCheckable( true ); | 455 | mItemPopupMenu->setCheckable( true ); |
456 | |||
457 | |||
458 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | ||
459 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | ||
460 | |||
461 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | ||
462 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | ||
463 | |||
464 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | ||
465 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | ||
466 | |||
467 | |||
445 | // Double clicking conflicts with opening/closing the subtree | 468 | // Double clicking conflicts with opening/closing the subtree |
@@ -478,7 +501,2 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
478 | SLOT( addQuickTodo() ) ); | 501 | SLOT( addQuickTodo() ) ); |
479 | // if ( QApplication::desktop()->width() < 480 ) { | ||
480 | // setNarrow(); | ||
481 | // mTodoListView->setColumnWidth( 0, 100 ); | ||
482 | |||
483 | // } | ||
484 | 502 | ||
@@ -499,12 +517,2 @@ void KOTodoView::jumpToDate () | |||
499 | 517 | ||
500 | void KOTodoView::setNarrow() | ||
501 | { | ||
502 | //mTodoListView->setColumnWidth( 0, 120 ); | ||
503 | mTodoListView->setColumnWidth( 1, 35 ); | ||
504 | mTodoListView->setColumnWidth( 2, 40 ); | ||
505 | mTodoListView->setColumnWidth( 3, 80 ); | ||
506 | mTodoListView->setColumnWidth( 4, 40 ); | ||
507 | mTodoListView->setColumnWidth( 5, 90 ); | ||
508 | |||
509 | } | ||
510 | void KOTodoView::updateView() | 518 | void KOTodoView::updateView() |
@@ -589,3 +597,3 @@ void KOTodoView::updateView() | |||
589 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 597 | for(todo = todoList.first(); todo; todo = todoList.next()) { |
590 | if (!mTodoMap.contains(todo) && ( KOPrefs::instance()->mShowCompletedTodo || !todo->isCompleted() ) ) | 598 | if (!mTodoMap.contains(todo) && checkTodo( todo ) ) |
591 | { | 599 | { |
@@ -603,2 +611,18 @@ void KOTodoView::updateView() | |||
603 | 611 | ||
612 | bool KOTodoView::checkTodo( Todo * todo ) | ||
613 | { | ||
614 | |||
615 | if ( !KOPrefs::instance()->mShowCompletedTodo && todo->isCompleted() ) | ||
616 | return false; | ||
617 | if ( KOPrefs::instance()->mHideNonStartedTodos && mNavigator ) { | ||
618 | if ( todo->hasStartDate() ) | ||
619 | if ( mNavigator->selectedDates().last() < todo->dtStart().date() ) | ||
620 | return false; | ||
621 | if ( todo->hasDueDate() ) | ||
622 | if ( mNavigator->selectedDates().first() > todo->dtDue().date() ) | ||
623 | return false; | ||
624 | } | ||
625 | return true; | ||
626 | } | ||
627 | |||
604 | void KOTodoView::restoreItemState( QListViewItem *item ) | 628 | void KOTodoView::restoreItemState( QListViewItem *item ) |
@@ -618,2 +642,3 @@ QMap<Todo *,KOTodoViewItem *>::ConstIterator | |||
618 | { | 642 | { |
643 | |||
619 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; | 644 | // kdDebug() << "KOTodoView::insertTodoItem(): " << todo->getSummary() << endl; |
@@ -720,3 +745,3 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) | |||
720 | break; | 745 | break; |
721 | case 6: | 746 | case 8: |
722 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 747 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
@@ -997,2 +1022,11 @@ void KOTodoView::toggleQuickTodo() | |||
997 | } | 1022 | } |
1023 | |||
1024 | void KOTodoView::toggleRunning() | ||
1025 | { | ||
1026 | KOPrefs::instance()->mHideNonStartedTodos = !KOPrefs::instance()->mHideNonStartedTodos; | ||
1027 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | ||
1028 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | ||
1029 | updateView(); | ||
1030 | } | ||
1031 | |||
998 | void KOTodoView::toggleCompleted() | 1032 | void KOTodoView::toggleCompleted() |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 0c08677..5ca0362 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -45,2 +45,3 @@ | |||
45 | #include "koglobals.h" | 45 | #include "koglobals.h" |
46 | #include "datenavigator.h" | ||
46 | 47 | ||
@@ -120,3 +121,2 @@ class KOTodoView : public KOrg::BaseView | |||
120 | int currentDateCount() { return 0; } | 121 | int currentDateCount() { return 0; } |
121 | void setNarrow(); | ||
122 | 122 | ||
@@ -130,2 +130,3 @@ class KOTodoView : public KOrg::BaseView | |||
130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | 130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); |
131 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} | ||
131 | 132 | ||
@@ -164,2 +165,3 @@ class KOTodoView : public KOrg::BaseView | |||
164 | void toggleCompleted(); | 165 | void toggleCompleted(); |
166 | void toggleRunning(); | ||
165 | void toggleQuickTodo(); | 167 | void toggleQuickTodo(); |
@@ -209,2 +211,4 @@ class KOTodoView : public KOrg::BaseView | |||
209 | 211 | ||
212 | bool checkTodo( Todo * ); | ||
213 | |||
210 | KOTodoListView *mTodoListView; | 214 | KOTodoListView *mTodoListView; |
@@ -231,2 +235,3 @@ class KOTodoView : public KOrg::BaseView | |||
231 | KOTodoViewItem * pendingSubtodo; | 235 | KOTodoViewItem * pendingSubtodo; |
236 | DateNavigator* mNavigator; | ||
232 | }; | 237 | }; |
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp index ae0b334..347d982 100644 --- a/korganizer/kotodoviewitem.cpp +++ b/korganizer/kotodoviewitem.cpp | |||
@@ -81,2 +81,4 @@ void KOTodoViewItem::construct() | |||
81 | QString keyt = "=="; | 81 | QString keyt = "=="; |
82 | QString skeyd = "=="; | ||
83 | QString skeyt = "=="; | ||
82 | 84 | ||
@@ -98,3 +100,3 @@ void KOTodoViewItem::construct() | |||
98 | keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 100 | keyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
99 | setSortKey(3,keyd); | 101 | // setSortKey(3,keyd); |
100 | if (mTodo->doesFloat()) { | 102 | if (mTodo->doesFloat()) { |
@@ -106,3 +108,3 @@ void KOTodoViewItem::construct() | |||
106 | keyt.sprintf("%02d%02d",t.hour(),t.minute()); | 108 | keyt.sprintf("%02d%02d",t.hour(),t.minute()); |
107 | setSortKey(4,keyt); | 109 | //setSortKey(4,keyt); |
108 | } | 110 | } |
@@ -118,4 +120,27 @@ void KOTodoViewItem::construct() | |||
118 | 120 | ||
119 | setText(5,mTodo->cancelled() ? i18n("Yes") : i18n("No")); | 121 | |
120 | setText(6,mTodo->categoriesStr()); | 122 | |
123 | if (mTodo->hasStartDate()) { | ||
124 | setText(5, mTodo->dtStartDateStr()); | ||
125 | QDate d = mTodo->dtStart().date(); | ||
126 | skeyd.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | ||
127 | |||
128 | if (mTodo->doesFloat()) { | ||
129 | setText(6,""); | ||
130 | } | ||
131 | else { | ||
132 | setText(6,mTodo->dtStartTimeStr()); | ||
133 | QTime t = mTodo->dtStart().time(); | ||
134 | skeyt.sprintf("%02d%02d",t.hour(),t.minute()); | ||
135 | |||
136 | } | ||
137 | } else { | ||
138 | setText(5,""); | ||
139 | setText(6,""); | ||
140 | } | ||
141 | setSortKey(5,skeyd); | ||
142 | setSortKey(6,skeyt); | ||
143 | |||
144 | setText(7,mTodo->cancelled() ? i18n("Yes") : i18n("No")); | ||
145 | setText(8,mTodo->categoriesStr()); | ||
121 | 146 | ||
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 6e151f9..b2dd266 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -511,2 +511,3 @@ void KOViewManager::showTodoView() | |||
511 | mTodoView->restoreLayout(config,"Todo View"); | 511 | mTodoView->restoreLayout(config,"Todo View"); |
512 | mTodoView->setNavigator( mMainView->dateNavigator() ); | ||
512 | } | 513 | } |
@@ -1 +1 @@ | |||
version = "1.9.15"; | version = "1.9.16"; | ||