diff --git a/AUTHORS b/AUTHORS index a21771a..2ecec14 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,7 +4,7 @@ Upstream Authors: Copyright: Copyright (c) 2010-2012 Razor team - Copyright (c) 2012-2016 LXQt team + Copyright (c) 2012-2017 LXQt team License: GPL-2 and LGPL-2.1+ The full text of the licenses can be found in the 'LICENSE' file. diff --git a/CHANGELOG b/CHANGELOG index e880ef9..ebf9b09 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,44 @@ -lxqt-config-0.11.1 / 2017-01-01 +lxqt-config-0.12.0 / 2017-10-21 =============================== + * Set patch version + * Use $XDG_CONFIG_HOME/mimeapps.list for mime data instead of $XDG_DATA_HOME/applications/mimeapps.list (#129) + * Don't export github templates + * Update monitorsettingsdialog.ui + * lxqt-config-locale: corrected/reworded Save Changed Settings dialog + * Add/update *lt.desktop files + * lxq-config-monitor: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-config-locale: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-config-input: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-config-file-ass.: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-config-brightness: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-config-appearance: set Qt::AA_UseHighDpiPixmaps to true + * liblxqt-config-cursor: set Qt::AA_UseHighDpiPixmaps to true + * Added QCommandLineParser and basic cli interface to lxqt-config-monitor + * Added QCommandLineParser and basic cli interface to lxqt-config-locale + * Added QCommandLineParser and basic cli interface to lxqt-config-input + * Added QCommandLineParser and basic cli interface to lxqt-config-file-associations + * Added version info to lxqt-config-brightness cli + * Added QCommandLineParser and basic cli interface to lxqt-config-appearance + * Added QCommandLineParser and basic cli interface to lxqt-config + * Added LXQT_CONFIG_PATCH_VERSION + * Fixed typo in appearance_pl_PL.desktop (#124) + * i18n: added some *.desktop for Polish language + * Fixes (#121) + * appearance: Fix typo from @aca544479 + * lxqt-config-file-associations: Sets the initial focus (#120) + * appearance: Add icon FollowColorScheme configuration (#119) + * Show non-primary screens in UI. (#116) + * Removes unneeded include_directories() entry + * Fixes a FTBFS with CMake v3.8 + * Use const iterators + * Update AUTHORS + +0.11.1 / 2017-01-01 +=================== + + * Release 0.11.1: Update changelog * lxqt-config-monitor: remove unnecessary wait before settings load (#114) * Fix self icontheme update (#113) * liblxqt-config-cursor: Don't check for null pointer before deleting it diff --git a/CMakeLists.txt b/CMakeLists.txt index 3814b3f..8828c3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,13 +19,13 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTORCC ON) -find_package(Qt5Widgets REQUIRED QUIET) -find_package(Qt5DBus REQUIRED QUIET) -find_package(Qt5Xml REQUIRED QUIET) -find_package(Qt5Concurrent REQUIRED QUIET) -find_package(Qt5X11Extras REQUIRED QUIET) -find_package(Qt5LinguistTools REQUIRED QUIET) -find_package(lxqt REQUIRED QUIET) +find_package(Qt5Widgets REQUIRED) +find_package(Qt5DBus REQUIRED) +find_package(Qt5Xml REQUIRED) +find_package(Qt5Concurrent REQUIRED) +find_package(Qt5X11Extras REQUIRED) +find_package(Qt5LinguistTools REQUIRED) +find_package(lxqt REQUIRED) include(LXQtCompilerSettings NO_POLICY_SCOPE) @@ -33,6 +33,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() +# Patch Version +set(LXQT_CONFIG_PATCH_VERSION 0) + +set(LXQT_CONFIG_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_CONFIG_PATCH_VERSION}) +add_definitions("-DLXQT_CONFIG_VERSION=\"${LXQT_CONFIG_VERSION}\"") + include(LXQtTranslate) add_subdirectory(src) diff --git a/liblxqt-config-cursor/main.cpp b/liblxqt-config-cursor/main.cpp index 91afd83..2a5cb92 100644 --- a/liblxqt-config-cursor/main.cpp +++ b/liblxqt-config-cursor/main.cpp @@ -31,6 +31,8 @@ int main (int argc, char *argv[]) //QTextCodec::setCodecForLocale(QTextCodec::codecForName("koi8-r")); LXQt::Application app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + TRANSLATE_APP; //qDebug() << findDefaultTheme() << getCurrentTheme(); diff --git a/liblxqt-config-cursor/selectwnd.cpp b/liblxqt-config-cursor/selectwnd.cpp index e76840b..8a1fa18 100644 --- a/liblxqt-config-cursor/selectwnd.cpp +++ b/liblxqt-config-cursor/selectwnd.cpp @@ -13,6 +13,7 @@ #include #include "selectwnd.h" +#include "ui_selectwnd.h" #include #include @@ -37,22 +38,24 @@ #define HOME_ICON_DIR QDir::homePath() + "/.icons" -SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent), mSettings(settings) +SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) + : QWidget(parent), + mSettings(settings), + ui(new Ui::SelectWnd) { - setupUi(this); - - warningLabel->hide(); + ui->setupUi(this); + ui->warningLabel->hide(); mModel = new XCursorThemeModel(this); int size = style()->pixelMetric(QStyle::PM_LargeIconSize); - lbThemes->setModel(mModel); - lbThemes->setItemDelegate(new ItemDelegate(this)); - lbThemes->setIconSize(QSize(size, size)); - lbThemes->setSelectionMode(QAbstractItemView::SingleSelection); + ui->lbThemes->setModel(mModel); + ui->lbThemes->setItemDelegate(new ItemDelegate(this)); + ui->lbThemes->setIconSize(QSize(size, size)); + ui->lbThemes->setSelectionMode(QAbstractItemView::SingleSelection); // Make sure we find out about selection changes - connect(lbThemes->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), + connect(ui->lbThemes->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), SLOT(currentChanged(const QModelIndex &, const QModelIndex &))); // display/hide warning label connect(mModel, SIGNAL(modelReset()), @@ -62,15 +65,15 @@ SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent connect(mModel, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), this, SLOT(handleWarning())); - connect(warningLabel, SIGNAL(showDirInfo()), + connect(ui->warningLabel, SIGNAL(showDirInfo()), this, SLOT(showDirInfo())); // Disable the install button if we can't install new themes to ~/.icons, // or Xcursor isn't set up to look for cursor themes there - btInstall->setEnabled(mModel->searchPaths().contains(HOME_ICON_DIR) && iconsIsWritable()); + ui->btInstall->setEnabled(mModel->searchPaths().contains(HOME_ICON_DIR) && iconsIsWritable()); // TODO/FIXME: btInstall functionality - btInstall->hide(); - btRemove->hide(); + ui->btInstall->hide(); + ui->btRemove->hide(); //QTimer::singleShot(0, this, SLOT(setCurrent())); @@ -80,11 +83,12 @@ SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent SelectWnd::~SelectWnd() { + delete ui; } void SelectWnd::setCurrent() { - lbThemes->selectionModel()->clear(); + ui->lbThemes->selectionModel()->clear(); QString ct = getCurrentTheme(); mAppliedIndex = mModel->defaultIndex(); @@ -97,9 +101,9 @@ void SelectWnd::setCurrent() const XCursorThemeData *theme = mModel->theme(mAppliedIndex); // Select the current theme selectRow(mAppliedIndex); - lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter); + ui->lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter); // Update the preview widget as well - if (theme) preview->setTheme(*theme);// else preview->clearTheme(); + if (theme) ui->preview->setTheme(*theme);// else ui->preview->clearTheme(); } } @@ -123,8 +127,8 @@ void SelectWnd::selectRow(int row) const QModelIndex from = mModel->index(row, 0); QModelIndex to = mModel->index(row, mModel->columnCount()-1); QItemSelection selection(from, to); - lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select); - lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate); + ui->lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select); + ui->lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate); } void SelectWnd::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) @@ -133,16 +137,16 @@ void SelectWnd::currentChanged(const QModelIndex ¤t, const QModelIndex &pr if (current.isValid()) { const XCursorThemeData *theme = mModel->theme(current); if (theme) { - preview->setTheme(*theme); - btRemove->setEnabled(theme->isWritable()); + ui->preview->setTheme(*theme); + ui->btRemove->setEnabled(theme->isWritable()); } else { - preview->clearTheme(); + ui->preview->clearTheme(); } // directly apply the current settings applyCurrent(); } else { - preview->clearTheme(); + ui->preview->clearTheme(); } //emit changed(mAppliedIndex != current); } @@ -155,7 +159,7 @@ void SelectWnd::on_btInstall_clicked() void SelectWnd::applyCurrent() { //qDebug() << "'set' clicked"; - const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex()); + const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex()); if (!theme) return; applyTheme(*theme); fixXDefaults(theme->name()); @@ -200,7 +204,7 @@ void SelectWnd::applyCurrent() void SelectWnd::on_btRemove_clicked() { qDebug() << "'remove' clicked"; - const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex()); + const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex()); if (!theme) return; QString ct = getCurrentTheme(); if (ct == theme->name()) @@ -210,20 +214,20 @@ void SelectWnd::on_btRemove_clicked() return; } QDir d(theme->path()); - preview->clearTheme(); - mModel->removeTheme(lbThemes->currentIndex()); + ui->preview->clearTheme(); + mModel->removeTheme(ui->lbThemes->currentIndex()); removeXCursorTheme(d); } void SelectWnd::handleWarning() { bool empty = mModel->rowCount(); - warningLabel->setVisible(!empty); - preview->setVisible(empty); - infoLabel->setVisible(empty); + ui->warningLabel->setVisible(!empty); + ui->preview->setVisible(empty); + ui->infoLabel->setVisible(empty); } void SelectWnd::showDirInfo() { - QToolTip::showText(mapToGlobal(warningLabel->buttonPos()), mModel->searchPaths().join("\n")); + QToolTip::showText(mapToGlobal(ui->warningLabel->buttonPos()), mModel->searchPaths().join("\n")); } diff --git a/liblxqt-config-cursor/selectwnd.h b/liblxqt-config-cursor/selectwnd.h index c9bc428..200cfa0 100644 --- a/liblxqt-config-cursor/selectwnd.h +++ b/liblxqt-config-cursor/selectwnd.h @@ -15,16 +15,20 @@ #include #include +#include #include namespace LXQt { class Settings; } +namespace Ui { +class SelectWnd; +} + class XCursorThemeModel; -#include "ui_selectwnd.h" -class LXQT_API SelectWnd : public QWidget, private Ui_SelectWnd +class LXQT_API SelectWnd : public QWidget { Q_OBJECT @@ -55,6 +59,7 @@ private: XCursorThemeModel *mModel; QPersistentModelIndex mAppliedIndex; LXQt::Settings* mSettings; + Ui::SelectWnd *ui; }; #endif diff --git a/lxqt-config-appearance/CMakeLists.txt b/lxqt-config-appearance/CMakeLists.txt index e0e842c..b65bb09 100644 --- a/lxqt-config-appearance/CMakeLists.txt +++ b/lxqt-config-appearance/CMakeLists.txt @@ -3,7 +3,6 @@ project(lxqt-config-appearance) include_directories( ${Qt5Gui_PRIVATE_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor" - "${CMAKE_CURRENT_BINARY_DIR}/../liblxqt-config-cursor" ) set(H_FILES diff --git a/lxqt-config-appearance/iconthemeconfig.cpp b/lxqt-config-appearance/iconthemeconfig.cpp index faa1e03..fb15e9e 100644 --- a/lxqt-config-appearance/iconthemeconfig.cpp +++ b/lxqt-config-appearance/iconthemeconfig.cpp @@ -42,6 +42,9 @@ IconThemeConfig::IconThemeConfig(LXQt::Settings* settings, QWidget* parent): initControls(); connect(iconThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(iconThemeSelected(QTreeWidgetItem*,int))); + connect(iconFollowColorSchemeCB, &QAbstractButton::toggled, this, [this] (bool checked) { + m_settings->setValue("icon_follow_color_scheme", checked); + }); } @@ -126,6 +129,8 @@ void IconThemeConfig::initControls() ++it; } + iconFollowColorSchemeCB->setChecked(m_settings->value("icon_follow_color_scheme", true).toBool()); + update(); } diff --git a/lxqt-config-appearance/iconthemeconfig.ui b/lxqt-config-appearance/iconthemeconfig.ui index a32ab73..8777a3c 100644 --- a/lxqt-config-appearance/iconthemeconfig.ui +++ b/lxqt-config-appearance/iconthemeconfig.ui @@ -81,6 +81,16 @@ + + + + The KDE extension of XDG icon themes -> FollowsColorScheme + + + Colorize icons based on widget style (palette) + + + diff --git a/lxqt-config-appearance/lxqtthemeconfig.cpp b/lxqt-config-appearance/lxqtthemeconfig.cpp index 8b91893..45bcbfe 100644 --- a/lxqt-config-appearance/lxqtthemeconfig.cpp +++ b/lxqt-config-appearance/lxqtthemeconfig.cpp @@ -87,8 +87,8 @@ LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) : }); - QList themes = LXQt::LXQtTheme::allThemes(); - foreach(LXQt::LXQtTheme theme, themes) + const QList themes = LXQt::LXQtTheme::allThemes(); + foreach(const LXQt::LXQtTheme &theme, themes) { QString themeName = theme.name(); themeName[0] = themeName[0].toTitleCase(); diff --git a/lxqt-config-appearance/main.cpp b/lxqt-config-appearance/main.cpp index f0623d1..8319f91 100644 --- a/lxqt-config-appearance/main.cpp +++ b/lxqt-config-appearance/main.cpp @@ -29,6 +29,7 @@ #include #include +#include #include "iconthemeconfig.h" #include "lxqtthemeconfig.h" #include "styleconfig.h" @@ -39,6 +40,18 @@ int main (int argc, char **argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config Appearance")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + LXQt::Settings* settings = new LXQt::Settings("lxqt"); LXQt::Settings* sessionSettings = new LXQt::Settings("session"); LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Appearance Configuration"), settings); diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_lt.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_lt.desktop index a9f88d6..451fa64 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_lt.desktop +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_lt.desktop @@ -1,4 +1,4 @@ # Translations -Comment[lt]=Konfigūruoti LXQt darbalaukio išvaizdą -GenericName[lt]=LXQt išvaizdos konfigūravimas -Name[lt]=LXQt išvaizdos konfigūravimas +Comment[lt]=LXQt išvaizdos nustatymai +GenericName[lt]=Išvaizdos nustatymai +Name[lt]=Išvaizda diff --git a/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.desktop b/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.desktop index 2987540..45b7f9b 100644 --- a/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.desktop +++ b/lxqt-config-appearance/translations/lxqt-config-appearance_pl_PL.desktop @@ -1,4 +1,4 @@ # Translations -Comment[pl_PL]=Konfiguruj wylgąd pulpitu LXQt +Comment[pl_PL]=Konfiguruj wygląd pulpitu LXQt GenericName[pl_PL]=Konfiguracja wyglądu LXQt Name[pl_PL]=Konfiguracja wyglądu LXQt diff --git a/lxqt-config-brightness/brightnesssettings.cpp b/lxqt-config-brightness/brightnesssettings.cpp index 7b671c8..bd66f48 100644 --- a/lxqt-config-brightness/brightnesssettings.cpp +++ b/lxqt-config-brightness/brightnesssettings.cpp @@ -29,7 +29,7 @@ BrightnessSettings::BrightnessSettings(QWidget *parent):QDialog(parent) mBrightness = new XRandrBrightness(); mMonitors = mBrightness->getMonitorsInfo(); - for(MonitorInfo monitor: mMonitors) + for(const MonitorInfo &monitor: mMonitors) { OutputWidget *output = new OutputWidget(monitor, this); ui->layout->addWidget(output); diff --git a/lxqt-config-brightness/main.cpp b/lxqt-config-brightness/main.cpp index 5e56e8a..ccb6908 100644 --- a/lxqt-config-brightness/main.cpp +++ b/lxqt-config-brightness/main.cpp @@ -1,16 +1,16 @@ /* Copyright (C) 2016 P.L. Lucas - + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA @@ -25,9 +25,15 @@ int main(int argn, char* argv[]) { LXQt::SingleApplication app(argn, argv); - + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + // Command line options QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config Brightness")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); QCommandLineOption increaseOption(QStringList() << "i" << "icrease", app.tr("Increase brightness.")); parser.addOption(increaseOption); @@ -42,6 +48,7 @@ int main(int argn, char* argv[]) parser.addOption(decreaseOption); parser.addOption(setOption); parser.addOption(helpOption); + parser.addVersionOption(); parser.process(app); if( parser.isSet(increaseOption) || parser.isSet(decreaseOption) || parser.isSet(setOption) ) @@ -56,7 +63,6 @@ int main(int argn, char* argv[]) sign = 0.0; foreach(MonitorInfo monitor, monitors) { - if( monitor.isBacklightSupported() ) { long backlight = ( monitor.backlight() + sign*(monitor.backlightMax()/50 + 1) )*qAbs(sign) + brightness_value*monitor.backlightMax(); diff --git a/lxqt-config-brightness/translations/lxqt-config-brightness_lt.desktop b/lxqt-config-brightness/translations/lxqt-config-brightness_lt.desktop new file mode 100644 index 0000000..17fe957 --- /dev/null +++ b/lxqt-config-brightness/translations/lxqt-config-brightness_lt.desktop @@ -0,0 +1,4 @@ +# Translations +Comment[lt]=Konfigūruoti ryškumą +GenericName[lt]=Ryškumo nustatymai +Name[lt]=Ryškumas diff --git a/lxqt-config-brightness/translations/lxqt-config-brightness_pl.desktop b/lxqt-config-brightness/translations/lxqt-config-brightness_pl.desktop new file mode 100644 index 0000000..b8420d2 --- /dev/null +++ b/lxqt-config-brightness/translations/lxqt-config-brightness_pl.desktop @@ -0,0 +1,3 @@ +Name[pl]=Ustawienia jasności +GenericName[pl]=Ustawienia jasności wyświetlacza +Comment[pl]=Dostosuj jasność i kontrast wyświetlacza diff --git a/lxqt-config-brightness/xrandrbrightness.cpp b/lxqt-config-brightness/xrandrbrightness.cpp index 4a00c52..20d1310 100644 --- a/lxqt-config-brightness/xrandrbrightness.cpp +++ b/lxqt-config-brightness/xrandrbrightness.cpp @@ -394,7 +394,7 @@ void XRandrBrightness::setMonitorsSettings(QList monitors) float brightness_value = gamma_brightness_get(output); // Compare output info with settings and set it. - for(MonitorInfo monitor: monitors) + for(const MonitorInfo &monitor: monitors) { if(monitor.id() == (int)output && monitor.name() == name) { diff --git a/lxqt-config-file-associations/main.cpp b/lxqt-config-file-associations/main.cpp index 05e5b26..a2b04bb 100644 --- a/lxqt-config-file-associations/main.cpp +++ b/lxqt-config-file-associations/main.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -41,6 +42,17 @@ int main (int argc, char **argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config File Associations")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); MimetypeViewer mimetypeViewer; app.setActivationWindow(&mimetypeViewer); diff --git a/lxqt-config-file-associations/mimetypeviewer.cpp b/lxqt-config-file-associations/mimetypeviewer.cpp index 6c79efd..6277517 100644 --- a/lxqt-config-file-associations/mimetypeviewer.cpp +++ b/lxqt-config-file-associations/mimetypeviewer.cpp @@ -107,12 +107,13 @@ MimetypeViewer::MimetypeViewer(QWidget *parent) connect(widget.chooseApplicationsButton, SIGNAL(clicked()), this, SLOT(chooseApplication())); connect(widget.dialogButtonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonBoxClicked(QAbstractButton*))); - QString mimeappsListPath(XdgDirs::dataHome(true) + "/applications/mimeapps.list"); + QString mimeappsListPath(XdgDirs::configHome(true) + "/mimeapps.list"); mDefaultsList = new QSettings(mimeappsListPath, XdgDesktopFileCache::desktopFileSettingsFormat(), this); mSettingsCache = new LXQt::SettingsCache(mDefaultsList); mSettingsCache->loadFromSettings(); initializeMimetypeTreeView(); loadAllMimeTypes(); + widget.searchTermLineEdit->setFocus(); connect(widget.mimetypeTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(currentMimetypeChanged())); @@ -146,7 +147,6 @@ void MimetypeViewer::initializeMimetypeTreeView() { currentMimetypeChanged(); widget.mimetypeTreeWidget->setColumnCount(2); - widget.mimetypeTreeWidget->setFocus(); widget.searchTermLineEdit->setEnabled(true); } diff --git a/lxqt-config-file-associations/translations/lxqt-config-file-associations_lt.desktop b/lxqt-config-file-associations/translations/lxqt-config-file-associations_lt.desktop new file mode 100644 index 0000000..2d9638f --- /dev/null +++ b/lxqt-config-file-associations/translations/lxqt-config-file-associations_lt.desktop @@ -0,0 +1,4 @@ +# Translations +Name[lt]=Failų susiejimai +GenericName[lt]=Failų susiejimų nustatymai +Comment[lt]=Konfigūruoti su žinomais failų tipais susietas programas diff --git a/lxqt-config-input/CMakeLists.txt b/lxqt-config-input/CMakeLists.txt index e19386c..cad1b83 100644 --- a/lxqt-config-input/CMakeLists.txt +++ b/lxqt-config-input/CMakeLists.txt @@ -4,7 +4,6 @@ find_package(X11 REQUIRED) include_directories( ${X11_INCLUDE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor" - "${CMAKE_CURRENT_BINARY_DIR}/../liblxqt-config-cursor" ) set(lxqt-config-input_HDRS diff --git a/lxqt-config-input/keyboardlayoutconfig.cpp b/lxqt-config-input/keyboardlayoutconfig.cpp index 7c4c1c7..7bbe6a0 100644 --- a/lxqt-config-input/keyboardlayoutconfig.cpp +++ b/lxqt-config-input/keyboardlayoutconfig.cpp @@ -65,8 +65,8 @@ void KeyboardLayoutConfig::loadSettings() { variants = line.mid(8).trimmed().split(','); } else if(line.startsWith("options:")) { - QList options = line.mid(9).trimmed().split(','); - Q_FOREACH(QByteArray option, options) { + const QList options = line.mid(9).trimmed().split(','); + Q_FOREACH(const QByteArray &option, options) { if(option.startsWith("grp:")) switchKey_ = QString::fromLatin1(option); else diff --git a/lxqt-config-input/lxqt-config-input.cpp b/lxqt-config-input/lxqt-config-input.cpp index d10e980..379ceac 100644 --- a/lxqt-config-input/lxqt-config-input.cpp +++ b/lxqt-config-input/lxqt-config-input.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include "mouseconfig.h" #include "keyboardconfig.h" #include "../liblxqt-config-cursor/selectwnd.h" @@ -26,6 +27,17 @@ int main(int argc, char** argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config Input")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\n\nliblxqt: " LXQT_VERSION + "\nQt: " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); QByteArray configName = qgetenv("LXQT_SESSION_CONFIG"); if(configName.isEmpty()) diff --git a/lxqt-config-input/selectkeyboardlayoutdialog.cpp b/lxqt-config-input/selectkeyboardlayoutdialog.cpp index 3bd5ef1..edcd6a5 100644 --- a/lxqt-config-input/selectkeyboardlayoutdialog.cpp +++ b/lxqt-config-input/selectkeyboardlayoutdialog.cpp @@ -28,7 +28,7 @@ SelectKeyboardLayoutDialog::SelectKeyboardLayoutDialog(QMap< QString, KeyboardLa connect(ui.layouts, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(onLayoutChanged())); QMap::const_iterator it; - for(it = knownLayouts_.begin(); it != knownLayouts_.end(); ++it) { + for(it = knownLayouts_.constBegin(); it != knownLayouts_.constEnd(); ++it) { const QString& name = it.key(); const KeyboardLayoutInfo& info = *it; QListWidgetItem * item = new QListWidgetItem(info.description); diff --git a/lxqt-config-input/translations/lxqt-config-input_lt.desktop b/lxqt-config-input/translations/lxqt-config-input_lt.desktop new file mode 100644 index 0000000..706d6dd --- /dev/null +++ b/lxqt-config-input/translations/lxqt-config-input_lt.desktop @@ -0,0 +1,4 @@ +# Translations +Name[lt]=Klaviatūra ir pelė +GenericName[lt]=Įvedimo nustatymai +Comment[lt]=Konfigūruoti klaviatūrą, pelę ir kitus įvedimo įrenginius diff --git a/lxqt-config-locale/localeconfig.cpp b/lxqt-config-locale/localeconfig.cpp index 69cfd31..76ca2a7 100644 --- a/lxqt-config-locale/localeconfig.cpp +++ b/lxqt-config-locale/localeconfig.cpp @@ -306,7 +306,7 @@ void LocaleConfig::saveSettings() { QMessageBox msgBox; msgBox.setWindowTitle(tr("Format Settings Changed")); - msgBox.setText(tr("Save the settings ? (they will take effect the next time you log in)")); + msgBox.setText(tr("Do you want to save your changes? They will take effect the next time you log in.")); msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel); diff --git a/lxqt-config-locale/main.cpp b/lxqt-config-locale/main.cpp index 4123ad4..28dbc65 100644 --- a/lxqt-config-locale/main.cpp +++ b/lxqt-config-locale/main.cpp @@ -27,11 +27,24 @@ #include #include +#include #include "localeconfig.h" int main (int argc, char **argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config Locale")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + LXQt::Settings settings("lxqt-config-locale"); LXQt::Settings session_settings("session"); LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Locale Configuration"), &settings); @@ -49,4 +62,3 @@ int main (int argc, char **argv) return app.exec(); } - diff --git a/lxqt-config-locale/translations/lxqt-config-locale_lt.desktop b/lxqt-config-locale/translations/lxqt-config-locale_lt.desktop new file mode 100644 index 0000000..799f1de --- /dev/null +++ b/lxqt-config-locale/translations/lxqt-config-locale_lt.desktop @@ -0,0 +1,3 @@ +Name[lt]=Lokalė +GenericName[lt]=Lokalės nustatymai +Comment[lt]=LXQt lokalės nustatymai diff --git a/lxqt-config-locale/translations/lxqt-config-locale_pl.desktop b/lxqt-config-locale/translations/lxqt-config-locale_pl.desktop new file mode 100644 index 0000000..a9061fb --- /dev/null +++ b/lxqt-config-locale/translations/lxqt-config-locale_pl.desktop @@ -0,0 +1,3 @@ +Name[pl]=Region i język +GenericName[pl]=Ustawienia regionalne +Comment[pl]=Zmień region i język LXQt diff --git a/lxqt-config-monitor/main.cpp b/lxqt-config-monitor/main.cpp index fcfb96e..316b1d0 100644 --- a/lxqt-config-monitor/main.cpp +++ b/lxqt-config-monitor/main.cpp @@ -48,17 +48,24 @@ int main(int argc, char** argv) } LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); // Command line options QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config Monitor")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); QCommandLineOption loadOption(QStringList() << "l" << "loadlast", app.tr("Load last settings.")); parser.addOption(loadOption); QCommandLineOption helpOption = parser.addHelpOption(); parser.addOption(loadOption); - parser.addOption(helpOption); + parser.addVersionOption(); + parser.addHelpOption(); - //parser.process(app); + parser.process(app); //bool loadLastSettings = parser.isSet(loadOption); MonitorSettingsDialog dlg; diff --git a/lxqt-config-monitor/monitorpicture.cpp b/lxqt-config-monitor/monitorpicture.cpp index 3b5382c..05a8efb 100644 --- a/lxqt-config-monitor/monitorpicture.cpp +++ b/lxqt-config-monitor/monitorpicture.cpp @@ -35,8 +35,8 @@ static QSize sizeFromString(QString str) int x = str.indexOf('x'); if (x > 0) { - width = str.left(x).toInt(); - height = str.mid(x + 1).toInt(); + width = str.leftRef(x).toInt(); + height = str.midRef(x + 1).toInt(); } return QSize(width, height); } diff --git a/lxqt-config-monitor/monitorsettingsdialog.ui b/lxqt-config-monitor/monitorsettingsdialog.ui index 4d153cc..b48d4f6 100644 --- a/lxqt-config-monitor/monitorsettingsdialog.ui +++ b/lxqt-config-monitor/monitorsettingsdialog.ui @@ -56,7 +56,7 @@ - 300 + 350 0 diff --git a/lxqt-config-monitor/monitorwidget.cpp b/lxqt-config-monitor/monitorwidget.cpp index d4de216..de0ae12 100644 --- a/lxqt-config-monitor/monitorwidget.cpp +++ b/lxqt-config-monitor/monitorwidget.cpp @@ -154,6 +154,8 @@ MonitorWidget::MonitorWidget(KScreen::OutputPtr output, KScreen::ConfigPtr confi // Behavior chooser if (output->isPrimary()) ui.behaviorCombo->setCurrentIndex(PrimaryDisplay); + else + ui.behaviorCombo->setCurrentIndex(ExtendDisplay); // Insert orientations ui.orientationCombo->addItem(tr("None"), KScreen::Output::None); diff --git a/lxqt-config-monitor/translations/lxqt-config-monitor_lt.desktop b/lxqt-config-monitor/translations/lxqt-config-monitor_lt.desktop new file mode 100644 index 0000000..ae994ec --- /dev/null +++ b/lxqt-config-monitor/translations/lxqt-config-monitor_lt.desktop @@ -0,0 +1,4 @@ +# Translations +Name[lt]=Monitoriaus nustatymai +GenericName[lt]=Monitoriaus nustatymai +Comment[lt]=Konfigūruoti monitorius diff --git a/src/main.cpp b/src/main.cpp index a9644e6..abe16a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,6 +28,7 @@ #include #include #include "mainwindow.h" +#include "QCommandLineParser" int main(int argc, char **argv) @@ -37,6 +38,16 @@ int main(int argc, char **argv) app.setApplicationName(QStringLiteral("lxqt-config")); app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Config")); + const QString VERINFO = QStringLiteral(LXQT_CONFIG_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + // ensure that we use lxqt-config.menu file. qputenv("XDG_MENU_PREFIX", "lxqt-"); diff --git a/src/translations/lxqt-config_lt.desktop b/src/translations/lxqt-config_lt.desktop index 83453ac..708ef38 100644 --- a/src/translations/lxqt-config_lt.desktop +++ b/src/translations/lxqt-config_lt.desktop @@ -1,4 +1,4 @@ # Translations -Comment[lt]=Konfigūruoti LXQt modulius -GenericName[lt]=LXQt konfigūracija Name[lt]=LXQt konfigūravimo centras +GenericName[lt]=Sistemos nustatymai +Comment[lt]=Konfigūruoti savo sistemą