Cherry-picking upstream version 0.12.0.

ubuntu/cosmic
Alf Gaida 7 years ago
parent 65b8a7e03f
commit 7611e3375f

@ -4,7 +4,7 @@ Upstream Authors:
Copyright: Copyright:
Copyright (c) 2010-2012 Razor team 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+ License: GPL-2 and LGPL-2.1+
The full text of the licenses can be found in the 'LICENSE' file. The full text of the licenses can be found in the 'LICENSE' file.

@ -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) * lxqt-config-monitor: remove unnecessary wait before settings load (#114)
* Fix self icontheme update (#113) * Fix self icontheme update (#113)
* liblxqt-config-cursor: Don't check for null pointer before deleting it * liblxqt-config-cursor: Don't check for null pointer before deleting it

@ -19,13 +19,13 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON) set(CMAKE_AUTORCC ON)
find_package(Qt5Widgets REQUIRED QUIET) find_package(Qt5Widgets REQUIRED)
find_package(Qt5DBus REQUIRED QUIET) find_package(Qt5DBus REQUIRED)
find_package(Qt5Xml REQUIRED QUIET) find_package(Qt5Xml REQUIRED)
find_package(Qt5Concurrent REQUIRED QUIET) find_package(Qt5Concurrent REQUIRED)
find_package(Qt5X11Extras REQUIRED QUIET) find_package(Qt5X11Extras REQUIRED)
find_package(Qt5LinguistTools REQUIRED QUIET) find_package(Qt5LinguistTools REQUIRED)
find_package(lxqt REQUIRED QUIET) find_package(lxqt REQUIRED)
include(LXQtCompilerSettings NO_POLICY_SCOPE) include(LXQtCompilerSettings NO_POLICY_SCOPE)
@ -33,6 +33,12 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) set(CMAKE_BUILD_TYPE Release)
endif() 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) include(LXQtTranslate)
add_subdirectory(src) add_subdirectory(src)

@ -31,6 +31,8 @@ int main (int argc, char *argv[])
//QTextCodec::setCodecForLocale(QTextCodec::codecForName("koi8-r")); //QTextCodec::setCodecForLocale(QTextCodec::codecForName("koi8-r"));
LXQt::Application app(argc, argv); LXQt::Application app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
TRANSLATE_APP; TRANSLATE_APP;
//qDebug() << findDefaultTheme() << getCurrentTheme(); //qDebug() << findDefaultTheme() << getCurrentTheme();

@ -13,6 +13,7 @@
#include <QDebug> #include <QDebug>
#include "selectwnd.h" #include "selectwnd.h"
#include "ui_selectwnd.h"
#include <QKeyEvent> #include <QKeyEvent>
#include <QMessageBox> #include <QMessageBox>
@ -37,22 +38,24 @@
#define HOME_ICON_DIR QDir::homePath() + "/.icons" #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); ui->setupUi(this);
ui->warningLabel->hide();
warningLabel->hide();
mModel = new XCursorThemeModel(this); mModel = new XCursorThemeModel(this);
int size = style()->pixelMetric(QStyle::PM_LargeIconSize); int size = style()->pixelMetric(QStyle::PM_LargeIconSize);
lbThemes->setModel(mModel); ui->lbThemes->setModel(mModel);
lbThemes->setItemDelegate(new ItemDelegate(this)); ui->lbThemes->setItemDelegate(new ItemDelegate(this));
lbThemes->setIconSize(QSize(size, size)); ui->lbThemes->setIconSize(QSize(size, size));
lbThemes->setSelectionMode(QAbstractItemView::SingleSelection); ui->lbThemes->setSelectionMode(QAbstractItemView::SingleSelection);
// Make sure we find out about selection changes // 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 &))); SLOT(currentChanged(const QModelIndex &, const QModelIndex &)));
// display/hide warning label // display/hide warning label
connect(mModel, SIGNAL(modelReset()), 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)), connect(mModel, SIGNAL(rowsRemoved(const QModelIndex&, int, int)),
this, SLOT(handleWarning())); this, SLOT(handleWarning()));
connect(warningLabel, SIGNAL(showDirInfo()), connect(ui->warningLabel, SIGNAL(showDirInfo()),
this, SLOT(showDirInfo())); this, SLOT(showDirInfo()));
// Disable the install button if we can't install new themes to ~/.icons, // 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 // 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 // TODO/FIXME: btInstall functionality
btInstall->hide(); ui->btInstall->hide();
btRemove->hide(); ui->btRemove->hide();
//QTimer::singleShot(0, this, SLOT(setCurrent())); //QTimer::singleShot(0, this, SLOT(setCurrent()));
@ -80,11 +83,12 @@ SelectWnd::SelectWnd(LXQt::Settings* settings, QWidget *parent) : QWidget(parent
SelectWnd::~SelectWnd() SelectWnd::~SelectWnd()
{ {
delete ui;
} }
void SelectWnd::setCurrent() void SelectWnd::setCurrent()
{ {
lbThemes->selectionModel()->clear(); ui->lbThemes->selectionModel()->clear();
QString ct = getCurrentTheme(); QString ct = getCurrentTheme();
mAppliedIndex = mModel->defaultIndex(); mAppliedIndex = mModel->defaultIndex();
@ -97,9 +101,9 @@ void SelectWnd::setCurrent()
const XCursorThemeData *theme = mModel->theme(mAppliedIndex); const XCursorThemeData *theme = mModel->theme(mAppliedIndex);
// Select the current theme // Select the current theme
selectRow(mAppliedIndex); selectRow(mAppliedIndex);
lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter); ui->lbThemes->scrollTo(mAppliedIndex, QListView::PositionAtCenter);
// Update the preview widget as well // 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 from = mModel->index(row, 0);
QModelIndex to = mModel->index(row, mModel->columnCount()-1); QModelIndex to = mModel->index(row, mModel->columnCount()-1);
QItemSelection selection(from, to); QItemSelection selection(from, to);
lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select); ui->lbThemes->selectionModel()->select(selection, QItemSelectionModel::Select);
lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate); ui->lbThemes->selectionModel()->setCurrentIndex(mAppliedIndex, QItemSelectionModel::NoUpdate);
} }
void SelectWnd::currentChanged(const QModelIndex &current, const QModelIndex &previous) void SelectWnd::currentChanged(const QModelIndex &current, const QModelIndex &previous)
@ -133,16 +137,16 @@ void SelectWnd::currentChanged(const QModelIndex &current, const QModelIndex &pr
if (current.isValid()) { if (current.isValid()) {
const XCursorThemeData *theme = mModel->theme(current); const XCursorThemeData *theme = mModel->theme(current);
if (theme) { if (theme) {
preview->setTheme(*theme); ui->preview->setTheme(*theme);
btRemove->setEnabled(theme->isWritable()); ui->btRemove->setEnabled(theme->isWritable());
} else { } else {
preview->clearTheme(); ui->preview->clearTheme();
} }
// directly apply the current settings // directly apply the current settings
applyCurrent(); applyCurrent();
} else { } else {
preview->clearTheme(); ui->preview->clearTheme();
} }
//emit changed(mAppliedIndex != current); //emit changed(mAppliedIndex != current);
} }
@ -155,7 +159,7 @@ void SelectWnd::on_btInstall_clicked()
void SelectWnd::applyCurrent() void SelectWnd::applyCurrent()
{ {
//qDebug() << "'set' clicked"; //qDebug() << "'set' clicked";
const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex()); const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex());
if (!theme) return; if (!theme) return;
applyTheme(*theme); applyTheme(*theme);
fixXDefaults(theme->name()); fixXDefaults(theme->name());
@ -200,7 +204,7 @@ void SelectWnd::applyCurrent()
void SelectWnd::on_btRemove_clicked() void SelectWnd::on_btRemove_clicked()
{ {
qDebug() << "'remove' clicked"; qDebug() << "'remove' clicked";
const XCursorThemeData *theme = mModel->theme(lbThemes->currentIndex()); const XCursorThemeData *theme = mModel->theme(ui->lbThemes->currentIndex());
if (!theme) return; if (!theme) return;
QString ct = getCurrentTheme(); QString ct = getCurrentTheme();
if (ct == theme->name()) if (ct == theme->name())
@ -210,20 +214,20 @@ void SelectWnd::on_btRemove_clicked()
return; return;
} }
QDir d(theme->path()); QDir d(theme->path());
preview->clearTheme(); ui->preview->clearTheme();
mModel->removeTheme(lbThemes->currentIndex()); mModel->removeTheme(ui->lbThemes->currentIndex());
removeXCursorTheme(d); removeXCursorTheme(d);
} }
void SelectWnd::handleWarning() void SelectWnd::handleWarning()
{ {
bool empty = mModel->rowCount(); bool empty = mModel->rowCount();
warningLabel->setVisible(!empty); ui->warningLabel->setVisible(!empty);
preview->setVisible(empty); ui->preview->setVisible(empty);
infoLabel->setVisible(empty); ui->infoLabel->setVisible(empty);
} }
void SelectWnd::showDirInfo() void SelectWnd::showDirInfo()
{ {
QToolTip::showText(mapToGlobal(warningLabel->buttonPos()), mModel->searchPaths().join("\n")); QToolTip::showText(mapToGlobal(ui->warningLabel->buttonPos()), mModel->searchPaths().join("\n"));
} }

@ -15,16 +15,20 @@
#include <QObject> #include <QObject>
#include <QWidget> #include <QWidget>
#include <QPersistentModelIndex>
#include <lxqtglobals.h> #include <lxqtglobals.h>
namespace LXQt { namespace LXQt {
class Settings; class Settings;
} }
namespace Ui {
class SelectWnd;
}
class XCursorThemeModel; class XCursorThemeModel;
#include "ui_selectwnd.h" class LXQT_API SelectWnd : public QWidget
class LXQT_API SelectWnd : public QWidget, private Ui_SelectWnd
{ {
Q_OBJECT Q_OBJECT
@ -55,6 +59,7 @@ private:
XCursorThemeModel *mModel; XCursorThemeModel *mModel;
QPersistentModelIndex mAppliedIndex; QPersistentModelIndex mAppliedIndex;
LXQt::Settings* mSettings; LXQt::Settings* mSettings;
Ui::SelectWnd *ui;
}; };
#endif #endif

@ -3,7 +3,6 @@ project(lxqt-config-appearance)
include_directories( include_directories(
${Qt5Gui_PRIVATE_INCLUDE_DIRS} ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor" "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor"
"${CMAKE_CURRENT_BINARY_DIR}/../liblxqt-config-cursor"
) )
set(H_FILES set(H_FILES

@ -42,6 +42,9 @@ IconThemeConfig::IconThemeConfig(LXQt::Settings* settings, QWidget* parent):
initControls(); initControls();
connect(iconThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), connect(iconThemeList, SIGNAL(itemClicked(QTreeWidgetItem*,int)),
this, SLOT(iconThemeSelected(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; ++it;
} }
iconFollowColorSchemeCB->setChecked(m_settings->value("icon_follow_color_scheme", true).toBool());
update(); update();
} }

@ -81,6 +81,16 @@
</column> </column>
</widget> </widget>
</item> </item>
<item>
<widget class="QCheckBox" name="iconFollowColorSchemeCB">
<property name="toolTip">
<string>The KDE extension of XDG icon themes -&gt; FollowsColorScheme</string>
</property>
<property name="text">
<string>Colorize icons based on widget style (palette)</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources/> <resources/>

@ -87,8 +87,8 @@ LXQtThemeConfig::LXQtThemeConfig(LXQt::Settings *settings, QWidget *parent) :
}); });
QList<LXQt::LXQtTheme> themes = LXQt::LXQtTheme::allThemes(); const QList<LXQt::LXQtTheme> themes = LXQt::LXQtTheme::allThemes();
foreach(LXQt::LXQtTheme theme, themes) foreach(const LXQt::LXQtTheme &theme, themes)
{ {
QString themeName = theme.name(); QString themeName = theme.name();
themeName[0] = themeName[0].toTitleCase(); themeName[0] = themeName[0].toTitleCase();

@ -29,6 +29,7 @@
#include <LXQt/Settings> #include <LXQt/Settings>
#include <LXQt/ConfigDialog> #include <LXQt/ConfigDialog>
#include <QCommandLineParser>
#include "iconthemeconfig.h" #include "iconthemeconfig.h"
#include "lxqtthemeconfig.h" #include "lxqtthemeconfig.h"
#include "styleconfig.h" #include "styleconfig.h"
@ -39,6 +40,18 @@
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
LXQt::SingleApplication app(argc, 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* settings = new LXQt::Settings("lxqt");
LXQt::Settings* sessionSettings = new LXQt::Settings("session"); LXQt::Settings* sessionSettings = new LXQt::Settings("session");
LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Appearance Configuration"), settings); LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Appearance Configuration"), settings);

@ -1,4 +1,4 @@
# Translations # Translations
Comment[lt]=Konfigūruoti LXQt darbalaukio išvaizdą Comment[lt]=LXQt išvaizdos nustatymai
GenericName[lt]=LXQt išvaizdos konfigūravimas GenericName[lt]=Išvaizdos nustatymai
Name[lt]=LXQt išvaizdos konfigūravimas Name[lt]=Išvaizda

@ -1,4 +1,4 @@
# Translations # Translations
Comment[pl_PL]=Konfiguruj wylgąd pulpitu LXQt Comment[pl_PL]=Konfiguruj wygląd pulpitu LXQt
GenericName[pl_PL]=Konfiguracja wyglądu LXQt GenericName[pl_PL]=Konfiguracja wyglądu LXQt
Name[pl_PL]=Konfiguracja wyglądu LXQt Name[pl_PL]=Konfiguracja wyglądu LXQt

@ -29,7 +29,7 @@ BrightnessSettings::BrightnessSettings(QWidget *parent):QDialog(parent)
mBrightness = new XRandrBrightness(); mBrightness = new XRandrBrightness();
mMonitors = mBrightness->getMonitorsInfo(); mMonitors = mBrightness->getMonitorsInfo();
for(MonitorInfo monitor: mMonitors) for(const MonitorInfo &monitor: mMonitors)
{ {
OutputWidget *output = new OutputWidget(monitor, this); OutputWidget *output = new OutputWidget(monitor, this);
ui->layout->addWidget(output); ui->layout->addWidget(output);

@ -25,9 +25,15 @@
int main(int argn, char* argv[]) int main(int argn, char* argv[])
{ {
LXQt::SingleApplication app(argn, argv); LXQt::SingleApplication app(argn, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
// Command line options // Command line options
QCommandLineParser parser; 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", QCommandLineOption increaseOption(QStringList() << "i" << "icrease",
app.tr("Increase brightness.")); app.tr("Increase brightness."));
parser.addOption(increaseOption); parser.addOption(increaseOption);
@ -42,6 +48,7 @@ int main(int argn, char* argv[])
parser.addOption(decreaseOption); parser.addOption(decreaseOption);
parser.addOption(setOption); parser.addOption(setOption);
parser.addOption(helpOption); parser.addOption(helpOption);
parser.addVersionOption();
parser.process(app); parser.process(app);
if( parser.isSet(increaseOption) || parser.isSet(decreaseOption) || parser.isSet(setOption) ) if( parser.isSet(increaseOption) || parser.isSet(decreaseOption) || parser.isSet(setOption) )
@ -56,7 +63,6 @@ int main(int argn, char* argv[])
sign = 0.0; sign = 0.0;
foreach(MonitorInfo monitor, monitors) foreach(MonitorInfo monitor, monitors)
{ {
if( monitor.isBacklightSupported() ) if( monitor.isBacklightSupported() )
{ {
long backlight = ( monitor.backlight() + sign*(monitor.backlightMax()/50 + 1) )*qAbs(sign) + brightness_value*monitor.backlightMax(); long backlight = ( monitor.backlight() + sign*(monitor.backlightMax()/50 + 1) )*qAbs(sign) + brightness_value*monitor.backlightMax();

@ -0,0 +1,4 @@
# Translations
Comment[lt]=Konfigūruoti ryškumą
GenericName[lt]=Ryškumo nustatymai
Name[lt]=Ryškumas

@ -0,0 +1,3 @@
Name[pl]=Ustawienia jasności
GenericName[pl]=Ustawienia jasności wyświetlacza
Comment[pl]=Dostosuj jasność i kontrast wyświetlacza

@ -394,7 +394,7 @@ void XRandrBrightness::setMonitorsSettings(QList<MonitorInfo> monitors)
float brightness_value = gamma_brightness_get(output); float brightness_value = gamma_brightness_get(output);
// Compare output info with settings and set it. // 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) if(monitor.id() == (int)output && monitor.name() == name)
{ {

@ -32,6 +32,7 @@
#include <QIODevice> #include <QIODevice>
#include <QSettings> #include <QSettings>
#include <QVariant> #include <QVariant>
#include <QCommandLineParser>
#include <LXQt/Settings> #include <LXQt/Settings>
#include <XdgDesktopFile> #include <XdgDesktopFile>
@ -41,6 +42,17 @@
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
LXQt::SingleApplication app(argc, 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; MimetypeViewer mimetypeViewer;
app.setActivationWindow(&mimetypeViewer); app.setActivationWindow(&mimetypeViewer);

@ -107,12 +107,13 @@ MimetypeViewer::MimetypeViewer(QWidget *parent)
connect(widget.chooseApplicationsButton, SIGNAL(clicked()), this, SLOT(chooseApplication())); connect(widget.chooseApplicationsButton, SIGNAL(clicked()), this, SLOT(chooseApplication()));
connect(widget.dialogButtonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(dialogButtonBoxClicked(QAbstractButton*))); 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); mDefaultsList = new QSettings(mimeappsListPath, XdgDesktopFileCache::desktopFileSettingsFormat(), this);
mSettingsCache = new LXQt::SettingsCache(mDefaultsList); mSettingsCache = new LXQt::SettingsCache(mDefaultsList);
mSettingsCache->loadFromSettings(); mSettingsCache->loadFromSettings();
initializeMimetypeTreeView(); initializeMimetypeTreeView();
loadAllMimeTypes(); loadAllMimeTypes();
widget.searchTermLineEdit->setFocus();
connect(widget.mimetypeTreeWidget, SIGNAL(itemSelectionChanged()), connect(widget.mimetypeTreeWidget, SIGNAL(itemSelectionChanged()),
this, SLOT(currentMimetypeChanged())); this, SLOT(currentMimetypeChanged()));
@ -146,7 +147,6 @@ void MimetypeViewer::initializeMimetypeTreeView()
{ {
currentMimetypeChanged(); currentMimetypeChanged();
widget.mimetypeTreeWidget->setColumnCount(2); widget.mimetypeTreeWidget->setColumnCount(2);
widget.mimetypeTreeWidget->setFocus();
widget.searchTermLineEdit->setEnabled(true); widget.searchTermLineEdit->setEnabled(true);
} }

@ -0,0 +1,4 @@
# Translations
Name[lt]=Failų susiejimai
GenericName[lt]=Failų susiejimų nustatymai
Comment[lt]=Konfigūruoti su žinomais failų tipais susietas programas

@ -4,7 +4,6 @@ find_package(X11 REQUIRED)
include_directories( include_directories(
${X11_INCLUDE_DIR} ${X11_INCLUDE_DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor" "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor"
"${CMAKE_CURRENT_BINARY_DIR}/../liblxqt-config-cursor"
) )
set(lxqt-config-input_HDRS set(lxqt-config-input_HDRS

@ -65,8 +65,8 @@ void KeyboardLayoutConfig::loadSettings() {
variants = line.mid(8).trimmed().split(','); variants = line.mid(8).trimmed().split(',');
} }
else if(line.startsWith("options:")) { else if(line.startsWith("options:")) {
QList<QByteArray> options = line.mid(9).trimmed().split(','); const QList<QByteArray> options = line.mid(9).trimmed().split(',');
Q_FOREACH(QByteArray option, options) { Q_FOREACH(const QByteArray &option, options) {
if(option.startsWith("grp:")) if(option.startsWith("grp:"))
switchKey_ = QString::fromLatin1(option); switchKey_ = QString::fromLatin1(option);
else else

@ -19,6 +19,7 @@
#include <LXQt/SingleApplication> #include <LXQt/SingleApplication>
#include <LXQt/ConfigDialog> #include <LXQt/ConfigDialog>
#include <LXQt/Settings> #include <LXQt/Settings>
#include <QCommandLineParser>
#include "mouseconfig.h" #include "mouseconfig.h"
#include "keyboardconfig.h" #include "keyboardconfig.h"
#include "../liblxqt-config-cursor/selectwnd.h" #include "../liblxqt-config-cursor/selectwnd.h"
@ -26,6 +27,17 @@
int main(int argc, char** argv) { int main(int argc, char** argv) {
LXQt::SingleApplication app(argc, 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"); QByteArray configName = qgetenv("LXQT_SESSION_CONFIG");
if(configName.isEmpty()) if(configName.isEmpty())

@ -28,7 +28,7 @@ SelectKeyboardLayoutDialog::SelectKeyboardLayoutDialog(QMap< QString, KeyboardLa
connect(ui.layouts, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(onLayoutChanged())); connect(ui.layouts, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(onLayoutChanged()));
QMap<QString, KeyboardLayoutInfo >::const_iterator it; QMap<QString, KeyboardLayoutInfo >::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 QString& name = it.key();
const KeyboardLayoutInfo& info = *it; const KeyboardLayoutInfo& info = *it;
QListWidgetItem * item = new QListWidgetItem(info.description); QListWidgetItem * item = new QListWidgetItem(info.description);

@ -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

@ -306,7 +306,7 @@ void LocaleConfig::saveSettings()
{ {
QMessageBox msgBox; QMessageBox msgBox;
msgBox.setWindowTitle(tr("Format Settings Changed")); 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.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel); msgBox.setDefaultButton(QMessageBox::Cancel);

@ -27,11 +27,24 @@
#include <LXQt/Settings> #include <LXQt/Settings>
#include <LXQt/ConfigDialog> #include <LXQt/ConfigDialog>
#include <QCommandLineParser>
#include "localeconfig.h" #include "localeconfig.h"
int main (int argc, char **argv) int main (int argc, char **argv)
{ {
LXQt::SingleApplication app(argc, 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 settings("lxqt-config-locale");
LXQt::Settings session_settings("session"); LXQt::Settings session_settings("session");
LXQt::ConfigDialog* dialog = new LXQt::ConfigDialog(QObject::tr("LXQt Locale Configuration"), &settings); 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(); return app.exec();
} }

@ -0,0 +1,3 @@
Name[lt]=Lokalė
GenericName[lt]=Lokalės nustatymai
Comment[lt]=LXQt lokalės nustatymai

@ -0,0 +1,3 @@
Name[pl]=Region i język
GenericName[pl]=Ustawienia regionalne
Comment[pl]=Zmień region i język LXQt

@ -48,17 +48,24 @@ int main(int argc, char** argv)
} }
LXQt::SingleApplication app(argc, argv); LXQt::SingleApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
// Command line options // Command line options
QCommandLineParser parser; 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", QCommandLineOption loadOption(QStringList() << "l" << "loadlast",
app.tr("Load last settings.")); app.tr("Load last settings."));
parser.addOption(loadOption); parser.addOption(loadOption);
QCommandLineOption helpOption = parser.addHelpOption(); QCommandLineOption helpOption = parser.addHelpOption();
parser.addOption(loadOption); parser.addOption(loadOption);
parser.addOption(helpOption); parser.addVersionOption();
parser.addHelpOption();
//parser.process(app); parser.process(app);
//bool loadLastSettings = parser.isSet(loadOption); //bool loadLastSettings = parser.isSet(loadOption);
MonitorSettingsDialog dlg; MonitorSettingsDialog dlg;

@ -35,8 +35,8 @@ static QSize sizeFromString(QString str)
int x = str.indexOf('x'); int x = str.indexOf('x');
if (x > 0) if (x > 0)
{ {
width = str.left(x).toInt(); width = str.leftRef(x).toInt();
height = str.mid(x + 1).toInt(); height = str.midRef(x + 1).toInt();
} }
return QSize(width, height); return QSize(width, height);
} }

@ -56,7 +56,7 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>300</width> <width>350</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>

@ -154,6 +154,8 @@ MonitorWidget::MonitorWidget(KScreen::OutputPtr output, KScreen::ConfigPtr confi
// Behavior chooser // Behavior chooser
if (output->isPrimary()) if (output->isPrimary())
ui.behaviorCombo->setCurrentIndex(PrimaryDisplay); ui.behaviorCombo->setCurrentIndex(PrimaryDisplay);
else
ui.behaviorCombo->setCurrentIndex(ExtendDisplay);
// Insert orientations // Insert orientations
ui.orientationCombo->addItem(tr("None"), KScreen::Output::None); ui.orientationCombo->addItem(tr("None"), KScreen::Output::None);

@ -0,0 +1,4 @@
# Translations
Name[lt]=Monitoriaus nustatymai
GenericName[lt]=Monitoriaus nustatymai
Comment[lt]=Konfigūruoti monitorius

@ -28,6 +28,7 @@
#include <LXQt/SingleApplication> #include <LXQt/SingleApplication>
#include <QSettings> #include <QSettings>
#include "mainwindow.h" #include "mainwindow.h"
#include "QCommandLineParser"
int main(int argc, char **argv) int main(int argc, char **argv)
@ -37,6 +38,16 @@ int main(int argc, char **argv)
app.setApplicationName(QStringLiteral("lxqt-config")); app.setApplicationName(QStringLiteral("lxqt-config"));
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); 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. // ensure that we use lxqt-config.menu file.
qputenv("XDG_MENU_PREFIX", "lxqt-"); qputenv("XDG_MENU_PREFIX", "lxqt-");

@ -1,4 +1,4 @@
# Translations # Translations
Comment[lt]=Konfigūruoti LXQt modulius
GenericName[lt]=LXQt konfigūracija
Name[lt]=LXQt konfigūravimo centras Name[lt]=LXQt konfigūravimo centras
GenericName[lt]=Sistemos nustatymai
Comment[lt]=Konfigūruoti savo sistemą

Loading…
Cancel
Save