Commit 7fdd9d20 authored by David Jarvie's avatar David Jarvie
Browse files

Only show 'Cancel Deferral' in defer dialogue if a deferral is already active

parent 42a85a69
......@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.5)
set(KDEPIM_VERSION_NUMBER "5.13.1")
set(PIM_VERSION ${KDEPIM_VERSION_NUMBER})
set(KDE_APPLICATIONS_VERSION "19.12.1")
set(KALARM_VERSION "2.13.0")
set(KALARM_VERSION "2.13.1")
project(kalarm VERSION ${KALARM_VERSION})
set(KALARM_FULL_VERSION "${KALARM_VERSION} (KDE Apps ${KDE_APPLICATIONS_VERSION})")
......
KAlarm Change Log
=== Version 2.13.1 (KDE Applications 19.12.1) --- 30 December 2019 ===
+ Only show 'Cancel Deferral' in defer dialogue if a deferral is already active.
=== Version 2.13.0 (KDE Applications 19.12) --- 19 November 2019 ===
+ Fix user not always being prompted to update new resource if in old format.
+ Terminate application after executing 'kalarm --list'.
......
......@@ -38,6 +38,11 @@
#include <QPushButton>
/******************************************************************************
* Constructor.
* If 'cancelButton' is true, the Cancel Deferral button will be shown to allow
* any existing deferral to be cancelled.
*/
DeferAlarmDlg::DeferAlarmDlg(const DateTime& initialDT, bool anyTimeOption, bool cancelButton, QWidget* parent)
: QDialog(parent)
{
......@@ -58,24 +63,24 @@ DeferAlarmDlg::DeferAlarmDlg(const DateTime& initialDT, bool anyTimeOption, bool
layout->addWidget(mButtonBox);
QPushButton* okButton = mButtonBox->addButton(QDialogButtonBox::Ok);
okButton->setWhatsThis(i18nc("@info:whatsthis", "Defer the alarm until the specified time."));
if (cancelButton)
mButtonBox->addButton(QDialogButtonBox::Cancel);
QPushButton* deferButton = mButtonBox->addButton(i18nc("@action:button", "Cancel Deferral"), QDialogButtonBox::ActionRole);
deferButton->setWhatsThis(i18nc("@info:whatsthis", "Cancel the deferred alarm. This does not affect future recurrences."));
mButtonBox->addButton(QDialogButtonBox::Cancel);
connect(mButtonBox, &QDialogButtonBox::accepted,
this, &DeferAlarmDlg::slotOk);
connect(mButtonBox, &QDialogButtonBox::rejected,
this, &QDialog::reject);
connect(mButtonBox, &QDialogButtonBox::clicked,
[this, deferButton](QAbstractButton* btn)
{
if (btn == deferButton)
slotCancelDeferral();
});
if (cancelButton)
{
QPushButton* deferButton = mButtonBox->addButton(i18nc("@action:button", "Cancel Deferral"), QDialogButtonBox::ActionRole);
deferButton->setWhatsThis(i18nc("@info:whatsthis", "Cancel the deferred alarm. This does not affect future recurrences."));
connect(mButtonBox, &QDialogButtonBox::clicked,
[this, deferButton](QAbstractButton* btn)
{
if (btn == deferButton)
slotCancelDeferral();
});
}
}
/******************************************************************************
* Called when the OK button is clicked.
*/
......
Supports Markdown
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