summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt3
-rw-r--r--korganizer/koeditorgeneral.h1
-rw-r--r--korganizer/koeditorgeneralevent.cpp2
-rw-r--r--korganizer/koeditorgeneralevent.h1
-rw-r--r--korganizer/koeditorgeneraltodo.cpp9
-rw-r--r--korganizer/koeditorgeneraltodo.h1
-rw-r--r--korganizer/koeditorrecurrence.cpp42
-rw-r--r--korganizer/koeditorrecurrence.h4
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/kotodoeditor.cpp8
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
@@ -8,2 +8,5 @@ Fixed some problems in the new resource config options.
8Changed 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. 8Changed 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.
9Fixed a problem cearting new events in the agenda view if at the day/time is already an agenda item shown:
10Now 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
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index 2069e9c..a8f6443 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -87,2 +87,3 @@ class KOEditorGeneral : public QObject
87 void allAccepted(); 87 void allAccepted();
88 void dateTimesChanged(QDateTime,QDateTime);
88 89
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index af97ee9..3dd7f5c 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -239,3 +239,3 @@ void KOEditorGeneralEvent::startDateChanged(QDate newdate)
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);
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 9649806..d798905 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -89,3 +89,2 @@ class KOEditorGeneralEvent : public KOEditorGeneral
89 signals: 89 signals:
90 void dateTimesChanged(QDateTime start,QDateTime end);
91 void allDayChanged(bool); 90 void allDayChanged(bool);
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index e86b4d0..0a734ee 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -129,3 +129,4 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
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
@@ -397,3 +398,7 @@ void KOEditorGeneralTodo::enableStartEdit( bool enable )
397} 398}
398 399void KOEditorGeneralTodo::startDateChanged(QDate newdate)
400{
401 if ( mDueCheck->isChecked() )
402 emit dateTimesChanged(newdate,mDueDateEdit->date());
403}
399void KOEditorGeneralTodo::enableTimeEdits(bool enable) 404void KOEditorGeneralTodo::enableTimeEdits(bool enable)
diff --git a/korganizer/koeditorgeneraltodo.h b/korganizer/koeditorgeneraltodo.h
index b198539..2e56a7a 100644
--- a/korganizer/koeditorgeneraltodo.h
+++ b/korganizer/koeditorgeneraltodo.h
@@ -77,2 +77,3 @@ class KOEditorGeneralTodo : public KOEditorGeneral
77 protected slots: 77 protected slots:
78 void startDateChanged(QDate newdate);
78 void completedChanged(int); 79 void completedChanged(int);
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp
index dea8981..de4e4f7 100644
--- a/korganizer/koeditorrecurrence.cpp
+++ b/korganizer/koeditorrecurrence.cpp
@@ -837,4 +837,24 @@ void KOEditorRecurrence::setDateTimes( QDateTime start, QDateTime end )
837} 837}
838 838void KOEditorRecurrence::setDefaultsDates( QDateTime from, QDateTime to )
839void 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}
859void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to )
840{ 860{
@@ -842,3 +862,3 @@ void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to, bool )
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
@@ -855,14 +875,6 @@ void KOEditorRecurrence::setDefaults( QDateTime from, QDateTime to, bool )
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}
@@ -878,3 +890,3 @@ void KOEditorRecurrence::readEvent(Incidence *event)
878 890
879 setDefaults( event->dtStart(), dtEnd, true ); 891 setDefaults( event->dtStart(), dtEnd );
880 QBitArray rDays( 7 ); 892 QBitArray rDays( 7 );
@@ -899,3 +911,3 @@ void KOEditorRecurrence::readEvent(Incidence *event)
899 case Recurrence::rNone: 911 case Recurrence::rNone:
900 setDefaults( event->dtStart(), dtEnd, true ); 912 setDefaults( event->dtStart(), dtEnd );
901 break; 913 break;
@@ -971,3 +983,3 @@ void KOEditorRecurrence::readEvent(Incidence *event)
971 default: 983 default:
972 setDefaults( event->dtStart(), dtEnd, true ); 984 setDefaults( event->dtStart(), dtEnd );
973 break; 985 break;
diff --git a/korganizer/koeditorrecurrence.h b/korganizer/koeditorrecurrence.h
index a15afcb..f398f62 100644
--- a/korganizer/koeditorrecurrence.h
+++ b/korganizer/koeditorrecurrence.h
@@ -273,4 +273,2 @@ class KOEditorRecurrence : public QWidget
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 */
@@ -284,2 +282,4 @@ class KOEditorRecurrence : public QWidget
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 );
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 02d4a78..75dae34 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -74,3 +74,3 @@ void KOEventEditor::init()
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 &)),
@@ -282,3 +282,3 @@ void KOEventEditor::setDefaults(QDateTime from, QDateTime to, bool allDay)
282 mDetails->setDefaults(); 282 mDetails->setDefaults();
283 mRecurrence->setDefaults(from,to,allDay); 283 mRecurrence->setDefaults(from,to);
284 showPage( 0 ); 284 showPage( 0 );
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 9073bca..8b90ae5 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -77,2 +77,4 @@ void KOTodoEditor::init()
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}
@@ -307,3 +309,3 @@ void KOTodoEditor::setDefaults(QDateTime due,Todo *relatedEvent,bool allDay)
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}
@@ -328,3 +330,3 @@ void KOTodoEditor::checkRecurrence()
328 to = from; 330 to = from;
329 mRecurrence->setDefaults(from,to,!time); 331 mRecurrence->setDefaults(from,to);
330 } 332 }
@@ -332,3 +334,3 @@ void KOTodoEditor::checkRecurrence()
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 }