]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Open >5 terminals dialog: use action terms instead of Yes/No buttons
authorFriedrich W. H. Kossebau <kossebau@kde.org>
Sun, 3 Jul 2022 16:59:27 +0000 (18:59 +0200)
committerFriedrich W. H. Kossebau <kossebau@kde.org>
Wed, 13 Jul 2022 10:19:59 +0000 (10:19 +0000)
Yes/No buttons in dialogs are discouraged (not only) by KDE HIG in favour
of actions terms.

src/dolphinmainwindow.cpp

index 24da841326c0c9af97ce2129246c36d086d7886d..65c99329b652e989ba7181d667754baca07aa123 100644 (file)
@@ -1119,7 +1119,10 @@ void DolphinMainWindow::openTerminalHere()
     if (urls.count() > 5) {
         QString question = i18np("Are you sure you want to open 1 terminal window?",
                                  "Are you sure you want to open %1 terminal windows?", urls.count());
-        const int answer = KMessageBox::warningYesNo(this, question);
+        const int answer = KMessageBox::warningYesNo(this, question, {},
+                                                     KGuiItem(i18ncp("@action:button", "Open %1 Terminal", "Open %1 Terminals", urls.count()),
+                                                              QStringLiteral("utilities-terminal")),
+                                                     KStandardGuiItem::cancel());
         if (answer != KMessageBox::Yes) {
             return;
         }