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

src/views/dolphinview.cpp

index 5e7c63e82748979dd759b4a31070c8084b6420b1..0e97b856148f967100dc0f64389a6cb541743560 100644 (file)
@@ -995,7 +995,10 @@ void DolphinView::slotItemsActivated(const KItemSet &indexes)
 
     if (indexes.count() > 5) {
         QString question = i18np("Are you sure you want to open 1 item?", "Are you sure you want to open %1 items?", indexes.count());
-        const int answer = KMessageBox::warningYesNo(this, question);
+        const int answer = KMessageBox::warningYesNo(this, question, {},
+                                                     KGuiItem(i18ncp("@action:button", "Open %1 Item", "Open %1 Items", indexes.count()),
+                                                              QStringLiteral("document-open")),
+                                                     KStandardGuiItem::cancel());
         if (answer != KMessageBox::Yes) {
             return;
         }