Chery-picking new upstream release 0.11.1.
* Removed some build dependencies: -cmake -libqt5xdg-dev -libqt5xdgiconloader-dev -pkg-config -qttools5-dev -qttools5-dev-tools * Bumped build dependency liblxqt0-dev (>= 0.11.1) * Bumped years in d/copyright * Added Recommends galternatives
This commit is contained in:
parent
f2573945ac
commit
f6a88cd690
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
||||
build
|
||||
lxqt-config.kdev4
|
||||
*/translations/lxqt-config
|
23
CHANGELOG
23
CHANGELOG
@ -1,7 +1,28 @@
|
||||
|
||||
lxqt-config-0.11.0 / 2016-09-24
|
||||
lxqt-config-0.11.1 / 2017-01-01
|
||||
===============================
|
||||
|
||||
* 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
|
||||
* liblxqt-config-cursor: Explicitly ignore function return value
|
||||
* Updated and added *_da.desktop files and removed da_DK
|
||||
* Use FindXCB CMake module
|
||||
* Activate items on releasing Enter instead of pressing it. (#78)
|
||||
* Update and rename lxqt-config_fr_FR.desktop to lxqt-config_fr.desktop
|
||||
* Fix faulty link in README.md
|
||||
* if not set, set the build type to Release
|
||||
* Desktop entry files: Update French translation
|
||||
* lxqt-config: Avoid multiple spawn on auto-repeat
|
||||
* Fix loading of translations for brightness
|
||||
* Create lxqt-config-brightness_it.desktop
|
||||
* Remove cpack (#104)
|
||||
* lxqt-config-brightness: Add GenericName and Comment to desktop entry
|
||||
|
||||
0.11.0 / 2016-09-24
|
||||
===================
|
||||
|
||||
* Release 0.11.0: Add changelog
|
||||
* appearance: Avoid blocking when setting wallpaper
|
||||
* appearance: Do (not) change wallpaper with theme
|
||||
* all: Remove XdgIcon & XdgIconLoader usage
|
||||
|
@ -28,6 +28,11 @@ find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||
find_package(lxqt REQUIRED QUIET)
|
||||
|
||||
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
include(LXQtTranslate)
|
||||
|
||||
add_subdirectory(src)
|
||||
@ -52,13 +57,3 @@ endif()
|
||||
if (WITH_LOCALE)
|
||||
add_subdirectory(lxqt-config-locale)
|
||||
endif()
|
||||
|
||||
# building tarball with CPack -------------------------------------------------
|
||||
include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION})
|
||||
set(CPACK_GENERATOR TBZ2)
|
||||
set(CPACK_SOURCE_GENERATOR TBZ2)
|
||||
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
|
||||
include(CPack)
|
||||
|
@ -55,7 +55,7 @@ The "Configuration Center" (binary `lxqt-config`) is summarizing and providing v
|
||||
|
||||

|
||||
|
||||
First of all these are the ones belonging to repository lxqt-config described [above](https://github.com/pmattern/lxqt-config#configuration-gui-tools). Next, it is hosting counterparts of several other LXQt components like "Desktop Notifications" of [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd), "Shortcut Keys" of [lxqt-globalkeyshortcuts](https://github.com/lxde/lxqt-globalkeyshortcuts) or the tools provided by [lxqt-admin](https://github.com/lxde/lxqt-admin). Third-party applications can include their configuration tools in "Configuration Center", too. This applies e. g. to "Connman UI Setup" of [cmst](https://github.com/andrew-bibb/cmst) or "SDDM Configuration" of [sddm-config-editor](https://github.com/hagabaka/sddm-config-editor).
|
||||
First of all these are the ones belonging to repository lxqt-config described [above](https://github.com/lxde/lxqt-config#configuration-gui-tools). Next, it is hosting counterparts of several other LXQt components like "Desktop Notifications" of [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd), "Shortcut Keys" of [lxqt-globalkeyshortcuts](https://github.com/lxde/lxqt-globalkeyshortcuts) or the tools provided by [lxqt-admin](https://github.com/lxde/lxqt-admin). Third-party applications can include their configuration tools in "Configuration Center", too. This applies e. g. to "Connman UI Setup" of [cmst](https://github.com/andrew-bibb/cmst) or "SDDM Configuration" of [sddm-config-editor](https://github.com/hagabaka/sddm-config-editor).
|
||||
|
||||
## Installation
|
||||
|
||||
|
16
debian/changelog
vendored
16
debian/changelog
vendored
@ -1,3 +1,19 @@
|
||||
lxqt-config (0.11.1-1) unstable; urgency=medium
|
||||
|
||||
* Chery-picking new upstream release 0.11.1.
|
||||
* Removed some build dependencies:
|
||||
-cmake
|
||||
-libqt5xdg-dev
|
||||
-libqt5xdgiconloader-dev
|
||||
-pkg-config
|
||||
-qttools5-dev
|
||||
-qttools5-dev-tools
|
||||
* Bumped build dependency liblxqt0-dev (>= 0.11.1)
|
||||
* Bumped years in d/copyright
|
||||
* Added Recommends galternatives
|
||||
|
||||
-- Alf Gaida <agaida@siduction.org> Mon, 02 Jan 2017 12:36:49 +0100
|
||||
|
||||
lxqt-config (0.11.0-2) unstable; urgency=medium
|
||||
|
||||
* Chery-picking new upstream release 0.11.0
|
||||
|
11
debian/control
vendored
11
debian/control
vendored
@ -7,21 +7,15 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
|
||||
Section: x11
|
||||
Priority: optional
|
||||
Build-Depends: debhelper (>= 10),
|
||||
cmake (>= 3.0.2),
|
||||
libkf5screen-dev,
|
||||
libkf5windowsystem-dev,
|
||||
liblxqt0-dev (>= 0.11.0),
|
||||
liblxqt0-dev (>= 0.11.1),
|
||||
libqt5svg5-dev,
|
||||
libqt5x11extras5-dev,
|
||||
libqt5xdg-dev (>= 2.0.0),
|
||||
libqt5xdgiconloader-dev (>= 2.0.0),
|
||||
libx11-dev,
|
||||
libxcursor-dev,
|
||||
libxfixes-dev,
|
||||
pkg-config,
|
||||
qtbase5-private-dev,
|
||||
qttools5-dev,
|
||||
qttools5-dev-tools,
|
||||
zlib1g-dev
|
||||
Standards-Version: 3.9.8
|
||||
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-config.git/?h=debian/sid
|
||||
@ -32,7 +26,8 @@ Package: lxqt-config
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends},
|
||||
${shlibs:Depends}
|
||||
Recommends: lxqt-config-l10n
|
||||
Recommends: galternatives,
|
||||
lxqt-config-l10n
|
||||
Description: LXQt system settings center
|
||||
The LXQt system settings center
|
||||
.
|
||||
|
4
debian/copyright
vendored
4
debian/copyright
vendored
@ -3,7 +3,7 @@ Upstream-Name: lxqt-config
|
||||
Source: https://github.com/lxde/lxqt-config
|
||||
|
||||
Files: *
|
||||
Copyright: 2012-2016 LXQt team
|
||||
Copyright: 2012-2017 LXQt team
|
||||
2010-2012 Razor team
|
||||
2013 Christian Surlykke
|
||||
2014 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
@ -84,7 +84,7 @@ Copyright: 2015 Kai Uwe Broulik <kde@privat.broulik.de>
|
||||
License: LGPL-2.0+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2014-2016 Alf Gaida <agaida@siduction.org>
|
||||
Copyright: 2014-2017 Alf Gaida <agaida@siduction.org>
|
||||
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||
License: LGPL-2.1+
|
||||
|
||||
|
4
debian/rules
vendored
4
debian/rules
vendored
@ -10,8 +10,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DPULL_TRANSLATIONS=OFF\
|
||||
-DUPDATE_TRANSLATIONS=OFF\
|
||||
-DPULL_TRANSLATIONS=OFF \
|
||||
-DUPDATE_TRANSLATIONS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
||||
override_dh_makeshlibs:
|
||||
|
@ -1,9 +1,7 @@
|
||||
project(lxqt-config-cursor)
|
||||
find_package(X11 REQUIRED)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(XCB REQUIRED xcb)
|
||||
find_package(XCB REQUIRED xcb)
|
||||
include_directories(${XCB_INCLUDE_DIRS})
|
||||
link_libraries(${XCB_LIBRARIES})
|
||||
|
||||
|
@ -59,9 +59,9 @@ void XCursorImage::convertARGB2PreMul (QImage &img) {
|
||||
switch (img.format()) {
|
||||
case QImage::Format_ARGB32_Premultiplied: return;
|
||||
case QImage::Format_ARGB32: break;
|
||||
default: img.convertToFormat(QImage::Format_ARGB32/*_Premultiplied*/);
|
||||
default: (void) img.convertToFormat(QImage::Format_ARGB32/*_Premultiplied*/);
|
||||
}
|
||||
img.convertToFormat(QImage::Format_ARGB32_Premultiplied); // this shouldn't convert anything
|
||||
(void) img.convertToFormat(QImage::Format_ARGB32_Premultiplied); // this shouldn't convert anything
|
||||
// so convert it!
|
||||
for (int y = img.height()-1; y >= 0; y--) {
|
||||
quint8 *line = (quint8 *)img.scanLine(y);
|
||||
@ -150,7 +150,7 @@ void XCursorImage::genXCursorImg (QByteArray &res) const {
|
||||
baPutDW(res, (quint32)mDelay);
|
||||
// now put the pixels
|
||||
QImage i = mImage->copy();
|
||||
i.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
(void) i.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
//i.convertToFormat(QImage::Format_ARGB32);
|
||||
for (int y = 0; y < i.height(); y++) {
|
||||
const uchar *sl = i.scanLine(y);
|
||||
|
@ -84,7 +84,8 @@ XCursorImageXCur::~XCursorImageXCur () {
|
||||
|
||||
void XCursorImageXCur::parseImgData (const void *aImgData) {
|
||||
mIsValid = false;
|
||||
if (mImage) delete mImage; mImage = 0;
|
||||
delete mImage; // It's fine to delete a null pointer
|
||||
mImage = 0;
|
||||
const quint32 *data = (const quint32 *)aImgData;
|
||||
if (getDW(data) != 36) return; // header size
|
||||
if (getDW(data+1) != 0xfffd0002L) return; // magic
|
||||
|
@ -138,9 +138,12 @@ IconThemeConfig::~IconThemeConfig()
|
||||
void IconThemeConfig::iconThemeSelected(QTreeWidgetItem *item, int column)
|
||||
{
|
||||
Q_UNUSED(column);
|
||||
QString theme = item->data(0, Qt::UserRole).toString();
|
||||
const QString theme = item->data(0, Qt::UserRole).toString();
|
||||
if (!theme.isEmpty())
|
||||
{
|
||||
// Ensure that this widget also updates it's own icons
|
||||
QIcon::setThemeName(theme);
|
||||
|
||||
m_settings->setValue("icon_theme", theme);
|
||||
m_settings->sync();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[da]=Indstilling af LXQt udseende
|
||||
GenericName[da]=Indstilling af LXQt Udseende
|
||||
Name[da]=Indstilling af LXQt Udseende
|
||||
Name[da]=Udseende
|
||||
GenericName[da]=Udseendeindstillinger
|
||||
Comment[da]=Udseendeindstillinger for LXQt
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[da_DK]=Indstil udseende på LXQt skrivebord
|
||||
GenericName[da_DK]=Indstilling af LXQt Udseende
|
||||
Name[da_DK]=Indstilling af LXQt Udseende
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[fr]=Apparence
|
||||
GenericName[fr]=Configurer l'apparence
|
||||
Comment[fr]=Configurer l'apparence de LXQt
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[fr_FR]=Configurer l'apparence du bureau LXQt
|
||||
GenericName[fr_FR]=Configuration de l'apparence de LXQt
|
||||
Name[fr_FR]=Configuration de l'apparence de LXQt
|
@ -3,16 +3,12 @@ project(lxqt-config-brightness)
|
||||
find_package(Qt5Widgets REQUIRED QUIET)
|
||||
find_package(Qt5X11Extras REQUIRED QUIET)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(XRANDR xcb-randr)
|
||||
pkg_check_modules(XCB xcb)
|
||||
find_package(XCB REQUIRED xcb xcb-randr)
|
||||
|
||||
set(QTX_LIBRARIES Qt5::Widgets Qt5::X11Extras)
|
||||
|
||||
|
||||
include_directories (
|
||||
${XRANDR_INCLUDE_DIRS}
|
||||
${XCB_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
@ -65,13 +61,12 @@ lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME})
|
||||
lxqt_translate_desktop(DESKTOP_FILES SOURCES "resources/${PROJECT_NAME}.desktop.in")
|
||||
|
||||
|
||||
add_executable(${PROJECT_NAME} ${CPP_FILES} ${UI_FILES} ${QM_FILES} ${DESKTOP_FILES})
|
||||
add_executable(${PROJECT_NAME} ${CPP_FILES} ${UI_FILES} ${QM_FILES} ${DESKTOP_FILES} ${QM_LOADER})
|
||||
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${QTX_LIBRARIES}
|
||||
${XRANDR_LDFLAGS}
|
||||
${XCB_LDFLAGS}
|
||||
${XCB_LIBRARIES}
|
||||
lxqt
|
||||
)
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string notr="true">Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -1,5 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Brightness Settings
|
||||
Name=Brightness
|
||||
GenericName=Brightness Settings
|
||||
Comment=Configure brightness
|
||||
Exec=lxqt-config-brightness
|
||||
Terminal=false
|
||||
Type=Application
|
||||
@ -7,4 +9,4 @@ Icon=brightnesssettings
|
||||
Categories=Settings;DesktopSettings;Qt;LXQt;HardwareSettings;
|
||||
OnlyShowIn=LXQt;
|
||||
|
||||
#TRANSLATIONS_DIR=translations
|
||||
#TRANSLATIONS_DIR=translations
|
||||
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[da]=Lysstyrke
|
||||
GenericName[da]=Lysstyrkeindstillinger
|
||||
Comment[da]=Konfigurér lysstyrke
|
@ -0,0 +1,3 @@
|
||||
Name[fr]=Paramètres de luminosité
|
||||
GenericName[fr]=Paramètres de luminosité de l'écran
|
||||
Comment[fr]=Régler la luminosité et le contraste de l'écran
|
@ -0,0 +1,2 @@
|
||||
Name[it]=Luminosità
|
||||
Comment[it]=Permette di cambiare la luminosità e il contrasto dello schermo
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[da]=Filtilknytninger
|
||||
GenericName[da]=Filtilknytningsindstillinger
|
||||
Comment[da]=Konfigurér programmer tilknyttet kendte filtyper
|
@ -0,0 +1,3 @@
|
||||
Name[fr]=Association des fichiers
|
||||
GenericName[fr]=Paramètres d'association des fichiers
|
||||
Comment[fr]=Configurer les applications associées avec les types de fichier
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[da]=Tastatur og mus
|
||||
GenericName[da]=Input-indstillinger
|
||||
Comment[da]=Konfigurér tastatur, mus og andre input-enheder
|
@ -0,0 +1,3 @@
|
||||
Name[fr]=Clavier et Souris
|
||||
GenericName[fr]=Paramètres des périphériques d'entrée
|
||||
Comment[fr]=Configurer les claviers, souris et les autres périphériques d'entrée
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[da]=Sprog
|
||||
GenericName[da]=Sprogindstillinger
|
||||
Comment[da]=Sprogindstillinger for LXQt
|
@ -0,0 +1,3 @@
|
||||
Name[fr]=Région
|
||||
GenericName[fr]=Paramètres de la région
|
||||
Comment[fr]=Paramètres de la région pour LXQt
|
@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
<string notr="true">Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
|
@ -26,13 +26,11 @@
|
||||
#include <KScreen/SetConfigOperation>
|
||||
#include <LXQt/Settings>
|
||||
#include <KScreen/EDID>
|
||||
#include <QThread>
|
||||
#include <QCoreApplication>
|
||||
|
||||
|
||||
LoadSettings::LoadSettings(QObject *parent):QObject(parent)
|
||||
{
|
||||
QThread::sleep(10); // KScreen is slow loading screen modes
|
||||
KScreen::GetConfigOperation *operation = new KScreen::GetConfigOperation();
|
||||
connect(operation, &KScreen::GetConfigOperation::finished, [this, operation] (KScreen::ConfigOperation *op) {
|
||||
KScreen::GetConfigOperation *configOp = qobject_cast<KScreen::GetConfigOperation *>(op);
|
||||
|
@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string notr="true">Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[da]=Skærmindstillinger
|
||||
GenericName[da]=Skærmindstillinger
|
||||
Comment[da]=Konfigurér skærme
|
@ -0,0 +1,3 @@
|
||||
Name[fr]=Paramètres de l'écran
|
||||
GenericName[fr]=Paramètres de l'écran
|
||||
Comment[fr]=Configurer les écrans
|
@ -213,6 +213,7 @@ private:
|
||||
LXQtConfig::MainWindow::MainWindow() : QMainWindow()
|
||||
{
|
||||
setupUi(this);
|
||||
view->installEventFilter(this);
|
||||
|
||||
/* To always have the intended layout on startup,
|
||||
the listview should be shown after it's fully formed. */
|
||||
@ -225,7 +226,7 @@ LXQtConfig::MainWindow::MainWindow() : QMainWindow()
|
||||
view->setUniformItemSizes(true);
|
||||
view->setCategoryDrawer(new QCategoryDrawerV3(view));
|
||||
|
||||
connect(view, &QAbstractItemView::activated, this, &MainWindow::activateItem);
|
||||
connect(view, &QAbstractItemView::activated, [this] (const QModelIndex & index) { pendingActivation = index; });
|
||||
view->setFocus();
|
||||
|
||||
QTimer::singleShot(0, [this] { setSizing(); });
|
||||
@ -249,13 +250,50 @@ void LXQtConfig::MainWindow::load()
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void LXQtConfig::MainWindow::activateItem(const QModelIndex &index)
|
||||
void LXQtConfig::MainWindow::activateItem()
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
if (pendingActivation.isValid())
|
||||
{
|
||||
model->activateItem(pendingActivation);
|
||||
pendingActivation = QModelIndex{};
|
||||
}
|
||||
}
|
||||
|
||||
QModelIndex orig = proxyModel->mapToSource(index);
|
||||
model->activateItem(orig);
|
||||
/*Note: all this delayed activation is here to workaround the auto-repeated
|
||||
* Enter/Return key activation -> if the user keeps pressing the enter/return
|
||||
* we normaly will keep activating (spawning new processes) until the focus
|
||||
* isn't stolen from our window. New process is not spawned until the
|
||||
* (non-autorepeated) KeyRelease is delivered.
|
||||
*
|
||||
* ref https://github.com/lxde/lxqt/issues/965
|
||||
*/
|
||||
bool LXQtConfig::MainWindow::eventFilter(QObject * watched, QEvent * event)
|
||||
{
|
||||
if (view != watched)
|
||||
return false;
|
||||
switch (event->type())
|
||||
{
|
||||
case QEvent::KeyPress:
|
||||
case QEvent::KeyRelease:
|
||||
{
|
||||
QKeyEvent * ev = dynamic_cast<QKeyEvent *>(event);
|
||||
switch (ev->key())
|
||||
{
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
if (QEvent::KeyRelease == ev->type() && !ev->isAutoRepeat())
|
||||
activateItem();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case QEvent::MouseButtonRelease:
|
||||
activateItem();
|
||||
break;
|
||||
default:
|
||||
//keep warnings quiet
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LXQtConfig::MainWindow::setSizing()
|
||||
|
@ -52,18 +52,20 @@ public:
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent * event) override;
|
||||
virtual bool eventFilter(QObject * watched, QEvent * event) override;
|
||||
|
||||
private:
|
||||
QCategorizedSortFilterProxyModel *proxyModel;
|
||||
ConfigPaneModel *model;
|
||||
QPersistentModelIndex pendingActivation;
|
||||
|
||||
private:
|
||||
void builGroup(const QDomElement& xml);
|
||||
void setSizing();
|
||||
void activateItem();
|
||||
|
||||
private slots:
|
||||
void load();
|
||||
void activateItem(const QModelIndex &index);
|
||||
};
|
||||
|
||||
}; // namespace
|
||||
|
@ -516,6 +516,7 @@ void QCategorizedView::Private::_k_slotCollapseOrExpandClicked(QModelIndex)
|
||||
QCategorizedView::QCategorizedView(QWidget *parent)
|
||||
: QListView(parent)
|
||||
, d(new Private(this))
|
||||
, enterPressed(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1536,6 +1537,45 @@ void QCategorizedView::slotLayoutChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void QCategorizedView::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
// Don't emit activated() by pressing Enter! ...
|
||||
switch (event->key()) {
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
if (state() != EditingState) {
|
||||
event->ignore();
|
||||
if (hasFocus() && !event->isAutoRepeat())
|
||||
enterPressed = true; // Pressed after getting focus.
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
QAbstractItemView::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void QCategorizedView::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
// ... Emit activated() by releasing Enter instead!
|
||||
switch (event->key()) {
|
||||
case Qt::Key_Enter:
|
||||
case Qt::Key_Return:
|
||||
if (hasFocus() && state() != EditingState
|
||||
&& !event->isAutoRepeat() // No multiple signals.
|
||||
&& enterPressed // No signal if Enter is pressed before getting focus.
|
||||
&& currentIndex().isValid()) {
|
||||
emit activated(currentIndex());
|
||||
event->accept();
|
||||
enterPressed = false;
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
QAbstractItemView::keyReleaseEvent(event);
|
||||
}
|
||||
|
||||
//END: Public part
|
||||
|
||||
#include "moc_qcategorizedview.cpp"
|
||||
|
@ -318,6 +318,9 @@ protected:
|
||||
int start,
|
||||
int end);
|
||||
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
protected Q_SLOTS:
|
||||
/**
|
||||
* @internal
|
||||
@ -348,6 +351,11 @@ protected Q_SLOTS:
|
||||
private:
|
||||
class Private;
|
||||
Private *const d;
|
||||
/**
|
||||
* For knowing that Enter is pressed after
|
||||
* the widget gets focus and not before that.
|
||||
*/
|
||||
bool enterPressed;
|
||||
|
||||
Q_PRIVATE_SLOT(d, void _k_slotCollapseOrExpandClicked(QModelIndex))
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Translations
|
||||
Comment[da]=Indstil LXQt moduler
|
||||
GenericName[da]=LXQt Indstillingscenter
|
||||
Name[da]=LXQt Indstillingscenter
|
||||
Name[da]=LXQt-konfigurationscenter
|
||||
GenericName[da]=Systemindstillinger
|
||||
Comment[da]=Konfigurér dit system
|
||||
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[da_DK]=Indstil LXQt moduler
|
||||
GenericName[da_DK]=LXQt Indstillinger
|
||||
Name[da_DK]=LXQt Konfigurationsstyring
|
4
src/translations/lxqt-config_fr.desktop
Normal file
4
src/translations/lxqt-config_fr.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Comment[fr]=Configurer les modules de LXQt
|
||||
GenericName[fr]=Configuration de LXQt
|
||||
Name[fr]=Centre de configuration de LXQt
|
@ -1,4 +0,0 @@
|
||||
# Translations
|
||||
Comment[fr_FR]=Configurer les modules de LXQt
|
||||
GenericName[fr_FR]=Configuration de LXQt
|
||||
Name[fr_FR]=Centre de configuration de LXQt
|
Loading…
x
Reference in New Issue
Block a user