|
|
|
@ -1052,8 +1052,8 @@ bool EditAlarmDlg::stateChanged() const
|
|
|
|
|
{
|
|
|
|
|
if (mSavedTemplateName != mTemplateName->text()
|
|
|
|
|
|| mSavedTemplateTimeType != mTemplateTimeGroup->selected()
|
|
|
|
|
|| mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time()
|
|
|
|
|
|| mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value())
|
|
|
|
|
|| (mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time())
|
|
|
|
|
|| (mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value()))
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -1061,7 +1061,7 @@ bool EditAlarmDlg::stateChanged() const
|
|
|
|
|
return true;
|
|
|
|
|
if (mSavedTypeRadio != mActionGroup->selected()
|
|
|
|
|
|| mSavedLateCancel != mLateCancel->minutes()
|
|
|
|
|
|| mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked()
|
|
|
|
|
|| (mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked())
|
|
|
|
|
|| textFileCommandMessage != mSavedTextFileCommandMessage
|
|
|
|
|
|| mSavedRecurrenceType != mRecurrenceEdit->repeatType())
|
|
|
|
|
return true;
|
|
|
|
@ -1114,7 +1114,7 @@ bool EditAlarmDlg::stateChanged() const
|
|
|
|
|
TQStringList emailAttach;
|
|
|
|
|
for (int i = 0; i < mEmailAttachList->count(); ++i)
|
|
|
|
|
emailAttach += mEmailAttachList->text(i);
|
|
|
|
|
if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName()
|
|
|
|
|
if ((mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName())
|
|
|
|
|
|| mSavedEmailTo != mEmailToEdit->text()
|
|
|
|
|
|| mSavedEmailSubject != mEmailSubjectEdit->text()
|
|
|
|
|
|| mSavedEmailAttach != emailAttach
|
|
|
|
@ -1214,8 +1214,8 @@ void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
|
|
|
|
|
mRecurrenceEdit->updateEvent(event, !mTemplate);
|
|
|
|
|
TQDateTime now = TQDateTime::currentDateTime();
|
|
|
|
|
bool dateOnly = mAlarmDateTime.isDateOnly();
|
|
|
|
|
if (dateOnly && mAlarmDateTime.date() < now.date()
|
|
|
|
|
|| !dateOnly && mAlarmDateTime.rawDateTime() < now)
|
|
|
|
|
if ((dateOnly && mAlarmDateTime.date() < now.date())
|
|
|
|
|
|| (!dateOnly && mAlarmDateTime.rawDateTime() < now))
|
|
|
|
|
{
|
|
|
|
|
// A timed recurrence has an entered start date which has
|
|
|
|
|
// already expired, so we must adjust the next repetition.
|
|
|
|
@ -1390,16 +1390,16 @@ void EditAlarmDlg::slotOk()
|
|
|
|
|
}
|
|
|
|
|
TQDateTime now = TQDateTime::currentDateTime();
|
|
|
|
|
if (mAlarmDateTime.date() < now.date()
|
|
|
|
|
|| mAlarmDateTime.date() == now.date()
|
|
|
|
|
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
|
|
|
|
|
|| (mAlarmDateTime.date() == now.date()
|
|
|
|
|
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
|
|
|
|
|
{
|
|
|
|
|
// A timed recurrence has an entered start date which
|
|
|
|
|
// has already expired, so we must adjust it.
|
|
|
|
|
KAEvent event;
|
|
|
|
|
getEvent(event); // this may adjust mAlarmDateTime
|
|
|
|
|
if (( mAlarmDateTime.date() < now.date()
|
|
|
|
|
|| mAlarmDateTime.date() == now.date()
|
|
|
|
|
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
|
|
|
|
|
|| (mAlarmDateTime.date() == now.date()
|
|
|
|
|
&& !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
|
|
|
|
|
&& event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE)
|
|
|
|
|
{
|
|
|
|
|
KMessageBox::sorry(this, i18n("Recurrence has already expired"));
|
|
|
|
@ -1449,7 +1449,7 @@ void EditAlarmDlg::slotOk()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (recurEvent.repeatInterval() % 1440
|
|
|
|
|
&& (mTemplate && mTemplateAnyTime->isOn() || !mTemplate && mAlarmDateTime.isDateOnly()))
|
|
|
|
|
&& ((mTemplate && mTemplateAnyTime->isOn()) || (!mTemplate && mAlarmDateTime.isDateOnly())))
|
|
|
|
|
{
|
|
|
|
|
KMessageBox::sorry(this, i18n("For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
|
|
|
|
|
mRecurrenceEdit->activateSubRepetition(); // display the alarm repetition dialog again
|
|
|
|
|