mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
Unsupported archive extension dialog: 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
718e9d94e3
commit
dd8682ae8e
|
@ -2614,8 +2614,11 @@ bool Part::slotSaveFileAs(bool showOkularArchiveAsDefaultFormat)
|
|||
Q_ASSERT(okularArchiveMimeType.suffixes().at(0) == okularArchiveMimeType.preferredSuffix());
|
||||
const QString wantedExtension = QLatin1Char('.') + okularArchiveMimeType.preferredSuffix();
|
||||
if (!saveUrl.path().endsWith(wantedExtension)) {
|
||||
const auto button = KMessageBox::questionYesNo(
|
||||
widget(), i18n("You have chosen to save an Okular Archive without the file name ending with the '%1' extension. That is not allowed, do you want to choose a new name?", wantedExtension), i18n("Unsupported extension"));
|
||||
const auto button = KMessageBox::questionYesNo(widget(),
|
||||
i18n("You have chosen to save an Okular Archive without the file name ending with the '%1' extension. That is not allowed, do you want to choose a new name?", wantedExtension),
|
||||
i18n("Unsupported extension"),
|
||||
KGuiItem(i18nc("@action:button", "Choose New Name"), QStringLiteral("edit-rename")),
|
||||
KStandardGuiItem::cancel());
|
||||
|
||||
return button == KMessageBox::Yes ? slotSaveFileAs(showOkularArchiveAsDefaultFormat) : false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue