author | zautrix <zautrix> | 2005-06-25 16:06:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-25 16:06:31 (UTC) |
commit | 3867528ada39bb50a18802c499fbc3f6fae26e8c (patch) (unidiff) | |
tree | 6b619b3bc6dea00e52648b4a394a61ab4ee8a072 | |
parent | 49d8fe456ce284a512227a7ca9d4d49688a39cd2 (diff) | |
download | kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.zip kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.gz kdepimpi-3867528ada39bb50a18802c499fbc3f6fae26e8c.tar.bz2 |
fixxxxx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 1 | ||||
-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeditorgeneralevent.h | 1 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 9 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.h | 1 | ||||
-rw-r--r-- | korganizer/koeditorrecurrence.cpp | 42 | ||||
-rw-r--r-- | korganizer/koeditorrecurrence.h | 4 | ||||
-rw-r--r-- | korganizer/koeventeditor.cpp | 4 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 8 |
10 files changed, 49 insertions, 26 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index fdaf740..4b965c1 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -3,12 +3,15 @@ Info about the changes in new versions of KDE-Pim/Pi | |||
3 | ********** VERSION 2.1.9 ************ | 3 | ********** VERSION 2.1.9 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed some problems of the new search options in the search dialog. | 6 | Fixed some problems of the new search options in the search dialog. |
7 | Fixed some problems in the new resource config options. | 7 | Fixed some problems in the new resource config options. |
8 | Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. | 8 | Changed the recurrence edit of events and todos such that the recurrence edit page now is notified about a change of the start date on the first page. |
9 | Fixed a problem cearting new events in the agenda view if at the day/time is already an agenda item shown: | ||
10 | Now you can click on the bottom/top of an allday agenda item and on the left/right of an agenda item to get the "new todo/new event" popup. | ||
11 | |||
9 | 12 | ||
10 | PwM/Pi: | 13 | PwM/Pi: |
11 | Added "sec" to the timeout config settings to make it clear the timeout values are seconds. | 14 | Added "sec" to the timeout config settings to make it clear the timeout values are seconds. |
12 | 15 | ||
13 | ********** VERSION 2.1.8 ************ | 16 | ********** VERSION 2.1.8 ************ |
14 | 17 | ||
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index 2069e9c..a8f6443 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h | |||
@@ -82,12 +82,13 @@ class KOEditorGeneral : public QObject | |||
82 | void pickAlarmSound(); | 82 | void pickAlarmSound(); |
83 | void pickAlarmProgram(); | 83 | void pickAlarmProgram(); |
84 | void slotSetFocusOn(); | 84 | void slotSetFocusOn(); |
85 | signals: | 85 | signals: |
86 | void openCategoryDialog(); | 86 | void openCategoryDialog(); |
87 | void allAccepted(); | 87 | void allAccepted(); |
88 | void dateTimesChanged(QDateTime,QDateTime); | ||
88 | 89 | ||
89 | protected: | 90 | protected: |
90 | int mNextFocus; | 91 | int mNextFocus; |
91 | //QLineEdit *mSummaryEdit; | 92 | //QLineEdit *mSummaryEdit; |
92 | //QLineEdit *mLocationEdit; | 93 | //QLineEdit *mLocationEdit; |
93 | KOLocationBox *mSummaryEdit; | 94 | KOLocationBox *mSummaryEdit; |
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index af97ee9..3dd7f5c 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp | |||
@@ -234,13 +234,13 @@ void KOEditorGeneralEvent::startDateChanged(QDate newdate) | |||
234 | 234 | ||
235 | mCurrStartDateTime.setDate(newdate); | 235 | mCurrStartDateTime.setDate(newdate); |
236 | 236 | ||
237 | // adjust end date so that the event has the same duration as before | 237 | // adjust end date so that the event has the same duration as before |
238 | mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); | 238 | mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); |
239 | mEndDateEdit->setDate(mCurrEndDateTime.date()); | 239 | mEndDateEdit->setDate(mCurrEndDateTime.date()); |
240 | 240 | qDebug("KOEditorGeneralEvent::startDateChanged "); | |
241 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); | 241 | emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); |
242 | } | 242 | } |
243 | 243 | ||
244 | void KOEditorGeneralEvent::endDateChanged(QDate newdate) | 244 | void KOEditorGeneralEvent::endDateChanged(QDate newdate) |
245 | { | 245 | { |
246 | QDateTime newdt(newdate, mCurrEndDateTime.time()); | 246 | QDateTime newdt(newdate, mCurrEndDateTime.time()); |
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h index 9649806..d798905 100644 --- a/korganizer/koeditorgeneralevent.h +++ b/korganizer/koeditorgeneralevent.h | |||
@@ -84,13 +84,12 @@ class KOEditorGeneralEvent : public KOEditorGeneral | |||
84 | 84 | ||
85 | void emitDateTimeStr(); | 85 | void emitDateTimeStr(); |
86 | void sTimeChanged(QTime); | 86 | void sTimeChanged(QTime); |
87 | void eTimeChanged(QTime); | 87 | void eTimeChanged(QTime); |
88 | 88 | ||
89 | signals: | 89 | signals: |
90 | void dateTimesChanged(QDateTime start,QDateTime end); | ||
91 | void allDayChanged(bool); | 90 | void allDayChanged(bool); |
92 | void dateTimeStrChanged(const QString &); | 91 | void dateTimeStrChanged(const QString &); |
93 | 92 | ||
94 | private: | 93 | private: |
95 | bool mTemplate; | 94 | bool mTemplate; |
96 | QLabel *mStartDateLabel; | 95 | QLabel *mStartDateLabel; |
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index e86b4d0..0a734ee 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -124,13 +124,14 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | |||
124 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); | 124 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); |
125 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); | 125 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); |
126 | 126 | ||
127 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); | 127 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); |
128 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); | 128 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); |
129 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | 129 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); |
130 | 130 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), | |
131 | this, SLOT(startDateChanged(QDate))); | ||
131 | // some more layouting | 132 | // some more layouting |
132 | //layoutTimeBox->setColStretch(3,1); | 133 | //layoutTimeBox->setColStretch(3,1); |
133 | } | 134 | } |
134 | 135 | ||
135 | 136 | ||
136 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 137 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) |
@@ -392,13 +393,17 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable ) | |||
392 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); | 393 | mStartTimeEdit->setEnabled( mTimeButton->isChecked() ); |
393 | } else { | 394 | } else { |
394 | mStartTimeEdit->setEnabled( false ); | 395 | mStartTimeEdit->setEnabled( false ); |
395 | } | 396 | } |
396 | emit datesChecked(); | 397 | emit datesChecked(); |
397 | } | 398 | } |
398 | 399 | void KOEditorGeneralTodo::startDateChanged(QDate newdate) | |
400 | { | ||
401 | if ( mDueCheck->isChecked() ) | ||
402 | emit dateTimesChanged(newdate,mDueDateEdit->date()); | ||
403 | } | ||
399 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) | 404 | void KOEditorGeneralTodo::enableTimeEdits(bool enable) |
400 | { | 405 | { |
401 | if(mStartCheck->isChecked()) { | 406 | if(mStartCheck->isChecked()) { |
402 | mStartTimeEdit->setEnabled( enable ); | 407 | mStartTimeEdit->setEnabled( enable ); |
403 | } | 408 | } |
404 | if(mDueCheck->isChecked()) { | 409 | if(mDueCheck->isChecked()) { |
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h index b198539..2e56a7a 100644 --- a/korganizer/koeditorgeneraltodo.h +++ b/korganizer/koeditorgeneraltodo.h | |||
@@ -72,12 +72,13 @@ class KOEditorGeneralTodo : public KOEditorGeneral | |||
72 | 72 | ||
73 | signals: | 73 | signals: |
74 | void openCategoryDialog(); | 74 | void openCategoryDialog(); |
75 | void datesChecked(); | 75 | void datesChecked(); |
76 | 76 | ||
77 | protected slots: | 77 | protected slots: |
78 | void startDateChanged(QDate newdate); | ||
78 | void completedChanged(int); | 79 | void completedChanged(int); |
79 | 80 | ||
80 | void enableDueEdit( bool enable ); | 81 | void enableDueEdit( bool enable ); |
81 | void enableStartEdit( bool enable ); | 82 | void enableStartEdit( bool enable ); |
82 | void enableTimeEdits( bool enable ); | 83 | void enableTimeEdits( bool enable ); |
83 | void showAlarm(); | 84 | void showAlarm(); |
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index dea8981..de4e4f7 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp | |||
@@ -832,54 +832,66 @@ void KOEditorRecurrence::setDateTimes( QDateTime start, QDateTime end ) | |||
832 | // kdDebug() << "KOEditorRecurrence::setDateTimes" << endl; | 832 | // kdDebug() << "KOEditorRecurrence::setDateTimes" << endl; |
833 | 833 | ||
834 | mRecurrenceRange->setDateTimes( start, end ); | 834 | mRecurrenceRange->setDateTimes( start, end ); |
835 | mExceptions->setDefaults( end ); | 835 | mExceptions->setDefaults( end ); |
836 | 836 | ||
837 | } | 837 | } |
838 | 838 | void KOEditorRecurrence::setDefaultsDates( QDateTime from, QDateTime to ) | |
839 | void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to, bool ) | 839 | { |
840 | setDateTimes( from, to ); | ||
841 | QBitArray days( 7 ); | ||
842 | days.fill( 0 ); | ||
843 | days.setBit( from.date().dayOfWeek()- 1); | ||
844 | mWeekly->setDays( days ); | ||
845 | bool byPos = mMonthly->byPos(); | ||
846 | if ( byPos ) | ||
847 | mMonthly->setByDay( from.date().day()-1 ); | ||
848 | mMonthly->setByPos((from.date().day()/7), from.date().dayOfWeek()-1 ); | ||
849 | if ( ! byPos) | ||
850 | mMonthly->setByDay( from.date().day()-1 ); | ||
851 | |||
852 | bool byDay = mYearly->byDay(); | ||
853 | if ( ! byDay ) | ||
854 | mYearly->setByDay( from.date().dayOfYear() ); | ||
855 | mYearly->setByMonth( from.date().month(), from.date().day() ); | ||
856 | if ( byDay ) | ||
857 | mYearly->setByDay( from.date().dayOfYear() ); | ||
858 | } | ||
859 | void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to ) | ||
840 | { | 860 | { |
841 | 861 | ||
842 | // qDebug("KOEditorRecurrence::setDefaults %s %s ",from.toString().latin1(),to.toString().latin1() ); | 862 | // qDebug("KOEditorRecurrence::setDefaults %s %s ",from.toString().latin1(),to.toString().latin1() ); |
843 | setDateTimes( from, to ); | 863 | //setDateTimes( from, to ); |
844 | 864 | ||
845 | bool enabled = false; | 865 | bool enabled = false; |
846 | mEnabledCheck->setChecked( enabled ); | 866 | mEnabledCheck->setChecked( enabled ); |
847 | setEnabled( enabled ); | 867 | setEnabled( enabled ); |
848 | 868 | ||
849 | mExceptions->setDefaults( to ); | 869 | mExceptions->setDefaults( to ); |
850 | mRecurrenceRange->setDefaults( to ); | 870 | mRecurrenceRange->setDefaults( to ); |
851 | 871 | ||
852 | mRecurrenceChooser->setType( RecurrenceChooser::Weekly ); | 872 | mRecurrenceChooser->setType( RecurrenceChooser::Weekly ); |
853 | showCurrentRule( mRecurrenceChooser->type() ); | 873 | showCurrentRule( mRecurrenceChooser->type() ); |
854 | 874 | ||
855 | mDaily->setFrequency( 1 ); | 875 | mDaily->setFrequency( 1 ); |
856 | |||
857 | mWeekly->setFrequency( 1 ); | 876 | mWeekly->setFrequency( 1 ); |
858 | QBitArray days( 7 ); | ||
859 | days.fill( 0 ); | ||
860 | days.setBit( from.date().dayOfWeek()- 1); | ||
861 | mWeekly->setDays( days ); | ||
862 | mMonthly->setFrequency( 1 ); | 877 | mMonthly->setFrequency( 1 ); |
863 | mMonthly->setByPos((from.date().day()/7), from.date().dayOfWeek()-1 ); | ||
864 | mMonthly->setByDay( from.date().day()-1 ); | ||
865 | mYearly->setFrequency( 1 ); | 878 | mYearly->setFrequency( 1 ); |
866 | mYearly->setByDay( from.date().dayOfYear() ); | 879 | setDefaultsDates( from, to ); |
867 | mYearly->setByMonth( from.date().month(), from.date().day() ); | ||
868 | } | 880 | } |
869 | 881 | ||
870 | void KOEditorRecurrence::readEvent(Incidence *event) | 882 | void KOEditorRecurrence::readEvent(Incidence *event) |
871 | { | 883 | { |
872 | 884 | ||
873 | QDateTime dtEnd; | 885 | QDateTime dtEnd; |
874 | if ( event->typeID() == eventID ) | 886 | if ( event->typeID() == eventID ) |
875 | dtEnd = ((Event*)event)->dtEnd(); | 887 | dtEnd = ((Event*)event)->dtEnd(); |
876 | else | 888 | else |
877 | dtEnd = ((Todo*)event)->dtDue(); | 889 | dtEnd = ((Todo*)event)->dtDue(); |
878 | 890 | ||
879 | setDefaults( event->dtStart(), dtEnd, true ); | 891 | setDefaults( event->dtStart(), dtEnd ); |
880 | QBitArray rDays( 7 ); | 892 | QBitArray rDays( 7 ); |
881 | QPtrList<Recurrence::rMonthPos> rmp; | 893 | QPtrList<Recurrence::rMonthPos> rmp; |
882 | QPtrList<int> rmd; | 894 | QPtrList<int> rmd; |
883 | int day = 0; | 895 | int day = 0; |
884 | int count = 0; | 896 | int count = 0; |
885 | int month = 0; | 897 | int month = 0; |
@@ -894,13 +906,13 @@ void KOEditorRecurrence::readEvent(Incidence *event) | |||
894 | setEnabled( recurs ); | 906 | setEnabled( recurs ); |
895 | 907 | ||
896 | int recurrenceType = RecurrenceChooser::Weekly; | 908 | int recurrenceType = RecurrenceChooser::Weekly; |
897 | 909 | ||
898 | switch ( recurs ) { | 910 | switch ( recurs ) { |
899 | case Recurrence::rNone: | 911 | case Recurrence::rNone: |
900 | setDefaults( event->dtStart(), dtEnd, true ); | 912 | setDefaults( event->dtStart(), dtEnd ); |
901 | break; | 913 | break; |
902 | case Recurrence::rDaily: | 914 | case Recurrence::rDaily: |
903 | recurrenceType = RecurrenceChooser::Daily; | 915 | recurrenceType = RecurrenceChooser::Daily; |
904 | mDaily->setFrequency( f ); | 916 | mDaily->setFrequency( f ); |
905 | break; | 917 | break; |
906 | case Recurrence::rWeekly: | 918 | case Recurrence::rWeekly: |
@@ -966,13 +978,13 @@ void KOEditorRecurrence::readEvent(Incidence *event) | |||
966 | //qDebug("Recurrence::rYearlyDay: "); | 978 | //qDebug("Recurrence::rYearlyDay: "); |
967 | recurrenceType = RecurrenceChooser::Yearly; | 979 | recurrenceType = RecurrenceChooser::Yearly; |
968 | mYearly->setByDay( event->dtStart().date().dayOfYear() ); | 980 | mYearly->setByDay( event->dtStart().date().dayOfYear() ); |
969 | mYearly->setFrequency( f ); | 981 | mYearly->setFrequency( f ); |
970 | break; | 982 | break; |
971 | default: | 983 | default: |
972 | setDefaults( event->dtStart(), dtEnd, true ); | 984 | setDefaults( event->dtStart(), dtEnd ); |
973 | break; | 985 | break; |
974 | } | 986 | } |
975 | 987 | ||
976 | mRecurrenceChooser->setType( recurrenceType ); | 988 | mRecurrenceChooser->setType( recurrenceType ); |
977 | showCurrentRule( recurrenceType ); | 989 | showCurrentRule( recurrenceType ); |
978 | 990 | ||
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h index a15afcb..f398f62 100644 --- a/korganizer/koeditorrecurrence.h +++ b/korganizer/koeditorrecurrence.h | |||
@@ -268,23 +268,23 @@ class KOEditorRecurrence : public QWidget | |||
268 | public: | 268 | public: |
269 | KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 ); | 269 | KOEditorRecurrence ( QWidget *parent = 0, const char *name = 0 ); |
270 | virtual ~KOEditorRecurrence(); | 270 | virtual ~KOEditorRecurrence(); |
271 | 271 | ||
272 | enum { Daily, Weekly, Monthly, Yearly }; | 272 | enum { Daily, Weekly, Monthly, Yearly }; |
273 | 273 | ||
274 | /** Set widgets to default values */ | ||
275 | void setDefaults( QDateTime from, QDateTime to, bool allday ); | ||
276 | /** Read event object and setup widgets accordingly */ | 274 | /** Read event object and setup widgets accordingly */ |
277 | void readEvent( Incidence * ); | 275 | void readEvent( Incidence * ); |
278 | /** Write event settings to event object */ | 276 | /** Write event settings to event object */ |
279 | void writeEvent( Incidence * ); | 277 | void writeEvent( Incidence * ); |
280 | 278 | ||
281 | /** Check if the input is valid. */ | 279 | /** Check if the input is valid. */ |
282 | bool validateInput(); | 280 | bool validateInput(); |
283 | 281 | ||
284 | public slots: | 282 | public slots: |
283 | void setDefaultsDates( QDateTime from, QDateTime to ); | ||
284 | void setDefaults( QDateTime from, QDateTime to ); | ||
285 | void setEnabled( bool ); | 285 | void setEnabled( bool ); |
286 | void setDateTimes( QDateTime start, QDateTime end ); | 286 | void setDateTimes( QDateTime start, QDateTime end ); |
287 | void setDateTimeStr( const QString & ); | 287 | void setDateTimeStr( const QString & ); |
288 | 288 | ||
289 | signals: | 289 | signals: |
290 | void dateTimesChanged( QDateTime start, QDateTime end ); | 290 | void dateTimesChanged( QDateTime start, QDateTime end ); |
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 02d4a78..75dae34 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp | |||
@@ -69,13 +69,13 @@ void KOEventEditor::init() | |||
69 | setupGeneral(); | 69 | setupGeneral(); |
70 | setupAttendeesTab(); | 70 | setupAttendeesTab(); |
71 | setupRecurrence(); | 71 | setupRecurrence(); |
72 | 72 | ||
73 | // Propagate date time settings to recurrence tab | 73 | // Propagate date time settings to recurrence tab |
74 | connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), | 74 | connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), |
75 | mRecurrence,SLOT(setDateTimes(QDateTime,QDateTime))); | 75 | mRecurrence,SLOT(setDefaultsDates(QDateTime,QDateTime))); |
76 | connect(mGeneral,SIGNAL(dateTimeStrChanged(const QString &)), | 76 | connect(mGeneral,SIGNAL(dateTimeStrChanged(const QString &)), |
77 | mRecurrence,SLOT(setDateTimeStr(const QString &))); | 77 | mRecurrence,SLOT(setDateTimeStr(const QString &))); |
78 | 78 | ||
79 | // Category dialog | 79 | // Category dialog |
80 | // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); | 80 | // connect(mGeneral,SIGNAL(openCategoryDialog()),mCategoryDialog,SLOT(show())); |
81 | //connect(mCategoryDialog,SIGNAL(categoriesSelected(const QString &)), | 81 | //connect(mCategoryDialog,SIGNAL(categoriesSelected(const QString &)), |
@@ -277,13 +277,13 @@ void KOEventEditor::deleteEvent() | |||
277 | } | 277 | } |
278 | 278 | ||
279 | void KOEventEditor::setDefaults(QDateTime from, QDateTime to, bool allDay) | 279 | void KOEventEditor::setDefaults(QDateTime from, QDateTime to, bool allDay) |
280 | { | 280 | { |
281 | mGeneral->setDefaults(from,to,allDay); | 281 | mGeneral->setDefaults(from,to,allDay); |
282 | mDetails->setDefaults(); | 282 | mDetails->setDefaults(); |
283 | mRecurrence->setDefaults(from,to,allDay); | 283 | mRecurrence->setDefaults(from,to); |
284 | showPage( 0 ); | 284 | showPage( 0 ); |
285 | mGeneral->setFocusOn( 2 ); | 285 | mGeneral->setFocusOn( 2 ); |
286 | } | 286 | } |
287 | 287 | ||
288 | void KOEventEditor::readEvent( Event *event, bool tmpl ) | 288 | void KOEventEditor::readEvent( Event *event, bool tmpl ) |
289 | { | 289 | { |
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 9073bca..8b90ae5 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp | |||
@@ -72,12 +72,14 @@ void KOTodoEditor::init() | |||
72 | { | 72 | { |
73 | setupGeneral(); | 73 | setupGeneral(); |
74 | setupAttendeesTab(); | 74 | setupAttendeesTab(); |
75 | setupRecurrence(); | 75 | setupRecurrence(); |
76 | connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); | 76 | connect(mGeneral,SIGNAL(datesChecked()),this ,SLOT(checkRecurrence())); |
77 | mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); | 77 | mRecurrence->setDateTimeStr( i18n("<i>The recurrence is computed from the start datetime!</i>") ); |
78 | connect(mGeneral,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), | ||
79 | mRecurrence,SLOT(setDefaultsDates(QDateTime,QDateTime))); | ||
78 | } | 80 | } |
79 | void KOTodoEditor::setupRecurrence() | 81 | void KOTodoEditor::setupRecurrence() |
80 | { | 82 | { |
81 | QFrame *topFrame = addPage( i18n("Recurrence") ); | 83 | QFrame *topFrame = addPage( i18n("Recurrence") ); |
82 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); | 84 | QBoxLayout *topLayout = new QVBoxLayout( topFrame ); |
83 | 85 | ||
@@ -302,13 +304,13 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay) | |||
302 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); | 304 | mGeneral->mSummaryEdit->lineEdit()->setCursorPosition ( len+2 ); |
303 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); | 305 | mGeneral->mSummaryEdit->lineEdit()->setSelection ( 0, len+2 ); |
304 | 306 | ||
305 | } else | 307 | } else |
306 | mGeneral->setFocusOn( 2 ); | 308 | mGeneral->setFocusOn( 2 ); |
307 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 309 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
308 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 310 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 )); |
309 | } | 311 | } |
310 | void KOTodoEditor::checkRecurrence() | 312 | void KOTodoEditor::checkRecurrence() |
311 | { | 313 | { |
312 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { | 314 | if ( mGeneral->mDueCheck->isChecked() && mGeneral->mStartCheck->isChecked()) { |
313 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); | 315 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), true ); |
314 | 316 | ||
@@ -323,17 +325,17 @@ void KOTodoEditor::checkRecurrence() | |||
323 | } else { | 325 | } else { |
324 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; | 326 | to = QDateTime( mGeneral->mDueDateEdit->date(), QTime( 0,0,0) ) ; |
325 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; | 327 | from = QDateTime( mGeneral->mStartDateEdit->date(),QTime( 0,0,0) ) ; |
326 | } | 328 | } |
327 | if ( to < from ) | 329 | if ( to < from ) |
328 | to = from; | 330 | to = from; |
329 | mRecurrence->setDefaults(from,to,!time); | 331 | mRecurrence->setDefaults(from,to); |
330 | } | 332 | } |
331 | } else { | 333 | } else { |
332 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); | 334 | tabWidget()->setTabEnabled ( mRecurrence->parentWidget(), false ); |
333 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 ),true); | 335 | mRecurrence->setDefaults(QDateTime::currentDateTime(),QDateTime::currentDateTime().addSecs( 3600 )); |
334 | } | 336 | } |
335 | } | 337 | } |
336 | void KOTodoEditor::readTodo(Todo *todo) | 338 | void KOTodoEditor::readTodo(Todo *todo) |
337 | { | 339 | { |
338 | mGeneral->readTodo(todo); | 340 | mGeneral->readTodo(todo); |
339 | mDetails->readEvent(todo); | 341 | mDetails->readEvent(todo); |