-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 26 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 1 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 1 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 53 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 6 |
9 files changed, 80 insertions, 18 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 30bb856..71d7208 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -2,2 +2,7 @@ Info about the changes in new versions of KDE-Pim/Pi +********** VERSION 2.1.13 ************ + +Fixed a problem in KA/Pi search. + + ********** VERSION 2.1.12 ************ diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index d7954c6..bc5cbb7 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1210,4 +1210,4 @@ { "Insert Journal template","Füge Journal Vorlage ein" }, -{ "Sub todos:<br>","Unter Todos:<br>" }, -{ "Parent todo:<br>","Über Todo:<br>" }, +{ "Sub todos:<br>","Unter-Todos:<br>" }, +{ "Parent todo:<br>","Über-Todo:<br>" }, { "Set current as color category","Setze Gewählte als Farbkategorie" }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 72221fd..1785b8a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3351,2 +3351,3 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() this, SLOT( todoChanged(Todo *) ) ); + connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); mEventViewerDialog->resize( 640, 480 ); diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c252b..2d0bfff 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -112,2 +112,12 @@ void KOEventViewer::setSource(const QString& n) + if ( n.left(8) == "todo_uid" ) { + int midstr = 9; +#ifdef DESKTOP_VERSION + midstr = 11; +#endif + qDebug("-%s- ", n.mid(midstr).latin1()); + emit showIncidence( n.mid(midstr) ); + return; + } + if ( n.left(3) == "uid" ) @@ -532,3 +542,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) addTag("b",i18n("Parent todo:<br>")); - mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); + + QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary()); + + mText += t_name; + mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">"; + mText += deTag(event->relatedTo()->summary()); + mText += "</a><br>"; + + // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); } @@ -539,3 +557,7 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) for (to=Relations.first();to;to=Relations.next()) { - mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); + QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary()); + mText += t_name; + mText += "<a href=\"todo_uid:" + to->uid() + "\">"; + mText += deTag(to->summary()); + mText += "</a><br>"; diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 1eeb8d1..64eb4ff 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h @@ -128,2 +128,3 @@ class KOEventViewer : public QTextBrowser { void launchaddressbook(QString uid); + void showIncidence(QString uid); }; diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 02f13c7..0763825 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -53,2 +53,3 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) SLOT(showIncidence())); + connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) )); mIncidence = 0; diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 29fee49..71696f4 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -56,2 +56,3 @@ class KOEventViewerDialog : public KDialogBase { signals: + void showIncidence( QString ); void editIncidence( Incidence* ); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e2966f8..4f42c83 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -569,5 +569,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : + mCategoryPopupMenu = new QPopupMenu (this); + mCategoryPopupMenu->setCheckable (true); + connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); + connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); + + mCalPopupMenu = new QPopupMenu (this); + mCalPopupMenu->setCheckable (true); + connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); + connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); + + + mItemPopupMenu = new QPopupMenu(this); - mItemPopupMenu->insertItem(i18n("Show..."), this, + mItemPopupMenu->insertItem(i18n("Show"), this, SLOT (showTodo())); @@ -587,2 +599,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : SLOT (cancelTodo())); + mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu); + mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu); mItemPopupMenu->insertSeparator(); @@ -1055,3 +1069,5 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) case 8: - getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; + mCategoryPopupMenu->popup(QCursor::pos ()); break; + case 9: + mCalPopupMenu->popup(QCursor::pos ()); break; default: @@ -1166,13 +1182,7 @@ void KOTodoView::setNewPercentage(int index) - -QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) +void KOTodoView::fillCategories () { - if ( !mCategoryPopupMenu ) { - mCategoryPopupMenu = new QPopupMenu (this); - mCategoryPopupMenu->setCheckable (true); - connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); - } mCategoryPopupMenu->clear(); - QStringList checkedCategories = todoItem->todo()->categories (); - + if ( ! mActiveItem ) return; + QStringList checkedCategories = mActiveItem->todo()->categories (); for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); @@ -1184,3 +1194,22 @@ QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) } - return mCategoryPopupMenu; +} +void KOTodoView::fillCal () +{ + mCalPopupMenu->clear(); + if (!mActiveItem) return; + bool readO = mActiveItem->todo()->isReadOnly(); + KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); + while ( kkf ) { + int index = mCalPopupMenu->insertItem( kkf->mName, kkf->mCalNumber); + if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO ) + mCalPopupMenu->setItemEnabled( index, false ); + mCalPopupMenu->setItemChecked (index, kkf->mCalNumber == mActiveItem->todo()->calID()); + kkf = KOPrefs::instance()->mCalendars.next(); + } +} +void KOTodoView::changedCal (int index ) +{ + if (!mActiveItem) return; + mActiveItem->todo()->setCalID( index ); + mActiveItem->construct(); } diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9ae7f53..79cc756 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -174,4 +174,2 @@ class KOTodoView : public KOrg::BaseView void restoreLayout(KConfig *config, const QString &group); - /** Create a popup menu to set categories */ - QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); void setNavigator( DateNavigator* nav ) {mNavigator = nav;} @@ -227,2 +225,5 @@ class KOTodoView : public KOrg::BaseView void resetFocusToList(); + void fillCategories (); + void fillCal (); + void changedCal (int); @@ -281,2 +282,3 @@ class KOTodoView : public KOrg::BaseView QPopupMenu *mCategoryPopupMenu; + QPopupMenu *mCalPopupMenu; |