-rw-r--r-- | korganizer/calendarview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 20 | ||||
-rw-r--r-- | korganizer/koeventviewerdialog.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 |
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 | |||
@@ -2726,6 +2726,8 @@ KOEventViewerDialog* CalendarView::getEventViewerDialog() | |||
2726 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 2726 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
2727 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 2727 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
2728 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 2728 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
2729 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | ||
2730 | this, SLOT( todoChanged(Todo *) ) ); | ||
2729 | mEventViewerDialog->resize( 640, 480 ); | 2731 | mEventViewerDialog->resize( 640, 480 ); |
2730 | 2732 | ||
2731 | } | 2733 | } |
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 68c0e1a..772fd95 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp | |||
@@ -149,20 +149,29 @@ void KOEventViewerDialog::addEvent(Event *event) | |||
149 | { | 149 | { |
150 | mEventViewer->addEvent(event); | 150 | mEventViewer->addEvent(event); |
151 | mIncidence = event; | 151 | mIncidence = event; |
152 | findButton( Close )->setFocus(); | 152 | findButton( Close )->setFocus(); |
153 | if ( !mSyncMode ) { | ||
154 | findButton( User1 )->setText( i18n("Agenda")); | ||
155 | } | ||
153 | } | 156 | } |
154 | 157 | ||
155 | void KOEventViewerDialog::setTodo(Todo *event) | 158 | void KOEventViewerDialog::setTodo(Todo *event) |
156 | { | 159 | { |
157 | mEventViewer->setTodo(event); | 160 | mEventViewer->setTodo(event); |
158 | mIncidence = (Incidence*)event; | 161 | mIncidence = (Incidence*)event; |
159 | findButton( Close )->setFocus(); | 162 | findButton( Close )->setFocus(); |
163 | if ( !mSyncMode ) { | ||
164 | findButton( User1 )->setText( i18n("Set complete")); | ||
165 | } | ||
160 | } | 166 | } |
161 | void KOEventViewerDialog::setJournal(Journal *j) | 167 | void KOEventViewerDialog::setJournal(Journal *j) |
162 | { | 168 | { |
163 | mEventViewer->setJournal(j); | 169 | mEventViewer->setJournal(j); |
164 | mIncidence = (Incidence*)j; | 170 | mIncidence = (Incidence*)j; |
165 | findButton( Close )->setFocus(); | 171 | findButton( Close )->setFocus(); |
172 | if ( !mSyncMode ) { | ||
173 | findButton( User1 )->setText( i18n("Agenda")); | ||
174 | } | ||
166 | } | 175 | } |
167 | 176 | ||
168 | void KOEventViewerDialog::addText(QString text) | 177 | void KOEventViewerDialog::addText(QString text) |
@@ -199,6 +208,7 @@ void KOEventViewerDialog::showIncidence() | |||
199 | #endif | 208 | #endif |
200 | QDate date; | 209 | QDate date; |
201 | if ( mIncidence->type() == "Todo" ) { | 210 | if ( mIncidence->type() == "Todo" ) { |
211 | /* | ||
202 | if ( ((Todo*)mIncidence)->hasDueDate() ) | 212 | if ( ((Todo*)mIncidence)->hasDueDate() ) |
203 | date = ((Todo*)mIncidence)->dtDue().date(); | 213 | date = ((Todo*)mIncidence)->dtDue().date(); |
204 | else { | 214 | else { |
@@ -206,6 +216,12 @@ void KOEventViewerDialog::showIncidence() | |||
206 | emit showAgendaView( false ); | 216 | emit showAgendaView( false ); |
207 | return; | 217 | return; |
208 | } | 218 | } |
219 | */ | ||
220 | ((Todo*)mIncidence)->setCompleted( true ); | ||
221 | hide(); | ||
222 | emit todoCompleted(((Todo*)mIncidence)); | ||
223 | return; | ||
224 | |||
209 | } else | 225 | } else |
210 | date = mIncidence->dtStart().date(); | 226 | date = mIncidence->dtStart().date(); |
211 | globalFlagBlockAgenda = 1; | 227 | globalFlagBlockAgenda = 1; |
diff --git a/korganizer/koeventviewerdialog.h b/korganizer/koeventviewerdialog.h index 21cb3ee..b6b4103 100644 --- a/korganizer/koeventviewerdialog.h +++ b/korganizer/koeventviewerdialog.h | |||
@@ -55,6 +55,7 @@ class KOEventViewerDialog : public KDialogBase { | |||
55 | void editIncidence( Incidence* ); | 55 | void editIncidence( Incidence* ); |
56 | void jumpToTime( const QDate &); | 56 | void jumpToTime( const QDate &); |
57 | void showAgendaView( bool ); | 57 | void showAgendaView( bool ); |
58 | void todoCompleted(Todo*); | ||
58 | private slots: | 59 | private slots: |
59 | void editIncidence(); | 60 | void editIncidence(); |
60 | void showIncidence(); | 61 | void showIncidence(); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 6f76e2c..3c251fb 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -66,7 +66,6 @@ class KOViewManager : public QObject | |||
66 | 66 | ||
67 | void setDocumentId( const QString & ); | 67 | void setDocumentId( const QString & ); |
68 | 68 | ||
69 | void updateView(); | ||
70 | void updateView( const QDate &start, const QDate &end ); | 69 | void updateView( const QDate &start, const QDate &end ); |
71 | 70 | ||
72 | void raiseCurrentView( bool fullScreen = false ); | 71 | void raiseCurrentView( bool fullScreen = false ); |
@@ -81,6 +80,7 @@ class KOViewManager : public QObject | |||
81 | signals: | 80 | signals: |
82 | void printWNV(); | 81 | void printWNV(); |
83 | public slots: | 82 | public slots: |
83 | void updateView(); | ||
84 | void showWhatsNextView(); | 84 | void showWhatsNextView(); |
85 | void showListView(); | 85 | void showListView(); |
86 | void showAgendaView( bool fullScreen = false ); | 86 | void showAgendaView( bool fullScreen = false ); |