Commit ac133254 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Make Apply/Discard settings prompt consistent with rest of settings

When switching between shortcut categories with pending changes, a user would only be given the opportunity
to discard them or cancel out and save manually.
This makes it consistent with what System Settings usually offers, a Discard, Apply, and Cancel option

Differential Revision:
parent 1f87ba0e
......@@ -327,18 +327,30 @@ bool KCMHotkeysPrivate::maybeShowWidget(const QModelIndex &nextIndex)
// If the current widget is changed, ask user if switch is ok
if (current && (currentIndex != nextIndex) && current->isChanged())
int choice = KMessageBox::warningContinueCancel(
i18n("The current action has unsaved changes. If you continue these changes will be lost."),
i18n("Save changes") );
if (choice != KMessageBox::Continue)
const int choice = KMessageBox::warningYesNoCancel(
i18n("The current action has unsaved changes.\n"
"Do you want to apply the changes or discard them?"),
i18n("Save changes"),
switch (choice) {
case KMessageBox::Yes:
return true;
case KMessageBox::No:
return true;
case KMessageBox::Cancel:
return false;
return false;
// Apply the changes from the current item
return true;
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