author | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
commit | 9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (side-by-side diff) | |
tree | 4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d | |
parent | 0c632bafd2d058504118dc8957fc4808a784f548 (diff) | |
download | kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2 |
fixes
-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 @@ -1,4 +1,9 @@ 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 @@ -1209,6 +1209,6 @@ { "Save as Journal template","Speichere als Journal Vorlage" }, { "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" }, { " completed"," erledigt" }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 72221fd..1785b8a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3350,4 +3350,5 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), 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 @@ -111,4 +111,14 @@ 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" ) #ifdef DESKTOP_VERSION @@ -531,5 +541,13 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) if ( event->relatedTo() ) { 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>"); } QPtrList<Incidence> Relations = event->relations(); @@ -538,5 +556,9 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) addTag("b",i18n("Sub todos:<br>")); 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 @@ -127,4 +127,5 @@ class KOEventViewer : public QTextBrowser { signals: 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 @@ -52,4 +52,5 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) QObject::connect(this,SIGNAL(user1Clicked()), SLOT(showIncidence())); + connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) )); mIncidence = 0; // TODO: Set a sensible size (based on the content?). diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 29fee49..71696f4 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -55,4 +55,5 @@ class KOEventViewerDialog : public KDialogBase { void setMyFocus(); signals: + void showIncidence( QString ); void editIncidence( Incidence* ); void jumpToTime( const QDate &); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e2966f8..4f42c83 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -568,7 +568,19 @@ 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())); mItemPopupMenu->insertItem(i18n("Edit..."), this, @@ -586,4 +598,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, SLOT (cancelTodo())); + mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu); + mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu); mItemPopupMenu->insertSeparator(); mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, @@ -1054,5 +1068,7 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) break; case 8: - getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; + mCategoryPopupMenu->popup(QCursor::pos ()); break; + case 9: + mCalPopupMenu->popup(QCursor::pos ()); break; default: mItemPopupMenu->popup(QCursor::pos()); @@ -1165,15 +1181,9 @@ 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 (); it != KOPrefs::instance()->mCustomCategories.end (); @@ -1183,5 +1193,24 @@ QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true); } - 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(); } void KOTodoView::changedCategories(int index) diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9ae7f53..79cc756 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -173,6 +173,4 @@ class KOTodoView : public KOrg::BaseView void saveLayout(KConfig *config, const QString &group) const; void restoreLayout(KConfig *config, const QString &group); - /** Create a popup menu to set categories */ - QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); void setNavigator( DateNavigator* nav ) {mNavigator = nav;} QString getWhatsThisText(QPoint p); @@ -226,4 +224,7 @@ class KOTodoView : public KOrg::BaseView void itemDoubleClicked(QListViewItem *item); void resetFocusToList(); + void fillCategories (); + void fillCal (); + void changedCal (int); signals: @@ -280,4 +281,5 @@ class KOTodoView : public KOrg::BaseView QPopupMenu *mPercentageCompletedPopupMenu; QPopupMenu *mCategoryPopupMenu; + QPopupMenu *mCalPopupMenu; QMap<int, int> mPercentage; |