Adding upstream version 0.11.0.

upstream/0.11.0
Alf Gaida 8 years ago
parent 4877462caa
commit e1c2f335f7

3
.gitignore vendored

@ -0,0 +1,3 @@
build
*.kdev4
config/translations/lxqt-globalkeys

@ -0,0 +1,220 @@
lxqt-globalkeys-0.11.0 / 2016-09-24
===================================
* Add README.md
* Add Catalan translation
* daemon: Use QDBusServiceWatcher
* Fix typo in German translation for desktop file (#38)
* build: Use external translations
* ts-files removal (#35)
* Improve foreach iterator use
* daemon/core: Optimize Core startup string stuff
* Client: Fix memory leak (static data)
* Fix untranslated string in French translation
* fix reseting the state of the edit dialog
* Default configs from /etc/xdg/lxqt must be loaded.
* static_cast<error_t>, fixes FTBFS for the Hurd
* lxqt-globalkeys is LGPL only, there are no GPL files in it
* Update italian translation, remove country-specific variant
* Italian translation update
* Update Russian translation Remove ru_RU files
* Update French translation
* client: Fix typo in pkg-config dependencies
* upd: lxqt-config-globalkeyshortcuts_hu.ts
* Fix warning
0.10.0 / 2015-10-31
===================
* Fix license file
* Update translations
* Fix regression for config add dialog
* Remove shortcut grabbing from the main window
* Add KDevelop project type to .gitignore
* OnlyShowIn=LXQt;
* Rename LxQt to LXQt everywhere
* Update Greek translation Remove country variant from language code
* Updated german translation, make it common for all german speaking regions.
* Updated template.
* Handles CMake policy CMP0063
* Export the ShortutSelector class
* Use LXQtCompilerSettings CMake module
* Install lxqt-globalkeysd to where it belongs
* Renames development and runtime CMake COMPONENT's
* Use target_compile_definitions()
* Coding style changes
* Double Quote CMake variables that may contain blanks
* Removes unneeded CMake stuff
* Use CMAKE_AUTOUIC
* Removes not needed include_directories()
* Removes hardcoded install dirs
* Drops LIB_SUFFIX. Use GNUInstallDirs.
* Fix three memory leaks in daemon error handling
* Fix FTBFS after new CMake Targets
* main: use standard liblxqt unix signal handling to quit
* Adds intree/superbuild support
* Generate -config-version.cmake files
* Drops xxx_use.cmake files. Adopt Targets
* Makes the config.cmake usable in an super build
* Update to use the new liblxqt Targets infrastructure
* daemon: fix two memory leaks
* Removes commented CMake code
* Removes unused FindInstallConfigPath.cmake
* Hungarian translation added
* Add additional map to track disabled actions
* daemon: not grabbing disabled shortcuts
* Update lxqt-config-globalkeyshortcuts_it_IT.desktop
* client: emitting registrationFinished signal
* Add check for NULL pointer. See lxde/lxqt#521
* Use ~ instead of / as working dir. Fixes lxde/lxqt#521
* Make DBus calls to addClientAction async
0.9.0 / 2015-01-07
==================
* Portuguese update
* - Unify naming for a unique lxqt. No more suffixes
* Use the new LxQt::SingleApplication
* CMakeLists maitenance
* Uses the new translations cmake modules
* Update Russian translation
* Drop Qt4 support in code
* Clean up CMakeLists.txt and drop Qt 4 support
0.8.0 / 2014-10-10
==================
* Adapt to the translation infrastructure
* - Fix Greek translation to conform with desktopfile validation
* Link to correct version of lxqt-globalkeys for lxqt-globalkeys-ui.
* Updates translations files install destination
* Adds include_directories() to the _use.cmake file
* Adds portable headers
* Fix broken qt4 build and make lib and include paths of qt4 and qt5 versions different.
* Do simplification and cleanup for the qt5 port. * Use cmake 2.8.9 by default and require 2.8.11 for qt5.
* Initial Qt5 support
* Use new LXQt header files.
* Improve FreeBSD support
0.7.0 / 2014-05-07
==================
* Update COPYING
0.6.99 / 2014-04-30
===================
* remove old translation templates remove translated icon names
* Add #include <libgen.h> for using basename(). Add typedef for error_t if it's not defined.
* Update AUTHORS
* Add CPack rules for creating tarball
* Bring desktop file in line with the others
* Don't append library suffix to library install path, but use it by default
* Respect standard LIB_INSTALL_DIR
* Removed CMAKE_SOURCE_DIR usage from CMakeLists.txt files
* Fix renaming bugs, replacing lxqt-qt with lxde-qt
* Finish the crazy razor=>lxqt renaming tasks.
* Project name added to cmake file
* Fix incorrect header inclusion.
* Fix broken cmake config and use files.
* Rename to lxqt-globalkeys. * Add cmake config and use files for liblxqt-globalkeys and liblxqt-globalkeys-ui.
* Add client and ui libs (original razor-global-key-shortcuts-client and razor-global-key-shortcut-selector).
* Fix incorrect dbus address by replacing razorqt with lxqt.
* Fix broken build and rename binary to lxqt-globalshortcutsd.
* Add COPYING and AUTHORS
* Desktop file for global key shortcut configurator added to install
* X-RAZOR changed to Razor in desktop files
* Small CMake improvements
* Qt 4.8.2+ compatibility improved
* C includes fixed
* Qt 4.6 compatibility
* No dependencies on STL
* Fix build
* Fix #601
* Typo really fixed (https://github.com/Razor-qt/razor-qt/commit/a8e71608fad71dfe8ad6be6ff1057067a19d93dc#commitcomment-3111401)
* Fix 'Unknown CMake command "razor_translate_ts"' error.
* Global key shortcuts config behaviour fixed
* TODO file removed (github issues to be used)
* Todo list updated
* Shortcut selectors fix for reset by timeout
* Shortcut selectors unified
* Shortcut can be changed just in the table
* Typo fixed
* New shortcut can be automatically applied to the selector text
* Should not set empty shortcuts - there is "enabled" feature for this
* Never allow to grab printable keys
* Todo list updated
* Shortcuts can be cleared from manager
* Stricter checks for client actions
* Inactive client actions can be removed from manager
* Todo list updated
* Todo list updated
* Temp files removed
* Global shortcuts client library added and all support for it refactored and fixed.
* Todo list updated
* Run as app by default
* Using PROJECT_NAME variable instead of PROJECT in CMake files
* Configurator ready for translation
* Header guards updated
* HPP files renamed to H and AStyle applied
* Missing license header added
* Unused files removed
* AStyle applied
* Initial import of global shortcut configurator
* Initial import of global shortcut daemon
* Todo updated
* Edit action dialog added
* Model indexes fixed
* Smart column autoresize
* Better dbus proxy usage
* Better optimisation handling
* Always printing a message in case of action failure
* Grabbing already grabbed shortcut releases keyboard
* Better command line info
* Todo file added
* Disabled actions grayed out
* Duplicate shortcuts highlighted Algorithm speed increased
* Unorderness of QSet fixed
* Shortcut editor added (but not used yet) Multiple actions behaviour selector added Some minor code style changes
* Minor style changes
* Manager has complete default read-only model
* More headers included
* Delayed actions model initialisation (allows correct signals handling)
* Correct daemon service name
* Correct command action info generation
* Prevent actions from multiplying when saving to the settings file
* Fixed meta types
* getAllActionsById renamed to getAllActions
* The simplest proxy model added to the manager
* More info returned by daemon
* Standard Qt header used
* Demo client app
* Qt4 compatibility issues fixed
* CMakefiles standardised
* Better actions IDs code Enable action methods exposed to DBus Config file fixed
* Daemon presence can be detected by native library - and it can reconnect
* Library refactored heavily
* Checking X11 error after each call CancelShortcutGrab method added Freshly grabbed shortcut checked More verbose X11 error output
* Removed non existing signal connection
* daemon_native* renamed to native* grabShortcut method duplicated in native* interface now install/uninstall added to project
* Native client library
* Meta types improved Better request functions
* Initial copy of Qt-based global action system
* globalkeyshortucts: fix segfault and other bugs in daemon
* Translations updated
* Translations updated
* Fix components missing translations
* Translations
* Install translations into correct places
* Update translations
* Enable translations for some components that were missing them
* Removed line num from TS files.
* Deleted old translation methods.
* New translation infrastructure
* complete setting parsing part for dbus call
* re-define classes to make server side ready for DBUS shortcuts
* global keys: server settings renaming
* globalkeys config: UI fixes; translations; proper layouting
* globalkeys: missing license; display groups as a whole line in the config dialog
* global keyobard shortcuts: initial import from Aaron's repo. Astyle-d. License added where required. Renamed to be more descriptive.

@ -0,0 +1,37 @@
# lxqt-globalkeys
## Overview
This repository is providing tools to set global keyboard shortcuts in LXQt sessions, that is shortcuts which apply to the LXQt session as a whole and are not limited to distinct applications.
The core components are two binaries `lxqt-globalkeysd` and `lxqt-config-globalkeyshortcuts`.
`lxqt-globalkeysd` is running in a daemon-like manner as so-called [LXQt Module](https://github.com/lxde/lxqt-session#lxqt-modules) and doing the actual work. GUI `lxqt-config-globalkeyshortcuts` is used to customize the shortcut settings.
## Installation
### Compiling source code
The only runtime dependencies is [liblxqt](https://github.com/lxde/liblxqt).
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
### Binary packages
Official binary packages are provided by all major Linux distributions like Arch Linux, Debian (as of Debian stretch only), Fedora and openSUSE. Just use your package manager to search for string `lxqt-globalkeys`.
## Configuration, Usage
### Caveat lxqt-globalkeys vs. window managers
Window managers can assign shortcuts as well and their scope may overlap with the one of lxqt-globalkeys in LXQt sessions.
This was e. g. affecting elderly configuration files `rc.xml` of Openbox which were assigning `Ctrl+Alt+D` to toggling the display of the desktop which lxqt-globalkeys tries to do as well. This resulted in a warning message "Global shortcut C+A+d+ cannot be registered", see https://github.com/lxde/lxqt/issues/1032.
As depicted in this issue [lxqt-notificationd](https://github.com/lxde/lxqt-notificationd) will show a warning when conflicts like this come up and users can thus decide whether they want to have the shortcut in question handled by the respective window manager or lxqt-globalkeys.
### lxqt-globalkeys
Daemon-like `lxqt-globalkeysd` can be adjusted from section "Basic Settings" in configuration dialogue [LXQt Session Settings](https://github.com/lxde/lxqt-session#overview) of [lxqt-session](https://github.com/lxde/lxqt-session).
Configuration dialogue "Global Actions Manager" (binary `lxqt-config-globalkeyshortcuts`) which is used to customize shortcuts can be opened from the panel's main menu - Preferences - LXQt Settings - Shortcut Keys and is provided by the [Configuration Center](https://github.com/lxde/lxqt-config#configuration-center) of [lxqt-config](https://github.com/lxde/lxqt-config) as well.

@ -0,0 +1,4 @@
# Translations
Name[ca]=Tecles de les dreceres
GenericName[ca]=Ajusts de les dreceres de teclat
Comment[ca]=Configureu les tecles de les dreceres a LXQt

@ -31,6 +31,7 @@
#include <QSettings>
#include <QTimer>
#include <QDBusConnectionInterface>
#include <QDBusServiceWatcher>
#include <stddef.h>
#include <stdlib.h>
@ -381,6 +382,7 @@ Core::Core(bool useSyslog, bool minLogLevelSet, int minLogLevel, const QStringLi
, mMinLogLevel(minLogLevel)
, mDisplay(0)
, mInterClientCommunicationWindow(0)
, mServiceWatcher{new QDBusServiceWatcher{this}}
, mDaemonAdaptor(0)
, mNativeAdaptor(0)
, mLastId(0ull)
@ -629,6 +631,7 @@ Core::Core(bool useSyslog, bool minLogLevelSet, int minLogLevel, const QStringLi
saveConfig();
mServiceWatcher->setConnection(QDBusConnection::sessionBus());
mDaemonAdaptor = new DaemonAdaptor(this);
if (!QDBusConnection::sessionBus().registerObject(QStringLiteral("/daemon"), mDaemonAdaptor))
@ -642,7 +645,7 @@ Core::Core(bool useSyslog, bool minLogLevelSet, int minLogLevel, const QStringLi
throw std::runtime_error(std::string("Cannot create daemon native client adaptor"));
}
connect(QDBusConnection::sessionBus().interface(), SIGNAL(serviceOwnerChanged(QString, QString, QString)), this, SLOT(serviceOwnerChanged(QString, QString, QString)));
connect(mServiceWatcher, &QDBusServiceWatcher::serviceUnregistered, this, &Core::serviceDisappeared);
connect(mDaemonAdaptor, SIGNAL(onAddMethodAction(QPair<QString, qulonglong>&, QString, QString, QDBusObjectPath, QString, QString, QString)), this, SLOT(addMethodAction(QPair<QString, qulonglong>&, QString, QString, QDBusObjectPath, QString, QString, QString)));
connect(mDaemonAdaptor, SIGNAL(onAddCommandAction(QPair<QString, qulonglong>&, QString, QString, QStringList, QString)), this, SLOT(addCommandAction(QPair<QString, qulonglong>&, QString, QString, QStringList, QString)));
@ -1652,14 +1655,6 @@ void Core::run()
checkX11Error(0);
}
void Core::serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner)
{
if (!oldOwner.isEmpty() && newOwner.isEmpty())
{
serviceDisappeared(oldOwner);
}
}
void Core::serviceDisappeared(const QString &sender)
{
log(LOG_DEBUG, "serviceDisappeared '%s'", qPrintable(sender));
@ -1726,6 +1721,7 @@ void Core::serviceDisappeared(const QString &sender)
mSenderByClientPath.remove(path);
}
mClientPathsBySender.erase(clientPathsBySender);
mServiceWatcher->removeWatchedService(clientPathsBySender.key());
}
}
@ -2142,7 +2138,13 @@ void Core::addClientAction(QPair<QString, qulonglong> &result, const QString &sh
mSenderByClientPath[path] = sender;
mClientPathsBySender[sender].insert(path);
auto it = mClientPathsBySender.find(sender);
if (mClientPathsBySender.end() == it)
{
mServiceWatcher->addWatchedService(sender);
it = mClientPathsBySender.insert(sender, {});
}
it->insert(path);
result = addOrRegisterClientAction(useShortcut, path, description, sender);
@ -2862,7 +2864,10 @@ void Core::removeClientAction(bool &result, const QDBusObjectPath &path, const Q
mClientPathsBySender[sender].remove(path);
if (mClientPathsBySender[sender].isEmpty())
{
mClientPathsBySender.remove(sender);
mServiceWatcher->removeWatchedService(sender);
}
saveConfig();
@ -3025,7 +3030,10 @@ void Core::deactivateClientAction(bool &result, const QDBusObjectPath &path, con
mClientPathsBySender[sender].remove(path);
if (mClientPathsBySender[sender].isEmpty())
{
mClientPathsBySender.remove(sender);
mServiceWatcher->removeWatchedService(sender);
}
result = true;

@ -37,7 +37,6 @@
#include <QMutex>
#include <QList>
#include <QPair>
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDBusObjectPath>
@ -58,6 +57,7 @@ class DaemonAdaptor;
class NativeAdaptor;
class DBusProxy;
class BaseAction;
class QDBusServiceWatcher;
template<class Key>
class QOrderedSet : public QMap<Key, Key>
@ -102,7 +102,6 @@ private:
typedef QMap<QString, ClientPaths> ClientPathsBySender;
private slots:
void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
void serviceDisappeared(const QString &sender);
void addClientAction(QPair<QString, qulonglong> &result, const QString &shortcut, const QDBusObjectPath &path, const QString &description, const QString &sender);
@ -206,7 +205,7 @@ private:
mutable QMutex mX11ErrorMutex;
QDBusConnection *mSessionConnection;
QDBusServiceWatcher *mServiceWatcher;
DaemonAdaptor *mDaemonAdaptor;
NativeAdaptor *mNativeAdaptor;

Loading…
Cancel
Save