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,8 +1,13 @@ 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 ************ KO/Pi: Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. Fixed a problem with the month view when file was saved but KO/Pi was not the active window. Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). 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 @@ -1205,14 +1205,14 @@ { " on"," am" }, { " completed on "," erledigt am " }, { "Save as Event template","Speichere als Vorlage" }, { "Load Event template","Lade Termin Vorlage" }, { "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" }, { "(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!","(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi basiert auf KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) und das KDE Team.\nKOrganizer/Pi ist lizensiert unter der GPL.\nKO/Pi kann kompiliert werden für\nLinux, Zaurus-PDA und Windows\nwww.pi-sync.info --- www.korganizer.org\nBesonderen Dank an Michael und Ben\nfür intensives Testen!" }, { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 72221fd..1785b8a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3346,12 +3346,13 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), viewManager(), SLOT( showAgendaView( bool ) ) ); connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), this, SLOT( slotViewerClosed() ) ); connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), this, SLOT( todoChanged(Todo *) ) ); + connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); mEventViewerDialog->resize( 640, 480 ); } return mEventViewerDialog; } void CalendarView::showEvent(Event *event) diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c252b..2d0bfff 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -107,12 +107,22 @@ void KOEventViewer::printMe() #endif } 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 { KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); KABC::AddressBook::Iterator it; for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { @@ -527,20 +537,32 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) addTag("p",i18n("<b>Last modified: ") +" </b>"); addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); } } 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(); Incidence *to; if ( Relations.first() ) 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>"; } if ( KOPrefs::instance()->mEVshowDetails ) { if (!event->description().isEmpty()) { addTag("p",i18n("<b>Details: </b>")); diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 1eeb8d1..64eb4ff 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h @@ -123,9 +123,10 @@ class KOEventViewer : public QTextBrowser { QString mText; QString mMailSubject; Incidence* mCurrentIncidence; signals: void launchaddressbook(QString uid); + void showIncidence(QString uid); }; #endif diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 02f13c7..0763825 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -48,12 +48,13 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) setButtonText(Ok, i18n("Edit") ); QObject::connect(findButton( Ok ),SIGNAL(clicked()), SLOT(editIncidence())); 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?). //showMaximized(); //qDebug("++++++++++++KOEventViewerDialog() "); // if ( KOPrefs::instance()->mCompactDialogs ) { // setFixedSize( 240,284 ); diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 29fee49..71696f4 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h @@ -51,12 +51,13 @@ class KOEventViewerDialog : public KDialogBase { int executeS( bool ); public slots: void updateConfig(); void print(); void setMyFocus(); signals: + void showIncidence( QString ); void editIncidence( Incidence* ); void jumpToTime( const QDate &); void showAgendaView( bool ); void todoCompleted(Todo*); void signalViewerClosed(); private slots: diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e2966f8..4f42c83 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -564,15 +564,27 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : QString label = QString ("%1 %").arg (i); mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; } connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); + 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, SLOT (editTodo())); mItemPopupMenu->insertItem( i18n("Delete"), this, SLOT (deleteTodo())); mItemPopupMenu->insertItem( i18n("Clone..."), this, @@ -582,12 +594,14 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : #ifndef DESKTOP_VERSION mItemPopupMenu->insertItem( i18n("Beam..."), this, SLOT (beamTodo())); #endif 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, SLOT (toggleRunningItem())); mItemPopupMenu->insertSeparator(); /* mItemPopupMenu->insertItem( i18n("New Todo..."), this, @@ -1050,13 +1064,15 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) case 2: mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; case 3: moveTodo(); 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()); } } else mPopupMenu->popup(QCursor::pos()); } void KOTodoView::newTodo() @@ -1161,31 +1177,44 @@ void KOTodoView::setNewPercentage(int index) mActiveItem->construct(); todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); } } - -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 (); ++it) { int index = mCategoryPopupMenu->insertItem (*it); mCategory[index] = *it; 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) { if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { QStringList categories = mActiveItem->todo()->categories (); QString colcat = categories.first(); diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9ae7f53..79cc756 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h @@ -169,14 +169,12 @@ class KOTodoView : public KOrg::BaseView void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); void setDocumentId( const QString & ); 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); void clearList() {mTodoListView->clear(); } public slots: void updateView(); @@ -222,12 +220,15 @@ class KOTodoView : public KOrg::BaseView void itemClicked(QListViewItem *); void itemStateChanged(QListViewItem *); void modified(bool); void itemDoubleClicked(QListViewItem *item); void resetFocusToList(); + void fillCategories (); + void fillCal (); + void changedCal (int); signals: void newTodoSignal(); void newSubTodoSignal(Todo *); void unparentTodoSignal(Todo *); void reparentTodoSignal( Todo *,Todo * ); @@ -276,12 +277,13 @@ class KOTodoView : public KOrg::BaseView KOTodoListView *mTodoListView; QPopupMenu *mItemPopupMenu; QPopupMenu *mPopupMenu; QPopupMenu *mPriorityPopupMenu; QPopupMenu *mPercentageCompletedPopupMenu; QPopupMenu *mCategoryPopupMenu; + QPopupMenu *mCalPopupMenu; QMap<int, int> mPercentage; QMap<int, int> mPriority; QMap<int, QString> mCategory; KOTodoViewItem *mActiveItem; |