Commit 841cc563 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use action terms instead of Yes/No buttons in dialogs

Yes/No buttons in dialogs are discouraged (not only) by KDE HIG
in favour of actions terms.
parent 6565ee45
Pipeline #252198 passed with stage
in 4 minutes and 11 seconds
......@@ -1118,9 +1118,11 @@ void Part::slotWatchedFileModified(const QString& file)
}
if (KMessageBox::questionYesNo(widget(),
xi18n("The file <filename>%1</filename> was modified. Do you want to update the archive?",
prettyFilename),
i18nc("@title:window", "File Modified")) == KMessageBox::Yes) {
xi18n("The file <filename>%1</filename> was modified. Do you want to update the archive?", prettyFilename),
i18nc("@title:window", "File Modified"),
KGuiItem(i18nc("@action:button", "Update"), QStringLiteral("view-refresh")),
KGuiItem(i18nc("@action:button", "Ignore"), QStringLiteral("dialog-cancel")))
== KMessageBox::Yes) {
QStringList list = QStringList() << file;
qCDebug(ARK) << "Updating file" << file << "with path" << relPath;
......@@ -1640,17 +1642,16 @@ void Part::slotDeleteFilesDone(KJob* job)
void Part::slotDeleteFiles()
{
const int selectionsCount = m_view->selectionModel()->selectedRows().count();
const auto reallyDelete =
KMessageBox::questionYesNo(widget(),
i18ncp("@info",
"Deleting this file is not undoable. Are you sure you want to do this?",
"Deleting these files is not undoable. Are you sure you want to do this?",
selectionsCount),
i18ncp("@title:window", "Delete File", "Delete Files", selectionsCount),
KStandardGuiItem::del(),
KStandardGuiItem::no(),
QString(),
KMessageBox::Dangerous | KMessageBox::Notify);
const auto reallyDelete = KMessageBox::questionYesNo(widget(),
i18ncp("@info",
"Deleting this file is not undoable. Are you sure you want to do this?",
"Deleting these files is not undoable. Are you sure you want to do this?",
selectionsCount),
i18ncp("@title:window", "Delete File", "Delete Files", selectionsCount),
KStandardGuiItem::del(),
KStandardGuiItem::cancel(),
QString(),
KMessageBox::Dangerous | KMessageBox::Notify);
if (reallyDelete == KMessageBox::No) {
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