author | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 15:58:48 (UTC) |
commit | 9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (patch) (unidiff) | |
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,10 +1,15 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.13 ************ | ||
4 | |||
5 | Fixed a problem in KA/Pi search. | ||
6 | |||
7 | |||
3 | ********** VERSION 2.1.12 ************ | 8 | ********** VERSION 2.1.12 ************ |
4 | 9 | ||
5 | KO/Pi: | 10 | KO/Pi: |
6 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. | 11 | Many small usability fixes, e.g. rearranged the popup menus such that they are better to use on the Zaurus. |
7 | Fixed a problem with the month view when file was saved but KO/Pi was not the active window. | 12 | Fixed a problem with the month view when file was saved but KO/Pi was not the active window. |
8 | Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). | 13 | Fixed some problems in the resource config dialog (e.g. added a warning if you set all calendars to read-only). |
9 | Fixed some other small problems. | 14 | Fixed some other small problems. |
10 | 15 | ||
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 | |||
@@ -1203,18 +1203,18 @@ | |||
1203 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, | 1203 | { "Week view mode uses bigger font","Wochenansicht Modus nutzt größeren Font" }, |
1204 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, | 1204 | { "Set reminder ON with offset to:","Alarm AN mit Offset auf:" }, |
1205 | { " on"," am" }, | 1205 | { " on"," am" }, |
1206 | { " completed on "," erledigt am " }, | 1206 | { " completed on "," erledigt am " }, |
1207 | { "Save as Event template","Speichere als Vorlage" }, | 1207 | { "Save as Event template","Speichere als Vorlage" }, |
1208 | { "Load Event template","Lade Termin Vorlage" }, | 1208 | { "Load Event template","Lade Termin Vorlage" }, |
1209 | { "Save as Journal template","Speichere als Journal Vorlage" }, | 1209 | { "Save as Journal template","Speichere als Journal Vorlage" }, |
1210 | { "Insert Journal template","Füge Journal Vorlage ein" }, | 1210 | { "Insert Journal template","Füge Journal Vorlage ein" }, |
1211 | { "Sub todos:<br>","Unter Todos:<br>" }, | 1211 | { "Sub todos:<br>","Unter-Todos:<br>" }, |
1212 | { "Parent todo:<br>","Über Todo:<br>" }, | 1212 | { "Parent todo:<br>","Über-Todo:<br>" }, |
1213 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, | 1213 | { "Set current as color category","Setze Gewählte als Farbkategorie" }, |
1214 | { " completed"," erledigt" }, | 1214 | { " completed"," erledigt" }, |
1215 | { "(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!" }, | 1215 | { "(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!" }, |
1216 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, | 1216 | { "Syncing aborted. Nothing synced.","Syncing abgebrochen.Nichts wurde gesynct." }, |
1217 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, | 1217 | { "Connected! Sending request for remote file ...","Verbunden! Sende Daten Anfrage..." }, |
1218 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, | 1218 | { "Trying to connect to remote...","Versuche mit Gegenstelle zu verbinden..." }, |
1219 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, | 1219 | { "Connection to remote\nhost timed out!\nDid you forgot to enable\nsyncing on remote host?","Verbindungsversuch wegen\nZeitüberschreitung gescheitert!\nWurde vergessen Pi-Sync auf\nder Gegenstelle anzuschalten?" }, |
1220 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, | 1220 | { "ERROR: Receiving remote file failed.","FEHLER: Empfang der entfernten Daten fehlgeschlagen." }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 72221fd..1785b8a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3344,16 +3344,17 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() | |||
3344 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 3344 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
3345 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 3345 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
3346 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 3346 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
3347 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 3347 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
3348 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | 3348 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), |
3349 | this, SLOT( slotViewerClosed() ) ); | 3349 | this, SLOT( slotViewerClosed() ) ); |
3350 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 3350 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
3351 | this, SLOT( todoChanged(Todo *) ) ); | 3351 | this, SLOT( todoChanged(Todo *) ) ); |
3352 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | ||
3352 | mEventViewerDialog->resize( 640, 480 ); | 3353 | mEventViewerDialog->resize( 640, 480 ); |
3353 | 3354 | ||
3354 | } | 3355 | } |
3355 | return mEventViewerDialog; | 3356 | return mEventViewerDialog; |
3356 | } | 3357 | } |
3357 | void CalendarView::showEvent(Event *event) | 3358 | void CalendarView::showEvent(Event *event) |
3358 | { | 3359 | { |
3359 | getEventViewerDialog()->setEvent(event); | 3360 | getEventViewerDialog()->setEvent(event); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c252b..2d0bfff 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -105,16 +105,26 @@ void KOEventViewer::printMe() | |||
105 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); | 105 | drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); |
106 | p.end(); | 106 | p.end(); |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | } | 109 | } |
110 | void KOEventViewer::setSource(const QString& n) | 110 | void KOEventViewer::setSource(const QString& n) |
111 | { | 111 | { |
112 | 112 | ||
113 | if ( n.left(8) == "todo_uid" ) { | ||
114 | int midstr = 9; | ||
115 | #ifdef DESKTOP_VERSION | ||
116 | midstr = 11; | ||
117 | #endif | ||
118 | qDebug("-%s- ", n.mid(midstr).latin1()); | ||
119 | emit showIncidence( n.mid(midstr) ); | ||
120 | return; | ||
121 | } | ||
122 | |||
113 | if ( n.left(3) == "uid" ) | 123 | if ( n.left(3) == "uid" ) |
114 | #ifdef DESKTOP_VERSION | 124 | #ifdef DESKTOP_VERSION |
115 | { | 125 | { |
116 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); | 126 | KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); |
117 | KABC::AddressBook::Iterator it; | 127 | KABC::AddressBook::Iterator it; |
118 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { | 128 | for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { |
119 | // LR I do not understand, why the uid string is different on zaurus and desktop | 129 | // LR I do not understand, why the uid string is different on zaurus and desktop |
120 | QString uid = "uid://"+(*it).uid(); | 130 | QString uid = "uid://"+(*it).uid(); |
@@ -525,24 +535,36 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
525 | 535 | ||
526 | } else { | 536 | } else { |
527 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | 537 | addTag("p",i18n("<b>Last modified: ") +" </b>"); |
528 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | 538 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); |
529 | } | 539 | } |
530 | } | 540 | } |
531 | if ( event->relatedTo() ) { | 541 | if ( event->relatedTo() ) { |
532 | addTag("b",i18n("Parent todo:<br>")); | 542 | addTag("b",i18n("Parent todo:<br>")); |
533 | mText.append(deTag(event->relatedTo()->summary())+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 543 | |
544 | QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary()); | ||
545 | |||
546 | mText += t_name; | ||
547 | mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">"; | ||
548 | mText += deTag(event->relatedTo()->summary()); | ||
549 | mText += "</a><br>"; | ||
550 | |||
551 | // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); | ||
534 | } | 552 | } |
535 | QPtrList<Incidence> Relations = event->relations(); | 553 | QPtrList<Incidence> Relations = event->relations(); |
536 | Incidence *to; | 554 | Incidence *to; |
537 | if ( Relations.first() ) | 555 | if ( Relations.first() ) |
538 | addTag("b",i18n("Sub todos:<br>")); | 556 | addTag("b",i18n("Sub todos:<br>")); |
539 | for (to=Relations.first();to;to=Relations.next()) { | 557 | for (to=Relations.first();to;to=Relations.next()) { |
540 | mText.append( deTag(to->summary())+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 558 | QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary()); |
559 | mText += t_name; | ||
560 | mText += "<a href=\"todo_uid:" + to->uid() + "\">"; | ||
561 | mText += deTag(to->summary()); | ||
562 | mText += "</a><br>"; | ||
541 | 563 | ||
542 | } | 564 | } |
543 | 565 | ||
544 | if ( KOPrefs::instance()->mEVshowDetails ) { | 566 | if ( KOPrefs::instance()->mEVshowDetails ) { |
545 | if (!event->description().isEmpty()) { | 567 | if (!event->description().isEmpty()) { |
546 | addTag("p",i18n("<b>Details: </b>")); | 568 | addTag("p",i18n("<b>Details: </b>")); |
547 | addTag("p",deTag(event->description())); | 569 | addTag("p",deTag(event->description())); |
548 | } | 570 | } |
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 1eeb8d1..64eb4ff 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -121,11 +121,12 @@ class KOEventViewer : public QTextBrowser { | |||
121 | bool mSyncMode; | 121 | bool mSyncMode; |
122 | QString deTag(QString text); | 122 | QString deTag(QString text); |
123 | 123 | ||
124 | QString mText; | 124 | QString mText; |
125 | QString mMailSubject; | 125 | QString mMailSubject; |
126 | Incidence* mCurrentIncidence; | 126 | Incidence* mCurrentIncidence; |
127 | signals: | 127 | signals: |
128 | void launchaddressbook(QString uid); | 128 | void launchaddressbook(QString uid); |
129 | void showIncidence(QString uid); | ||
129 | }; | 130 | }; |
130 | 131 | ||
131 | #endif | 132 | #endif |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 02f13c7..0763825 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -46,16 +46,17 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) | |||
46 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); | 46 | mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); |
47 | setMainWidget(mEventViewer); | 47 | setMainWidget(mEventViewer); |
48 | setButtonText(Ok, i18n("Edit") ); | 48 | setButtonText(Ok, i18n("Edit") ); |
49 | 49 | ||
50 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), | 50 | QObject::connect(findButton( Ok ),SIGNAL(clicked()), |
51 | SLOT(editIncidence())); | 51 | SLOT(editIncidence())); |
52 | QObject::connect(this,SIGNAL(user1Clicked()), | 52 | QObject::connect(this,SIGNAL(user1Clicked()), |
53 | SLOT(showIncidence())); | 53 | SLOT(showIncidence())); |
54 | connect( mEventViewer, SIGNAL( showIncidence( QString ) ),SIGNAL( showIncidence( QString ) )); | ||
54 | mIncidence = 0; | 55 | mIncidence = 0; |
55 | // TODO: Set a sensible size (based on the content?). | 56 | // TODO: Set a sensible size (based on the content?). |
56 | //showMaximized(); | 57 | //showMaximized(); |
57 | //qDebug("++++++++++++KOEventViewerDialog() "); | 58 | //qDebug("++++++++++++KOEventViewerDialog() "); |
58 | // if ( KOPrefs::instance()->mCompactDialogs ) { | 59 | // if ( KOPrefs::instance()->mCompactDialogs ) { |
59 | // setFixedSize( 240,284 ); | 60 | // setFixedSize( 240,284 ); |
60 | // move( 0, 15 ); | 61 | // move( 0, 15 ); |
61 | // } else { | 62 | // } else { |
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 29fee49..71696f4 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h | |||
@@ -49,16 +49,17 @@ class KOEventViewerDialog : public KDialogBase { | |||
49 | void setSyncMode( bool ); | 49 | void setSyncMode( bool ); |
50 | void setColorMode( int m ); | 50 | void setColorMode( int m ); |
51 | int executeS( bool ); | 51 | int executeS( bool ); |
52 | public slots: | 52 | public slots: |
53 | void updateConfig(); | 53 | void updateConfig(); |
54 | void print(); | 54 | void print(); |
55 | void setMyFocus(); | 55 | void setMyFocus(); |
56 | signals: | 56 | signals: |
57 | void showIncidence( QString ); | ||
57 | void editIncidence( Incidence* ); | 58 | void editIncidence( Incidence* ); |
58 | void jumpToTime( const QDate &); | 59 | void jumpToTime( const QDate &); |
59 | void showAgendaView( bool ); | 60 | void showAgendaView( bool ); |
60 | void todoCompleted(Todo*); | 61 | void todoCompleted(Todo*); |
61 | void signalViewerClosed(); | 62 | void signalViewerClosed(); |
62 | private slots: | 63 | private slots: |
63 | void slotViewerClosed(); | 64 | void slotViewerClosed(); |
64 | void editIncidence(); | 65 | void editIncidence(); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e2966f8..4f42c83 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -562,34 +562,48 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
562 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 562 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
563 | for (int i = 0; i <= 100; i+=20) { | 563 | for (int i = 0; i <= 100; i+=20) { |
564 | QString label = QString ("%1 %").arg (i); | 564 | QString label = QString ("%1 %").arg (i); |
565 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 565 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
566 | } | 566 | } |
567 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 567 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
568 | 568 | ||
569 | 569 | ||
570 | mCategoryPopupMenu = new QPopupMenu (this); | ||
571 | mCategoryPopupMenu->setCheckable (true); | ||
572 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | ||
573 | connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); | ||
574 | |||
575 | mCalPopupMenu = new QPopupMenu (this); | ||
576 | mCalPopupMenu->setCheckable (true); | ||
577 | connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); | ||
578 | connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); | ||
579 | |||
580 | |||
581 | |||
570 | 582 | ||
571 | mItemPopupMenu = new QPopupMenu(this); | 583 | mItemPopupMenu = new QPopupMenu(this); |
572 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 584 | mItemPopupMenu->insertItem(i18n("Show"), this, |
573 | SLOT (showTodo())); | 585 | SLOT (showTodo())); |
574 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 586 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
575 | SLOT (editTodo())); | 587 | SLOT (editTodo())); |
576 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 588 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
577 | SLOT (deleteTodo())); | 589 | SLOT (deleteTodo())); |
578 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 590 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
579 | SLOT (cloneTodo())); | 591 | SLOT (cloneTodo())); |
580 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 592 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
581 | SLOT (moveTodo())); | 593 | SLOT (moveTodo())); |
582 | #ifndef DESKTOP_VERSION | 594 | #ifndef DESKTOP_VERSION |
583 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 595 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
584 | SLOT (beamTodo())); | 596 | SLOT (beamTodo())); |
585 | #endif | 597 | #endif |
586 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 598 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
587 | SLOT (cancelTodo())); | 599 | SLOT (cancelTodo())); |
600 | mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu); | ||
601 | mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu); | ||
588 | mItemPopupMenu->insertSeparator(); | 602 | mItemPopupMenu->insertSeparator(); |
589 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | 603 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, |
590 | SLOT (toggleRunningItem())); | 604 | SLOT (toggleRunningItem())); |
591 | mItemPopupMenu->insertSeparator(); | 605 | mItemPopupMenu->insertSeparator(); |
592 | /* | 606 | /* |
593 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 607 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
594 | SLOT (newTodo())); | 608 | SLOT (newTodo())); |
595 | */ | 609 | */ |
@@ -1048,17 +1062,19 @@ void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | |||
1048 | case 1: | 1062 | case 1: |
1049 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 1063 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
1050 | case 2: | 1064 | case 2: |
1051 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 1065 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
1052 | case 3: | 1066 | case 3: |
1053 | moveTodo(); | 1067 | moveTodo(); |
1054 | break; | 1068 | break; |
1055 | case 8: | 1069 | case 8: |
1056 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 1070 | mCategoryPopupMenu->popup(QCursor::pos ()); break; |
1071 | case 9: | ||
1072 | mCalPopupMenu->popup(QCursor::pos ()); break; | ||
1057 | default: | 1073 | default: |
1058 | mItemPopupMenu->popup(QCursor::pos()); | 1074 | mItemPopupMenu->popup(QCursor::pos()); |
1059 | } | 1075 | } |
1060 | } else mPopupMenu->popup(QCursor::pos()); | 1076 | } else mPopupMenu->popup(QCursor::pos()); |
1061 | } | 1077 | } |
1062 | void KOTodoView::newTodo() | 1078 | void KOTodoView::newTodo() |
1063 | { | 1079 | { |
1064 | emit newTodoSignal(); | 1080 | emit newTodoSignal(); |
@@ -1159,35 +1175,48 @@ void KOTodoView::setNewPercentage(int index) | |||
1159 | } | 1175 | } |
1160 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 1176 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
1161 | mActiveItem->construct(); | 1177 | mActiveItem->construct(); |
1162 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 1178 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
1163 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 1179 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
1164 | } | 1180 | } |
1165 | } | 1181 | } |
1166 | 1182 | ||
1167 | 1183 | void KOTodoView::fillCategories () | |
1168 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | ||
1169 | { | 1184 | { |
1170 | if ( !mCategoryPopupMenu ) { | ||
1171 | mCategoryPopupMenu = new QPopupMenu (this); | ||
1172 | mCategoryPopupMenu->setCheckable (true); | ||
1173 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | ||
1174 | } | ||
1175 | mCategoryPopupMenu->clear(); | 1185 | mCategoryPopupMenu->clear(); |
1176 | QStringList checkedCategories = todoItem->todo()->categories (); | 1186 | if ( ! mActiveItem ) return; |
1177 | 1187 | QStringList checkedCategories = mActiveItem->todo()->categories (); | |
1178 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 1188 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
1179 | it != KOPrefs::instance()->mCustomCategories.end (); | 1189 | it != KOPrefs::instance()->mCustomCategories.end (); |
1180 | ++it) { | 1190 | ++it) { |
1181 | int index = mCategoryPopupMenu->insertItem (*it); | 1191 | int index = mCategoryPopupMenu->insertItem (*it); |
1182 | mCategory[index] = *it; | 1192 | mCategory[index] = *it; |
1183 | if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true); | 1193 | if (checkedCategories.find (*it) != checkedCategories.end ()) mCategoryPopupMenu->setItemChecked (index, true); |
1184 | } | 1194 | } |
1185 | return mCategoryPopupMenu; | 1195 | } |
1196 | void KOTodoView::fillCal () | ||
1197 | { | ||
1198 | mCalPopupMenu->clear(); | ||
1199 | if (!mActiveItem) return; | ||
1200 | bool readO = mActiveItem->todo()->isReadOnly(); | ||
1201 | KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); | ||
1202 | while ( kkf ) { | ||
1203 | int index = mCalPopupMenu->insertItem( kkf->mName, kkf->mCalNumber); | ||
1204 | if ( kkf->mErrorOnLoad || kkf->isReadOnly || readO ) | ||
1205 | mCalPopupMenu->setItemEnabled( index, false ); | ||
1206 | mCalPopupMenu->setItemChecked (index, kkf->mCalNumber == mActiveItem->todo()->calID()); | ||
1207 | kkf = KOPrefs::instance()->mCalendars.next(); | ||
1208 | } | ||
1209 | } | ||
1210 | void KOTodoView::changedCal (int index ) | ||
1211 | { | ||
1212 | if (!mActiveItem) return; | ||
1213 | mActiveItem->todo()->setCalID( index ); | ||
1214 | mActiveItem->construct(); | ||
1186 | } | 1215 | } |
1187 | void KOTodoView::changedCategories(int index) | 1216 | void KOTodoView::changedCategories(int index) |
1188 | { | 1217 | { |
1189 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 1218 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
1190 | QStringList categories = mActiveItem->todo()->categories (); | 1219 | QStringList categories = mActiveItem->todo()->categories (); |
1191 | QString colcat = categories.first(); | 1220 | QString colcat = categories.first(); |
1192 | if (categories.find (mCategory[index]) != categories.end ()) | 1221 | if (categories.find (mCategory[index]) != categories.end ()) |
1193 | categories.remove (mCategory[index]); | 1222 | categories.remove (mCategory[index]); |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 9ae7f53..79cc756 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -167,18 +167,16 @@ class KOTodoView : public KOrg::BaseView | |||
167 | int currentDateCount() { return 0; } | 167 | int currentDateCount() { return 0; } |
168 | 168 | ||
169 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 169 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |
170 | 170 | ||
171 | void setDocumentId( const QString & ); | 171 | void setDocumentId( const QString & ); |
172 | 172 | ||
173 | void saveLayout(KConfig *config, const QString &group) const; | 173 | void saveLayout(KConfig *config, const QString &group) const; |
174 | void restoreLayout(KConfig *config, const QString &group); | 174 | void restoreLayout(KConfig *config, const QString &group); |
175 | /** Create a popup menu to set categories */ | ||
176 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | ||
177 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} | 175 | void setNavigator( DateNavigator* nav ) {mNavigator = nav;} |
178 | QString getWhatsThisText(QPoint p); | 176 | QString getWhatsThisText(QPoint p); |
179 | void clearList() {mTodoListView->clear(); } | 177 | void clearList() {mTodoListView->clear(); } |
180 | 178 | ||
181 | public slots: | 179 | public slots: |
182 | void updateView(); | 180 | void updateView(); |
183 | void updateConfig(); | 181 | void updateConfig(); |
184 | 182 | ||
@@ -220,16 +218,19 @@ class KOTodoView : public KOrg::BaseView | |||
220 | void toggleQuickTodo(); | 218 | void toggleQuickTodo(); |
221 | void updateTodo( Todo *, int ); | 219 | void updateTodo( Todo *, int ); |
222 | 220 | ||
223 | void itemClicked(QListViewItem *); | 221 | void itemClicked(QListViewItem *); |
224 | void itemStateChanged(QListViewItem *); | 222 | void itemStateChanged(QListViewItem *); |
225 | void modified(bool); | 223 | void modified(bool); |
226 | void itemDoubleClicked(QListViewItem *item); | 224 | void itemDoubleClicked(QListViewItem *item); |
227 | void resetFocusToList(); | 225 | void resetFocusToList(); |
226 | void fillCategories (); | ||
227 | void fillCal (); | ||
228 | void changedCal (int); | ||
228 | 229 | ||
229 | signals: | 230 | signals: |
230 | void newTodoSignal(); | 231 | void newTodoSignal(); |
231 | void newSubTodoSignal(Todo *); | 232 | void newSubTodoSignal(Todo *); |
232 | void unparentTodoSignal(Todo *); | 233 | void unparentTodoSignal(Todo *); |
233 | void reparentTodoSignal( Todo *,Todo * ); | 234 | void reparentTodoSignal( Todo *,Todo * ); |
234 | void showTodoSignal(Todo *); | 235 | void showTodoSignal(Todo *); |
235 | 236 | ||
@@ -274,16 +275,17 @@ class KOTodoView : public KOrg::BaseView | |||
274 | bool isFlatDisplay; | 275 | bool isFlatDisplay; |
275 | void setOpen( QListViewItem*, bool setOpen); | 276 | void setOpen( QListViewItem*, bool setOpen); |
276 | KOTodoListView *mTodoListView; | 277 | KOTodoListView *mTodoListView; |
277 | QPopupMenu *mItemPopupMenu; | 278 | QPopupMenu *mItemPopupMenu; |
278 | QPopupMenu *mPopupMenu; | 279 | QPopupMenu *mPopupMenu; |
279 | QPopupMenu *mPriorityPopupMenu; | 280 | QPopupMenu *mPriorityPopupMenu; |
280 | QPopupMenu *mPercentageCompletedPopupMenu; | 281 | QPopupMenu *mPercentageCompletedPopupMenu; |
281 | QPopupMenu *mCategoryPopupMenu; | 282 | QPopupMenu *mCategoryPopupMenu; |
283 | QPopupMenu *mCalPopupMenu; | ||
282 | 284 | ||
283 | QMap<int, int> mPercentage; | 285 | QMap<int, int> mPercentage; |
284 | QMap<int, int> mPriority; | 286 | QMap<int, int> mPriority; |
285 | QMap<int, QString> mCategory; | 287 | QMap<int, QString> mCategory; |
286 | KOTodoViewItem *mActiveItem; | 288 | KOTodoViewItem *mActiveItem; |
287 | 289 | ||
288 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 290 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
289 | QString mName; | 291 | QString mName; |