From 4da703fa9dfcc16fc1e1c5448c58285c8c8f3577 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 26 Jan 2018 17:52:47 +0200 Subject: [PATCH] auto translate .ui files --add global Latte settings into new configuration window --- app/Messages.sh | 2 + app/layoutconfigdialog.cpp | 14 -- app/layoutconfigdialog.ui | 346 +++++++++++++++++++++++++++++++++++-- 3 files changed, 331 insertions(+), 31 deletions(-) diff --git a/app/Messages.sh b/app/Messages.sh index 990d148aa..c0b8c5556 100644 --- a/app/Messages.sh +++ b/app/Messages.sh @@ -1,2 +1,4 @@ #! /usr/bin/env bash +$EXTRACTRC `find . -name \*.rc -o -name \*.ui` >> rc.cpp + $XGETTEXT `find . ../shell -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/latte-dock.pot diff --git a/app/layoutconfigdialog.cpp b/app/layoutconfigdialog.cpp index 2a7a79f57..0a2b0dec5 100644 --- a/app/layoutconfigdialog.cpp +++ b/app/layoutconfigdialog.cpp @@ -106,25 +106,11 @@ LayoutConfigDialog::LayoutConfigDialog(QWidget *parent, LayoutManager *manager) ui->layoutsView->setItemDelegateForColumn(MENUCOLUMN, new CheckBoxDelegate(this)); ui->layoutsView->setItemDelegateForColumn(ACTIVITYCOLUMN, new ActivityCmbBoxDelegate(this)); - ui->newButton->setText(i18nc("new button", "New")); - ui->copyButton->setText(i18nc("copy button", "Copy")); - ui->removeButton->setText(i18nc("remove button", "Remove")); - ui->switchButton->setText(i18nc("switch button", "Switch")); - ui->importButton->setText(i18nc("import button", "Import")); - ui->exportButton->setText(i18nc("export button", "Export")); - ui->downloadButton->setText(i18nc("download button", "Download")); - - ui->singleToolBtn->setText(i18nc("single layout in memory", "Single")); - ui->singleToolBtn->setToolTip(i18n("Only one layout can be present in memory at all cases")); - ui->multipleToolBtn->setText(i18nc("multiple layouts in memory", "Multiple")); - ui->multipleToolBtn->setToolTip(i18n("Multiple layouts can be present in memory.")); - m_inMemoryButtons = new QButtonGroup(this); m_inMemoryButtons->addButton(ui->singleToolBtn, Latte::Dock::SingleLayout); m_inMemoryButtons->addButton(ui->multipleToolBtn, Latte::Dock::MultipleLayouts); m_inMemoryButtons->setExclusive(true); - connect(m_model, &QStandardItemModel::itemChanged, this, &LayoutConfigDialog::itemChanged); connect(ui->layoutsView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &LayoutConfigDialog::currentRowChanged); diff --git a/app/layoutconfigdialog.ui b/app/layoutconfigdialog.ui index 9346efdbb..bc4a5ef5e 100644 --- a/app/layoutconfigdialog.ui +++ b/app/layoutconfigdialog.ui @@ -17,13 +17,9 @@ - 0 + 1 - - - - .. - + Layouts @@ -53,8 +49,11 @@ 0 + + Only one layout can be present in memory at all cases + - Single + Single true @@ -63,8 +62,11 @@ + + Multiple layouts can be present in memory + - Multiple + Multiple true @@ -100,13 +102,13 @@ false - true + false true - true + false @@ -115,8 +117,11 @@ + + Switch to selected layout + - Switch + Switch @@ -172,7 +177,7 @@ - New + New @@ -183,7 +188,7 @@ - Copy + Copy @@ -197,7 +202,7 @@ - Remove + Remove @@ -267,8 +272,11 @@ + + Import layout or full configuration + - Import + Import @@ -281,8 +289,11 @@ + + Export layout of full configuration + - Export + Export @@ -292,8 +303,11 @@ + + Download online layouts + - Download + Download @@ -323,6 +337,304 @@ + + + + 0 + 0 + + + + Settings + + + + 9 + + + + + QFrame::NoFrame + + + 0 + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAlwaysOff + + + true + + + + + 0 + 0 + 786 + 494 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + + 0 + 0 + + + + + 75 + true + + + + Behavior + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Enable autostart during startup + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + + + Show informative window for layouts automatic switching + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 75 + true + + + + Mouse Sensitivity + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + + 0 + 0 + + + + Parabolic Effect + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 7 + 20 + + + + + + + + + + + 0 + 0 + + + + Low + + + + + + + + 0 + 0 + + + + Medium + + + + + + + + 0 + 0 + + + + + + + High + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + +