summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
-rw-r--r--korganizer/koeventviewerdialog.cpp20
-rw-r--r--korganizer/koeventviewerdialog.h1
-rw-r--r--korganizer/koviewmanager.h2
4 files changed, 22 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 363dc32..378c7d4 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2725,8 +2725,10 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog()
connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
viewManager(), SLOT( showAgendaView( bool ) ) );
+ connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
+ this, SLOT( todoChanged(Todo *) ) );
mEventViewerDialog->resize( 640, 480 );
}
return mEventViewerDialog;
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp
index 68c0e1a..772fd95 100644
--- a/korganizer/koeventviewerdialog.cpp
+++ b/korganizer/koeventviewerdialog.cpp
@@ -148,22 +148,31 @@ void KOEventViewerDialog::addIncidence(Incidence *in)
void KOEventViewerDialog::addEvent(Event *event)
{
mEventViewer->addEvent(event);
mIncidence = event;
- findButton( Close )->setFocus();
+ findButton( Close )->setFocus();
+ if ( !mSyncMode ) {
+ findButton( User1 )->setText( i18n("Agenda"));
+ }
}
void KOEventViewerDialog::setTodo(Todo *event)
{
mEventViewer->setTodo(event);
mIncidence = (Incidence*)event;
- findButton( Close )->setFocus();
+ findButton( Close )->setFocus();
+ if ( !mSyncMode ) {
+ findButton( User1 )->setText( i18n("Set complete"));
+ }
}
void KOEventViewerDialog::setJournal(Journal *j)
{
mEventViewer->setJournal(j);
mIncidence = (Incidence*)j;
findButton( Close )->setFocus();
+ if ( !mSyncMode ) {
+ findButton( User1 )->setText( i18n("Agenda"));
+ }
}
void KOEventViewerDialog::addText(QString text)
{
@@ -198,15 +207,22 @@ void KOEventViewerDialog::showIncidence()
hide();
#endif
QDate date;
if ( mIncidence->type() == "Todo" ) {
+ /*
if ( ((Todo*)mIncidence)->hasDueDate() )
date = ((Todo*)mIncidence)->dtDue().date();
else {
globalFlagBlockAgenda = 2;
emit showAgendaView( false );
return;
}
+ */
+ ((Todo*)mIncidence)->setCompleted( true );
+ hide();
+ emit todoCompleted(((Todo*)mIncidence));
+ return;
+
} else
date = mIncidence->dtStart().date();
globalFlagBlockAgenda = 1;
emit showAgendaView( false );
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h
index 21cb3ee..b6b4103 100644
--- a/korganizer/koeventviewerdialog.h
+++ b/korganizer/koeventviewerdialog.h
@@ -54,8 +54,9 @@ class KOEventViewerDialog : public KDialogBase {
signals:
void editIncidence( Incidence* );
void jumpToTime( const QDate &);
void showAgendaView( bool );
+ void todoCompleted(Todo*);
private slots:
void editIncidence();
void showIncidence();
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 6f76e2c..3c251fb 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -65,9 +65,8 @@ class KOViewManager : public QObject
KOrg::BaseView *currentView();
void setDocumentId( const QString & );
- void updateView();
void updateView( const QDate &start, const QDate &end );
void raiseCurrentView( bool fullScreen = false );
@@ -80,8 +79,9 @@ class KOViewManager : public QObject
signals:
void printWNV();
public slots:
+ void updateView();
void showWhatsNextView();
void showListView();
void showAgendaView( bool fullScreen = false );
void showDayView();