summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-03 15:58:48 (UTC)
committer zautrix <zautrix>2005-07-03 15:58:48 (UTC)
commit9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (side-by-side diff)
tree4e5e6a4e6eac36df79891d61ed1d1cd76ed6105d
parent0c632bafd2d058504118dc8957fc4808a784f548 (diff)
downloadkdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.zip
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.gz
kdepimpi-9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e.tar.bz2
fixes
Diffstat (more/less context) (ignore 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,5 +1,10 @@
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:
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
@@ -1208,8 +1208,8 @@
{ "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!" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 72221fd..1785b8a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3349,6 +3349,7 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog()
this, SLOT( slotViewerClosed() ) );
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
@@ -110,6 +110,16 @@ 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
{
@@ -530,14 +540,26 @@ 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>";
}
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index 1eeb8d1..64eb4ff 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -126,6 +126,7 @@ class KOEventViewer : public QTextBrowser {
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
@@ -51,6 +51,7 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name)
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();
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 29fee49..71696f4 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -54,6 +54,7 @@ class KOEventViewerDialog : public KDialogBase {
void print();
void setMyFocus();
signals:
+ void showIncidence( QString );
void editIncidence( Incidence* );
void jumpToTime( const QDate &);
void showAgendaView( bool );
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index e2966f8..4f42c83 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -567,9 +567,21 @@ 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()));
@@ -585,6 +597,8 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
#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()));
@@ -1053,7 +1067,9 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column)
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());
}
@@ -1164,17 +1180,11 @@ 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 ();
++it) {
@@ -1182,7 +1192,26 @@ QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem)
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)
{
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 9ae7f53..79cc756 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -172,8 +172,6 @@ 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);
void clearList() {mTodoListView->clear(); }
@@ -225,6 +223,9 @@ class KOTodoView : public KOrg::BaseView
void modified(bool);
void itemDoubleClicked(QListViewItem *item);
void resetFocusToList();
+ void fillCategories ();
+ void fillCal ();
+ void changedCal (int);
signals:
void newTodoSignal();
@@ -279,6 +280,7 @@ class KOTodoView : public KOrg::BaseView
QPopupMenu *mPriorityPopupMenu;
QPopupMenu *mPercentageCompletedPopupMenu;
QPopupMenu *mCategoryPopupMenu;
+ QPopupMenu *mCalPopupMenu;
QMap<int, int> mPercentage;
QMap<int, int> mPriority;