Allow to not ask again confirmation when opening 5 or more files or terminal at once

BUG: 473513
This commit is contained in:
Felix Ernst 2023-08-22 12:15:22 +00:00 committed by Méven Car
parent d27ee07de7
commit 11fb9344c0
2 changed files with 8 additions and 6 deletions

View file

@ -1189,11 +1189,12 @@ void DolphinMainWindow::openTerminalHere()
{}, {},
#endif #endif
KGuiItem(i18ncp("@action:button", "Open %1 Terminal", "Open %1 Terminals", urls.count()), QStringLiteral("utilities-terminal")), KGuiItem(i18ncp("@action:button", "Open %1 Terminal", "Open %1 Terminals", urls.count()), QStringLiteral("utilities-terminal")),
KStandardGuiItem::cancel()); KStandardGuiItem::cancel(),
QStringLiteral("ConfirmOpenManyTerminals"));
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) #if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (answer != KMessageBox::PrimaryAction) { if (answer != KMessageBox::PrimaryAction && answer != KMessageBox::Continue) {
#else #else
if (answer != KMessageBox::Yes) { if (answer != KMessageBox::Yes && answer != KMessageBox::Continue) {
#endif #endif
return; return;
} }

View file

@ -1093,11 +1093,12 @@ void DolphinView::slotItemsActivated(const KItemSet &indexes)
{}, {},
#endif #endif
KGuiItem(i18ncp("@action:button", "Open %1 Item", "Open %1 Items", indexes.count()), QStringLiteral("document-open")), KGuiItem(i18ncp("@action:button", "Open %1 Item", "Open %1 Items", indexes.count()), QStringLiteral("document-open")),
KStandardGuiItem::cancel()); KStandardGuiItem::cancel(),
QStringLiteral("ConfirmOpenManyFolders"));
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0) #if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 100, 0)
if (answer != KMessageBox::PrimaryAction) { if (answer != KMessageBox::PrimaryAction && answer != KMessageBox::Continue) {
#else #else
if (answer != KMessageBox::Yes) { if (answer != KMessageBox::Yes && answer != KMessageBox::Continue) {
#endif #endif
return; return;
} }