Commit 0de1fa63 authored by David Jarvie's avatar David Jarvie

Remove ability to select blank date

parent 348d3fab
......@@ -112,6 +112,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
// Date edit box
mDateEdit = new KDateComboBox(topWidget);
mDateEdit->setOptions(KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
connect(mDateEdit, SIGNAL(dateEntered(QDate)), SLOT(dateTimeChanged()));
mDateEdit->setWhatsThis(i18nc("@info:whatsthis",
"<para>Enter the date to schedule the alarm.</para>"
......@@ -243,10 +244,7 @@ void AlarmTimeWidget::init(Mode mode, const QString& title)
void AlarmTimeWidget::setReadOnly(bool ro)
{
mAtTimeRadio->setReadOnly(ro);
if ( ro )
mDateEdit->setOptions( mDateEdit->options() & ~KDateComboBox::EditDate );
else
mDateEdit->setOptions( mDateEdit->options() | KDateComboBox::EditDate );
mDateEdit->setOptions(ro ? KDateComboBox::Options(0) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
mTimeEdit->setReadOnly(ro);
if (mAnyTimeCheckBox)
mAnyTimeCheckBox->setReadOnly(ro);
......
......@@ -281,10 +281,7 @@ RecurrenceEdit::RecurrenceEdit(bool readOnly, QWidget* parent)
"<para><note>This applies to the main recurrence only. It does not limit any sub-repetition which will occur regardless after the last main recurrence.</note></para>"));
mRangeButtonGroup->addButton(mEndDateButton);
mEndDateEdit = new KDateComboBox(mRangeButtonBox);
if ( mReadOnly )
mEndDateEdit->setOptions( mEndDateEdit->options() & ~KDateComboBox::EditDate );
else
mEndDateEdit->setOptions( mEndDateEdit->options() | KDateComboBox::EditDate );
mEndDateEdit->setOptions(mReadOnly ? KDateComboBox::Options(0) : KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker);
static const QString tzText = i18nc("@info/plain", "This uses the same time zone as the start time.");
mEndDateEdit->setWhatsThis(i18nc("@info:whatsthis",
"<para>Enter the last date to repeat the alarm.</para><para>%1</para>", tzText));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment