summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt5
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/koeventviewer.cpp26
-rw-r--r--korganizer/koeventviewer.h1
-rw-r--r--korganizer/koeventviewerdialog.cpp1
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/kotodoview.cpp53
-rw-r--r--korganizer/kotodoview.h6
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,6 +1,11 @@
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.
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
@@ -1207,10 +1207,10 @@
{ "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." },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 72221fd..1785b8a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3348,8 +3348,9 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog()
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;
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index f6c252b..2d0bfff 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -109,8 +109,18 @@ void KOEventViewer::printMe()
}
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 );
@@ -529,16 +539,28 @@ 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();
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 ) {
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 1eeb8d1..64eb4ff 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -125,7 +125,8 @@ class KOEventViewer : public QTextBrowser {
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
@@ -50,8 +50,9 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
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() ");
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 29fee49..71696f4 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -53,8 +53,9 @@ class KOEventViewerDialog : public KDialogBase {
void updateConfig();
void print();
void setMyFocus();
signals:
+ void showIncidence( QString );
void editIncidence( Incidence* );
void jumpToTime( const QDate &);
void showAgendaView( bool );
void todoCompleted(Todo*);
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index e2966f8..4f42c83 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -566,11 +566,23 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
}
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,
@@ -584,8 +596,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
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();
@@ -1052,9 +1066,11 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
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());
@@ -1163,27 +1179,40 @@ void KOTodoView::setNewPercentage(int index)
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 ()) {
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 9ae7f53..79cc756 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -171,10 +171,8 @@ class KOTodoView : public KOrg::BaseView
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(); }
@@ -224,8 +222,11 @@ class KOTodoView : public KOrg::BaseView
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 *);
@@ -278,8 +279,9 @@ class KOTodoView : public KOrg::BaseView
QPopupMenu *mPopupMenu;
QPopupMenu *mPriorityPopupMenu;
QPopupMenu *mPercentageCompletedPopupMenu;
QPopupMenu *mCategoryPopupMenu;
+ QPopupMenu *mCalPopupMenu;
QMap<int, int> mPercentage;
QMap<int, int> mPriority;
QMap<int, QString> mCategory;