Commit 4b203b95 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau Committed by Christoph Cullmann
Browse files

Session already opened dialog: avoid Yes/No buttons

Yes/No buttons are discouraged by KDE HIG in favour of action terms
parent bfdfdcd5
Pipeline #199113 canceled with stage
......@@ -107,12 +107,13 @@ bool KateSessionManager::activateSession(KateSession::Ptr session, const bool cl
}
if (instances.find(session->name()) != instances.end()) {
if (KMessageBox::questionYesNo(nullptr,
i18n("Session '%1' is already opened in another kate instance, change there instead of reopening?", session->name()),
QString(),
KStandardGuiItem::yes(),
KStandardGuiItem::no(),
QStringLiteral("katesessionmanager_switch_instance"))
if (KMessageBox::questionYesNo(
nullptr,
i18n("Session '%1' is already opened in another Kate instance. Switch to that or reopen in this instance?", session->name()),
QString(),
KGuiItem(i18nc("@action:button", "Switch to Instance"), QStringLiteral("window")),
KGuiItem(i18nc("@action:button", "Reopen"), QStringLiteral("document-open")),
QStringLiteral("katesessionmanager_switch_instance"))
== KMessageBox::Yes) {
instances[session->name()].dbus_if->call(QStringLiteral("activate"));
return false;
......
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