mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 22:23:43 +00:00
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.
This commit is contained in:
parent
dd44014b7a
commit
3efcce3344
|
@ -2658,7 +2658,9 @@ bool Part::saveAs(const QUrl &saveUrl, SaveAsFlags flags)
|
||||||
const int res = KMessageBox::warningYesNo(
|
const int res = KMessageBox::warningYesNo(
|
||||||
widget(),
|
widget(),
|
||||||
i18n("The current document is protected with a password.<br />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.<br />Do you want to continue?"),
|
i18n("The current document is protected with a password.<br />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.<br />Do you want to continue?"),
|
||||||
i18n("Save - Warning"));
|
i18n("Save - Warning"),
|
||||||
|
KStandardGuiItem::cont(),
|
||||||
|
KStandardGuiItem::cancel());
|
||||||
|
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case KMessageBox::Yes:
|
case KMessageBox::Yes:
|
||||||
|
@ -2703,7 +2705,11 @@ bool Part::saveAs(const QUrl &saveUrl, SaveAsFlags flags)
|
||||||
// Does the user want a .okular archive?
|
// Does the user want a .okular archive?
|
||||||
if (flags & SaveAsOkularArchive) {
|
if (flags & SaveAsOkularArchive) {
|
||||||
if (!hasUserAcceptedReload && !m_document->canSwapBackingFile()) {
|
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.<br />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.<br />Do you want to continue?"),
|
||||||
|
i18n("Save - Warning"),
|
||||||
|
KStandardGuiItem::cont(),
|
||||||
|
KStandardGuiItem::cancel());
|
||||||
|
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case KMessageBox::Yes:
|
case KMessageBox::Yes:
|
||||||
|
|
Loading…
Reference in a new issue