From 3efcce3344947f1586a4dfd06176196fbdbeddc2 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Mon, 11 Jul 2022 14:58:51 +0200 Subject: [PATCH] Save warning confirm dialogs: avoid Yes/No buttons Yes/No buttons in dialogs are discouraged (not only) by KDE HIG in favour of actions terms. --- part/part.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/part/part.cpp b/part/part.cpp index 9572a16e2..0ac6aca04 100644 --- a/part/part.cpp +++ b/part/part.cpp @@ -2658,7 +2658,9 @@ bool Part::saveAs(const QUrl &saveUrl, SaveAsFlags flags) const int res = KMessageBox::warningYesNo( widget(), i18n("The current document is protected with a password.
In order to save, the file needs to be reloaded. You will be asked for the password again and your undo/redo history will be lost.
Do you want to continue?"), - i18n("Save - Warning")); + i18n("Save - Warning"), + KStandardGuiItem::cont(), + KStandardGuiItem::cancel()); switch (res) { case KMessageBox::Yes: @@ -2703,7 +2705,11 @@ bool Part::saveAs(const QUrl &saveUrl, SaveAsFlags flags) // Does the user want a .okular archive? if (flags & SaveAsOkularArchive) { if (!hasUserAcceptedReload && !m_document->canSwapBackingFile()) { - const int res = KMessageBox::warningYesNo(widget(), i18n("After saving, the current document format requires the file to be reloaded. Your undo/redo history will be lost.
Do you want to continue?"), i18n("Save - Warning")); + const int res = KMessageBox::warningYesNo(widget(), + i18n("After saving, the current document format requires the file to be reloaded. Your undo/redo history will be lost.
Do you want to continue?"), + i18n("Save - Warning"), + KStandardGuiItem::cont(), + KStandardGuiItem::cancel()); switch (res) { case KMessageBox::Yes: