Cherry-picking upstream version 0.12.0.
This commit is contained in:
parent
342f232b8e
commit
1f9364cee5
2
AUTHORS
2
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: LGPL-2.1+
|
||||
The full text of the licenses can be found in the 'COPYING' file.
|
||||
|
44
CHANGELOG
44
CHANGELOG
@ -1,7 +1,49 @@
|
||||
|
||||
lxqt-globalkeys-0.11.1 / 2017-01-01
|
||||
lxqt-globalkeys-0.12.0 / 2017-10-21
|
||||
===================================
|
||||
|
||||
* Set patch version
|
||||
* Don't export github templates
|
||||
* fix deadlock - don't accept keyPress when processing dbus call (#56)
|
||||
* Added Lithuanian language
|
||||
* lxqt-config-globalkeys: set Qt::AA_UseHighDpiPixmaps to true
|
||||
* Added QCommandLineParser and basic cli interface to lxqt-config-globalkeys
|
||||
* Adeed LXQT_GLOBALKEYS_PATCH_VERSION
|
||||
* Fixes a FTBFS in superbuild mode (#51)
|
||||
* Added autostart and xdg to CMakeLists.txt
|
||||
* changed xdg/CmakeLists.txt
|
||||
* fixed xdg/CMakeLists.txt renamed config to xdg - merge preparation
|
||||
* Use const iterators
|
||||
* globalkeys: Open "empty" browser on activation
|
||||
* Updated *_da.desktop files and removed *_da_DK.desktop files
|
||||
* Update AUTHORS
|
||||
* Open https://duckduckgo.com instead of google.com as default
|
||||
* Update desktop entries and Replace fr_FR by fr
|
||||
* lxqt-rc.xml: Change default config install path
|
||||
* Settings Openbox updated.
|
||||
* Screenshot (Shift+Print), file manager (ctl+Alt+e) and web browser (Ctl+atl+i) key shortcuts added.
|
||||
* Default key shortcuts added to lxqt-globalkeysd.
|
||||
* Update Greek translation (el) Remove country variant from language code
|
||||
* CMake: Adds Runtime and Devel install COMPONENTs
|
||||
* Coding style changes
|
||||
* Adds double quotes to everything that may break
|
||||
* Updates the build system to use the Targets infrastructure
|
||||
* Drops hardcoded /etc/xdg paths
|
||||
* Updated german translation, replaced Qt4 by Qt in all xsession/translations
|
||||
* Updates translations infrastructure
|
||||
* Update the required minimum cmake version
|
||||
* remove dead template lines switch OnlyShowIn from Razor -> LXQt stringchanges LxQt -> LXQt
|
||||
* Add session.conf and windowmanagers.conf.
|
||||
* Support lxqt-session and add necessary xdg autostart desktop entry files.
|
||||
* Rename dirs and replace razor with lxqt. Install lxqt.conf to /etc/xdg/lxqt and provide theme config.
|
||||
* Properly set default wallpaper for pcmanfm-qt. Comment out openbox config handling in startlxde-qt since it's not needed.
|
||||
* Fix file paths, replacing razor with lxqt. * Remove Alt+F2 and Ctrl+Esc from openbox config file to avoid conflicts with lxqt-panel & lxqt-globalkeys.
|
||||
* Add default configuration files for lxde-qt session.
|
||||
|
||||
0.11.1 / 2017-01-01
|
||||
===================
|
||||
|
||||
* Release 0.11.1: Update changelog
|
||||
* Added *da.desktop
|
||||
* Use the lxqt-build-tools/lxqt_create_portable_headers
|
||||
* Use the new lxqt-build-tools package
|
||||
|
@ -11,7 +11,7 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
set(LXQTBT_MINIMUM_VERSION "0.1.0")
|
||||
set(LXQTBT_MINIMUM_VERSION "0.4.0")
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
@ -20,11 +20,17 @@ set(CMAKE_AUTOUIC ON)
|
||||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5DBus REQUIRED)
|
||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||
find_package(Qt5LinguistTools REQUIRED)
|
||||
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
|
||||
find_package(lxqt REQUIRED QUIET)
|
||||
find_package(lxqt REQUIRED)
|
||||
|
||||
|
||||
# Patch Version
|
||||
set(LXQT_GLOBALKEYS_PATCH_VERSION 0)
|
||||
|
||||
set(LXQT_GLOBALKEYS_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_GLOBALKEYS_PATCH_VERSION})
|
||||
add_definitions("-DLXQT_GLOBALKEYS_VERSION=\"${LXQT_GLOBALKEYS_VERSION}\"")
|
||||
|
||||
include(LXQtTranslate)
|
||||
include(LXQtCreatePkgConfigFile)
|
||||
include(LXQtCreatePortableHeaders)
|
||||
@ -93,3 +99,8 @@ install(FILES
|
||||
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config-version.cmake"
|
||||
DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}"
|
||||
)
|
||||
|
||||
# merged from lxqt-common
|
||||
add_subdirectory(autostart)
|
||||
add_subdirectory(xdg)
|
||||
|
||||
|
17
autostart/CMakeLists.txt
Normal file
17
autostart/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||
|
||||
file(GLOB DESKTOP_FILES_IN *.desktop.in)
|
||||
|
||||
# Translations **********************************
|
||||
lxqt_translate_desktop(DESKTOP_FILES
|
||||
SOURCES
|
||||
${DESKTOP_FILES_IN}
|
||||
)
|
||||
add_custom_target(lxqt_globlalkeys_autostart_desktop_files ALL DEPENDS ${DESKTOP_FILES})
|
||||
#************************************************
|
||||
|
||||
install(FILES
|
||||
${DESKTOP_FILES}
|
||||
DESTINATION "${LXQT_ETC_XDG_DIR}/autostart"
|
||||
COMPONENT Runtime
|
||||
)
|
9
autostart/lxqt-globalkeyshortcuts.desktop.in
Normal file
9
autostart/lxqt-globalkeyshortcuts.desktop.in
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Global Keyboard Shortcuts
|
||||
TryExec=lxqt-globalkeysd
|
||||
Exec=lxqt-globalkeysd
|
||||
OnlyShowIn=LXQt;
|
||||
X-LXQt-Module=true
|
||||
|
||||
#TRANSLATIONS_DIR=translations
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[cs]=Celkové klávesové zkratky
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[cs_CZ]=Celkové klávesové zkratky
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[da]=Globale tastaturgenveje
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[de]=Globale Kurzbefehle
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[el]=Καθολικές συντομεύσεις πληκτρολογίου
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[es]=Atajos Globales del Teclado
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[es_VE]=Atajos de teclados de LXQt
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[eu]=Teklatuko lasterbide orokorrak
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[fi]=Yleiset pikanäppäimet
|
@ -0,0 +1 @@
|
||||
Name[fr]=Raccourcis clavier globaux
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[it_IT]=Scorciatoie globali della tastiera
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[lt]=Visuotiniai spartieji klavišai
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[pl_PL]=Globalne Skróty Klawiszowe
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[pt]=Teclas de atalho globais
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[pt_BR]=Atalhos Globais Do Teclado
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[ro_RO]=Taste rapide globale
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[ru]=Глобальные горячих клавиш
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[ru_RU]=Глобальные сочетания клавиш
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[th_TH]=ปุ่มลัดหลักต่างๆ
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[uk]=Глобальні клавіатурні скорочення
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[zh_CN]=全局键盘快捷键
|
@ -0,0 +1,2 @@
|
||||
# Translations
|
||||
Name[zh_TW]=全域鍵盤快捷鍵
|
@ -27,11 +27,23 @@
|
||||
|
||||
#include <LXQt/SingleApplication>
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include "main_window.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
LXQt::SingleApplication a(argc, argv);
|
||||
a.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QStringLiteral("LXQt Config Globalkeys "));
|
||||
const QString VERINFO = QStringLiteral(LXQT_GLOBALKEYS_VERSION
|
||||
"\nliblxqt " LXQT_VERSION
|
||||
"\nQt " QT_VERSION_STR);
|
||||
a.setApplicationVersion(VERINFO);
|
||||
parser.addVersionOption();
|
||||
parser.addHelpOption();
|
||||
parser.process(a);
|
||||
|
||||
MainWindow w;
|
||||
a.setActivationWindow(&w);
|
||||
|
@ -0,0 +1,4 @@
|
||||
# Translations
|
||||
Name[lt]=Spartieji klavišai
|
||||
GenericName[lt]=Sparčiųjų klavišų nustatymai
|
||||
Comment[lt]=Konfigūruoti LXQt sparčiuosius klavišus
|
@ -42,6 +42,7 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <mutex>
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@ -760,8 +761,8 @@ void Core::saveConfig()
|
||||
settings.setValue(/* General/ */"AllowGrabBaseKeypad", mAllowGrabBaseKeypad);
|
||||
settings.setValue(/* General/ */"AllowGrabMiscKeypad", mAllowGrabMiscKeypad);
|
||||
|
||||
ShortcutAndActionById::const_iterator lastShortcutAndActionById = mShortcutAndActionById.end();
|
||||
for (ShortcutAndActionById::const_iterator shortcutAndActionById = mShortcutAndActionById.begin(); shortcutAndActionById != lastShortcutAndActionById; ++shortcutAndActionById)
|
||||
ShortcutAndActionById::const_iterator lastShortcutAndActionById = mShortcutAndActionById.constEnd();
|
||||
for (ShortcutAndActionById::const_iterator shortcutAndActionById = mShortcutAndActionById.constBegin(); shortcutAndActionById != lastShortcutAndActionById; ++shortcutAndActionById)
|
||||
{
|
||||
const BaseAction *action = shortcutAndActionById.value().second;
|
||||
QString section = shortcutAndActionById.value().first + "." + QString::number(shortcutAndActionById.key());
|
||||
@ -1146,17 +1147,18 @@ void Core::run()
|
||||
XEvent event;
|
||||
while (mX11EventLoopActive)
|
||||
{
|
||||
XNextEvent(mDisplay, &event);
|
||||
XPeekEvent(mDisplay, &event);
|
||||
if (!mX11EventLoopActive)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
switch (event.type)
|
||||
if (event.type == KeyPress && mDataMutex.tryLock(0))
|
||||
{
|
||||
case KeyPress:
|
||||
{
|
||||
QMutexLocker lock(&mDataMutex);
|
||||
std::unique_lock<QMutex> unlocker(mDataMutex, std::adopt_lock);
|
||||
|
||||
// pop event from the x11 queue and process it
|
||||
XNextEvent(mDisplay, &event);
|
||||
|
||||
if (mGrabbingShortcut)
|
||||
{
|
||||
@ -1370,11 +1372,15 @@ void Core::run()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
}
|
||||
else
|
||||
// check for pending pipe requests from other thread
|
||||
{
|
||||
if (event.type != KeyPress) {
|
||||
XNextEvent(mDisplay, &event);
|
||||
}
|
||||
|
||||
pollfd fds[1];
|
||||
fds[0].fd = mX11RequestPipe[STDIN_FILENO];
|
||||
fds[0].events = POLLIN | POLLERR | POLLHUP;
|
||||
@ -1644,7 +1650,6 @@ void Core::run()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2033,8 +2038,8 @@ QString Core::checkShortcut(const QString &shortcut, X11Shortcut &X11shortcut)
|
||||
|
||||
try
|
||||
{
|
||||
ShortcutByX11::const_iterator shortcutByX11 = mShortcutByX11.find(X11shortcut);
|
||||
if (shortcutByX11 != mShortcutByX11.end())
|
||||
ShortcutByX11::const_iterator shortcutByX11 = mShortcutByX11.constFind(X11shortcut);
|
||||
if (shortcutByX11 != mShortcutByX11.constEnd())
|
||||
{
|
||||
usedShortcut = shortcutByX11.value();
|
||||
}
|
||||
@ -2055,8 +2060,8 @@ QString Core::checkShortcut(const QString &shortcut, X11Shortcut &X11shortcut)
|
||||
log(LOG_INFO, "Using shortcut '%s' instead of '%s'", qPrintable(usedShortcut), qPrintable(shortcut));
|
||||
}
|
||||
|
||||
X11ByShortcut::const_iterator x11ByShortcut = mX11ByShortcut.find(usedShortcut);
|
||||
if (x11ByShortcut == mX11ByShortcut.end())
|
||||
X11ByShortcut::const_iterator x11ByShortcut = mX11ByShortcut.constFind(usedShortcut);
|
||||
if (x11ByShortcut == mX11ByShortcut.constEnd())
|
||||
{
|
||||
mX11ByShortcut[usedShortcut] = X11shortcut;
|
||||
}
|
||||
@ -2129,7 +2134,7 @@ void Core::addClientAction(QPair<QString, qulonglong> &result, const QString &sh
|
||||
QString useShortcut = shortcut;
|
||||
if (shortcut.isEmpty())
|
||||
{
|
||||
IdByClientPath::ConstIterator idByClientPath = mIdByClientPath.find(path);
|
||||
IdByClientPath::ConstIterator idByClientPath = mIdByClientPath.constFind(path);
|
||||
if (idByClientPath != mIdByClientPath.constEnd())
|
||||
{
|
||||
useShortcut = mShortcutAndActionById[idByClientPath.value()].first;;
|
||||
|
6
xdg/CMakeLists.txt
Normal file
6
xdg/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# install default config files to /etc/xdg
|
||||
install(FILES
|
||||
globalkeyshortcuts.conf
|
||||
DESTINATION "${LXQT_ETC_XDG_DIR}/lxqt"
|
||||
COMPONENT Runtime
|
||||
)
|
41
xdg/globalkeyshortcuts.conf
Normal file
41
xdg/globalkeyshortcuts.conf
Normal file
@ -0,0 +1,41 @@
|
||||
|
||||
[Control%2BAlt%2BT.1]
|
||||
Comment=QTerminal
|
||||
Enabled=true
|
||||
Exec=qterminal
|
||||
|
||||
[Shift%2BControl%2BF6.2]
|
||||
Comment=\x2600 \x2193
|
||||
Enabled=true
|
||||
Exec=lxqt-config-brightness, -d
|
||||
|
||||
[Shift%2BControl%2BF7.3]
|
||||
Comment=\x2600 \x2191
|
||||
Enabled=true
|
||||
Exec=lxqt-config-brightness, -i
|
||||
|
||||
[XF86MonBrightnessDown.4]
|
||||
Comment=\x2600 \x2193
|
||||
Enabled=true
|
||||
Exec=lxqt-config-brightness, -d
|
||||
|
||||
[XF86MonBrightnessUp.5]
|
||||
Comment=\x2600 \x2191
|
||||
Enabled=true
|
||||
Exec=lxqt-config-brightness, -i
|
||||
|
||||
|
||||
[Control%2BAlt%2BE.6]
|
||||
Comment=Pcmanfm
|
||||
Enabled=true
|
||||
Exec=pcmanfm-qt
|
||||
|
||||
[Control%2BAlt%2BI.7]
|
||||
Comment=Web browser
|
||||
Enabled=true
|
||||
Exec=xdg-open, about:blank
|
||||
|
||||
[Print.8]
|
||||
Comment=screen shot
|
||||
Enabled=true
|
||||
Exec=lximage-qt, -s
|
Loading…
x
Reference in New Issue
Block a user