Commit d09a311a authored by Jonathan Marten's avatar Jonathan Marten Committed by Kurt Hindenburg
Browse files

Save/Load Tab Layout: Format text according to HIG

Title case for action text.
Add "..." to action text (a mandatory dialogue follows).
Action name as dialogue title.
parent 87e25c62
Pipeline #238748 passed with stage
in 2 minutes and 30 seconds
......@@ -373,7 +373,7 @@ void MainWindow::setupActions()
auto action = collection->addAction(QStringLiteral("save-layout"));
action->setEnabled(true);
action->setText(i18nc("@action:inmenu", "Save tab layout to file"));
action->setText(i18nc("@action:inmenu", "Save Tab Layout..."));
connect(action, &QAction::triggered, this, [this]() {
if (viewManager()) {
viewManager()->saveLayoutFile();
......@@ -382,7 +382,7 @@ void MainWindow::setupActions()
action = collection->addAction(QStringLiteral("load-layout"));
action->setEnabled(true);
action->setText(i18nc("@action:inmenu", "Load tab layout from file"));
action->setText(i18nc("@action:inmenu", "Load Tab Layout..."));
connect(action, &QAction::triggered, this, [this]() {
if (viewManager()) {
viewManager()->loadLayoutFile();
......
......@@ -1070,7 +1070,10 @@ QJsonObject saveSessionsRecurse(QSplitter *splitter)
void ViewManager::saveLayoutFile()
{
QString fileName(QFileDialog::getSaveFileName(this->widget(), i18nc("@title:window", "Save File"), QStringLiteral("~/"), i18nc("@item:inlistbox", "Konsole View Layout (*.json)")));
QString fileName(QFileDialog::getSaveFileName(this->widget(),
i18nc("@title:window", "Save Tab Layout"),
QStringLiteral("~/"),
i18nc("@item:inlistbox", "Konsole View Layout (*.json)")));
// User pressed cancel in dialog
if (fileName.isEmpty()) {
......@@ -1154,7 +1157,10 @@ void ViewManager::loadLayout(QString file)
}
void ViewManager::loadLayoutFile()
{
loadLayout(QFileDialog::getOpenFileName(this->widget(), i18nc("@title:window", "Open File"), QStringLiteral("~/"), i18nc("@item:inlistbox", "Konsole View Layout (*.json)")));
loadLayout(QFileDialog::getOpenFileName(this->widget(),
i18nc("@title:window", "Load Tab Layout"),
QStringLiteral("~/"),
i18nc("@item:inlistbox", "Konsole View Layout (*.json)")));
}
void ViewManager::restoreSessions(const KConfigGroup &group)
......
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