Commit 7b16bf24 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Quick commands delete dialog: use "delete" consistently, avoid Yes/No buttons

Also use KMessageBox::warningYesNo instead of the helper method
KMessageBox::messageBox.

Yes/No buttons in dialogs are discouraged (not only) by KDE HIG in favour
of actions terms.
parent 9d496ff1
Pipeline #202777 passed with stage
in 4 minutes and 8 seconds
......@@ -208,16 +208,11 @@ void QuickCommandsWidget::triggerDelete()
const auto idx = ui->commandsTreeView->currentIndex();
const QString text = idx.data(Qt::DisplayRole).toString();
const QString dialogMessage = ui->commandsTreeView->model()->rowCount(idx)
? i18n("You are about to remove the group %1,\n with multiple configurations, are you sure?", text)
: i18n("You are about to remove %1, are you sure?", text);
KMessageBox::ButtonCode result = KMessageBox::messageBox(this,
KMessageBox::DialogType::WarningYesNo,
dialogMessage,
i18n("Remove Quick Commands Configurations"),
KStandardGuiItem::yes(),
KStandardGuiItem::no(),
KStandardGuiItem::cancel());
? i18n("You are about to delete the group %1,\n with multiple configurations, are you sure?", text)
: i18n("You are about to delete %1, are you sure?", text);
int result =
KMessageBox::warningYesNo(this, dialogMessage, i18n("Delete Quick Commands Configurations"), KStandardGuiItem::del(), KStandardGuiItem::cancel());
if (result != KMessageBox::ButtonCode::Yes)
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment