summaryrefslogtreecommitdiffstats
path: root/kalarm/editdlg.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-08-06 08:48:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-08-06 08:48:29 +0900
commit74a91e13153f0696bb62baa78dac119f3a2e9fca (patch)
treef8bab8db2c52873ae9c436f93554900227271f34 /kalarm/editdlg.cpp
parent0aae3df09e6d1d363534da71d91b559d8edfa91c (diff)
downloadtdepim-74a91e13153f0696bb62baa78dac119f3a2e9fca.tar.gz
tdepim-74a91e13153f0696bb62baa78dac119f3a2e9fca.zip
Fixed KAlarm event date/time selection for recurrent events. This relates to bug 304.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kalarm/editdlg.cpp')
-rw-r--r--kalarm/editdlg.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index f6e1f0b08..8e0cbde37 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -1374,13 +1374,20 @@ void EditAlarmDlg::slotOk()
return;
}
}
- if (!checkCommandData()
- || !checkEmailData())
+ if (!checkCommandData() || !checkEmailData())
return;
if (!mTemplate)
{
if (timedRecurrence)
{
+ // For daily, weekly, monthly and yearly recurrences, check that the
+ // specified date matches the allowed days of the week
+ if (!mRecurrenceEdit->validateDate(mAlarmDateTime))
+ {
+ KMessageBox::sorry(this, i18n("The date/time in the Alarm tab does not "
+ "match the recurrence settings specified in the Recurrence tab."));
+ return;
+ }
TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date()
|| mAlarmDateTime.date() == now.date()
@@ -1415,7 +1422,7 @@ void EditAlarmDlg::slotOk()
KAEvent recurEvent;
int longestRecurInterval = -1;
int reminder = mReminder->minutes();
- if (reminder && !mReminder->isOnceOnly())
+ if (reminder && !mReminder->isOnceOnly())
{
mRecurrenceEdit->updateEvent(recurEvent, false);
longestRecurInterval = recurEvent.longestRecurrenceInterval();
@@ -1423,8 +1430,7 @@ void EditAlarmDlg::slotOk()
{
mTabs->setCurrentPage(mMainPageIndex);
mReminder->setFocusOnCount();
- KMessageBox::sorry(this, i18n("Reminder period must be less than the recurrence interval, unless '%1' is checked."
- ).arg(Reminder::i18n_first_recurrence_only()));
+ KMessageBox::sorry(this, i18n("Reminder period must be less than the recurrence interval, unless '%1' is checked.").arg(Reminder::i18n_first_recurrence_only()));
return;
}
}