Compare commits
4 Commits
ubuntu/que
...
upstream/0
Author | SHA1 | Date | |
---|---|---|---|
|
49e61c24e6 | ||
|
53f8a9df5a | ||
|
e4c7b7eda0 | ||
|
c7d5a3ab86 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
build
|
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 2.8.11)
|
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
||||||
|
|
||||||
project(lxqt-globalkeys)
|
project(lxqt-globalkeys)
|
||||||
|
|
||||||
@ -11,64 +11,85 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Set default library installation path
|
|
||||||
set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation directory for libraries")
|
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
find_package(Qt5Widgets REQUIRED)
|
find_package(Qt5Widgets REQUIRED)
|
||||||
find_package(Qt5DBus REQUIRED)
|
find_package(Qt5DBus REQUIRED)
|
||||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
find_package(Qt5LinguistTools REQUIRED QUIET)
|
||||||
find_package(lxqt REQUIRED QUIET)
|
find_package(lxqt REQUIRED QUIET)
|
||||||
include(${LXQT_USE_FILE})
|
|
||||||
|
|
||||||
include(LXQtTranslate)
|
include(LXQtTranslate)
|
||||||
|
include(LXQtCreatePkgConfigFile)
|
||||||
|
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
||||||
|
|
||||||
# Standard directories for installation
|
include(GNUInstallDirs) # Standard directories for installation
|
||||||
include(GNUInstallDirs)
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_LIBRARY_NAME lxqt-globalkeys)
|
set(LXQT_GLOBALKEYS_LIBRARY_NAME lxqt-globalkeys)
|
||||||
set(LXQT_GLOBALKEYS_UI_LIBRARY_NAME lxqt-globalkeys-ui)
|
set(LXQT_GLOBALKEYS_UI_LIBRARY_NAME lxqt-globalkeys-ui)
|
||||||
set(LXQT_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/cmake)
|
set(LXQT_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_DATAROOTDIR}/cmake")
|
||||||
|
|
||||||
#************************************************
|
#************************************************
|
||||||
# Build config.cmake files
|
# Build config.cmake files
|
||||||
#************************************************
|
#************************************************
|
||||||
#set(LXQT_SHARE_DIR ${CMAKE_INSTALL_PREFIX}/share/lxqt)
|
|
||||||
#set(LXQT_TRANSLATIONS_DIR ${LXQT_SHARE_DIR}/translations)
|
|
||||||
include(cmake/FindInstallConfigPath.cmake)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_CMAKE_NAME ${LXQT_GLOBALKEYS_LIBRARY_NAME})
|
set(LXQT_GLOBALKEYS_CMAKE_NAME ${LXQT_GLOBALKEYS_LIBRARY_NAME})
|
||||||
set(LXQT_GLOBALKEYS_UI_CMAKE_NAME ${LXQT_GLOBALKEYS_UI_LIBRARY_NAME})
|
set(LXQT_GLOBALKEYS_UI_CMAKE_NAME ${LXQT_GLOBALKEYS_UI_LIBRARY_NAME})
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/${LXQT_GLOBALKEYS_LIBRARY_NAME}")
|
configure_package_config_file(
|
||||||
configure_file(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqt_globalkeys-config.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqt_globalkeys-config.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config.cmake"
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config.cmake"
|
||||||
@ONLY
|
INSTALL_DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_UI_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include/${LXQT_GLOBALKEYS_UI_LIBRARY_NAME})
|
configure_package_config_file(
|
||||||
configure_file(
|
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqt_globalkeys_ui-config.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/lxqt_globalkeys_ui-config.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config.cmake"
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config.cmake"
|
||||||
@ONLY
|
INSTALL_DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}"
|
||||||
)
|
)
|
||||||
#************************************************
|
#************************************************
|
||||||
# End of build config.cmake
|
# End of build config.cmake
|
||||||
#************************************************
|
#************************************************
|
||||||
|
|
||||||
|
#************************************************
|
||||||
|
# Generate config-version.cmake files
|
||||||
|
#************************************************
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config-version.cmake"
|
||||||
|
VERSION ${LXQT_VERSION}
|
||||||
|
COMPATIBILITY AnyNewerVersion
|
||||||
|
)
|
||||||
|
|
||||||
|
write_basic_package_version_file(
|
||||||
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config-version.cmake"
|
||||||
|
VERSION ${LXQT_VERSION}
|
||||||
|
COMPATIBILITY AnyNewerVersion
|
||||||
|
)
|
||||||
|
#************************************************
|
||||||
|
# End of generate config-version.cmake files
|
||||||
|
#************************************************
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
set(LXQT_GLOBALKEYS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
add_subdirectory(daemon)
|
add_subdirectory(daemon)
|
||||||
add_subdirectory(config)
|
add_subdirectory(config)
|
||||||
add_subdirectory(client)
|
add_subdirectory(client)
|
||||||
add_subdirectory(ui)
|
add_subdirectory(ui)
|
||||||
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME})
|
install(FILES
|
||||||
install(FILES cmake/lxqt_globalkeys_use.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME})
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config.cmake"
|
||||||
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}-config-version.cmake"
|
||||||
|
DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}"
|
||||||
|
)
|
||||||
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME})
|
install(FILES
|
||||||
install(FILES cmake/lxqt_globalkeys_ui_use.cmake DESTINATION ${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME})
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config.cmake"
|
||||||
|
"${CMAKE_BINARY_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}-config-version.cmake"
|
||||||
|
DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}"
|
||||||
|
)
|
||||||
|
|
||||||
# building tarball with CPack -------------------------------------------------
|
# building tarball with CPack -------------------------------------------------
|
||||||
include(InstallRequiredSystemLibraries)
|
include(InstallRequiredSystemLibraries)
|
||||||
|
@ -5,15 +5,8 @@ set(QT_DBUS_PREFIX "org.qtproject")
|
|||||||
|
|
||||||
set(${PROJECT_NAME}_HEADER_NAMESPACE "LXQtGlobalKeys")
|
set(${PROJECT_NAME}_HEADER_NAMESPACE "LXQtGlobalKeys")
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${PROJECT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_PATH_TO_DAEMON "${LXQT_GLOBALKEYS_SOURCE_DIR}/daemon")
|
set(${PROJECT_NAME}_PATH_TO_DAEMON "${LXQT_GLOBALKEYS_SOURCE_DIR}/daemon")
|
||||||
|
|
||||||
add_definitions(-DSHARED_EXPORT=Q_DECL_EXPORT)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_SOURCES
|
set(${PROJECT_NAME}_SOURCES
|
||||||
client.cpp
|
client.cpp
|
||||||
action.cpp
|
action.cpp
|
||||||
@ -21,7 +14,7 @@ set(${PROJECT_NAME}_SOURCES
|
|||||||
|
|
||||||
#
|
#
|
||||||
# WARNING: Changing stuff here implies changing this:
|
# WARNING: Changing stuff here implies changing this:
|
||||||
# install(FILES ${${PROJECT_NAME}_MAIN_HEADER} DESTINATION include/${PROJECT_NAME} COMPONENT development RENAME "lxqtglobalkeys.h")
|
# install(FILES ${${PROJECT_NAME}_MAIN_HEADER} DESTINATION include/${PROJECT_NAME} COMPONENT Devel RENAME "lxqtglobalkeys.h")
|
||||||
#
|
#
|
||||||
set(${PROJECT_NAME}_MAIN_HEADER
|
set(${PROJECT_NAME}_MAIN_HEADER
|
||||||
lxqt-globalkeys.h
|
lxqt-globalkeys.h
|
||||||
@ -53,10 +46,10 @@ set(${PROJECT_NAME}_TRANSLATIONS
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(${PROJECT_NAME}_DBUS_ADAPTORS
|
set(${PROJECT_NAME}_DBUS_ADAPTORS
|
||||||
${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.client.xml
|
"${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.client.xml"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.client.xml PROPERTIES
|
set_source_files_properties("${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.client.xml" PROPERTIES
|
||||||
INCLUDE action_p.h
|
INCLUDE action_p.h
|
||||||
PARENT_CLASSNAME GlobalKeyShortcut::ActionImpl
|
PARENT_CLASSNAME GlobalKeyShortcut::ActionImpl
|
||||||
BASENAME org.lxqt.global_key_shortcuts.client
|
BASENAME org.lxqt.global_key_shortcuts.client
|
||||||
@ -64,10 +57,10 @@ set_source_files_properties(${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_ke
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(${PROJECT_NAME}_DBUS_INTERFACES
|
set(${PROJECT_NAME}_DBUS_INTERFACES
|
||||||
${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.native.xml
|
"${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.native.xml"
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.native.xml PROPERTIES
|
set_source_files_properties("${${PROJECT_NAME}_PATH_TO_DAEMON}/org.lxqt.global_key_shortcuts.native.xml" PROPERTIES
|
||||||
BASENAME org.lxqt.global_key_shortcuts.native
|
BASENAME org.lxqt.global_key_shortcuts.native
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -128,16 +121,15 @@ foreach(DBUS_INTERFACE ${${PROJECT_NAME}_DBUS_INTERFACES})
|
|||||||
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
||||||
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
||||||
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} PROPERTIES
|
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" PROPERTIES
|
||||||
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
||||||
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
||||||
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
||||||
)
|
)
|
||||||
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} ${DBUS_INTERFACE_BASENAME})
|
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" ${DBUS_INTERFACE_BASENAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
||||||
qt5_wrap_ui(${PROJECT_NAME}_FORM_FILES ${${PROJECT_NAME}_FORMS})
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_GENERATED_FILES
|
set(${PROJECT_NAME}_GENERATED_FILES
|
||||||
${${PROJECT_NAME}_FORM_FILES}
|
${${PROJECT_NAME}_FORM_FILES}
|
||||||
@ -153,13 +145,32 @@ set(${PROJECT_NAME}_ALL_FILES
|
|||||||
${${PROJECT_NAME}_GENERATED_FILES}
|
${${PROJECT_NAME}_GENERATED_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_PKG_CONFIG_REQUIRES "Qt5Widget, Qt5DBus")
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_ALL_FILES})
|
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_ALL_FILES})
|
||||||
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::DBus)
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
PUBLIC
|
||||||
|
Qt5::Widgets
|
||||||
|
Qt5::DBus
|
||||||
|
)
|
||||||
set_target_properties(${PROJECT_NAME}
|
set_target_properties(${PROJECT_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${LXQT_VERSION}
|
VERSION ${LXQT_VERSION}
|
||||||
SOVERSION ${LXQT_MAJOR_VERSION}
|
SOVERSION ${LXQT_MAJOR_VERSION}
|
||||||
)
|
)
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${LXQT_GLOBALKEYS_LIBRARY_NAME}>"
|
||||||
|
)
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/include>"
|
||||||
|
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}>"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PRIVATE "SHARED_EXPORT=Q_DECL_EXPORT"
|
||||||
|
)
|
||||||
|
|
||||||
|
export(TARGETS ${PROJECT_NAME} FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}-targets.cmake")
|
||||||
|
|
||||||
include(create_portable_headers)
|
include(create_portable_headers)
|
||||||
|
|
||||||
@ -167,11 +178,75 @@ create_portable_headers(${PROJECT_NAME}_PORTABLE_HEADERS
|
|||||||
NAMESPACE "${${PROJECT_NAME}_NAMESPACE}/"
|
NAMESPACE "${${PROJECT_NAME}_NAMESPACE}/"
|
||||||
FILENAMES ${${PROJECT_NAME}_PUBLIC_CLASSES}
|
FILENAMES ${${PROJECT_NAME}_PUBLIC_CLASSES}
|
||||||
)
|
)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT runtime)
|
|
||||||
install(FILES ${${PROJECT_NAME}_MAIN_HEADER} DESTINATION include/${PROJECT_NAME} COMPONENT development)
|
|
||||||
install(FILES ${${PROJECT_NAME}_MAIN_HEADER} DESTINATION include/${PROJECT_NAME} COMPONENT development RENAME "lxqtglobalkeys.h")
|
|
||||||
install(FILES ${${PROJECT_NAME}_PORTABLE_HEADERS} DESTINATION include/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE} COMPONENT development)
|
|
||||||
install(FILES ${${PROJECT_NAME}_PUBLIC_HEADERS} DESTINATION include/${PROJECT_NAME} COMPONENT development)
|
|
||||||
|
|
||||||
include(create_pkgconfig_file)
|
# Copy public headers for intree building
|
||||||
create_pkgconfig_file(${PROJECT_NAME} "LXQt global key shortcuts client library")
|
foreach(h ${${PROJECT_NAME}_PUBLIC_HEADERS})
|
||||||
|
get_filename_component(bh ${h} NAME)
|
||||||
|
configure_file(${h} "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/${bh}" COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(h ${${PROJECT_NAME}_PORTABLE_HEADERS})
|
||||||
|
get_filename_component(bh ${h} NAME)
|
||||||
|
configure_file(${h} "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE}/${bh}" COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
"${${PROJECT_NAME}_MAIN_HEADER}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/${${PROJECT_NAME}_MAIN_HEADER}"
|
||||||
|
COPYONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
"${${PROJECT_NAME}_MAIN_HEADER}"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/lxqtglobalkeys.h"
|
||||||
|
COPYONLY
|
||||||
|
)
|
||||||
|
|
||||||
|
install(TARGETS
|
||||||
|
${PROJECT_NAME}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
EXPORT ${PROJECT_NAME}-targets
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
install(EXPORT
|
||||||
|
${PROJECT_NAME}-targets
|
||||||
|
DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_CMAKE_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_MAIN_HEADER}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_MAIN_HEADER}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
RENAME "lxqtglobalkeys.h"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_PORTABLE_HEADERS}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_PUBLIC_HEADERS}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
lxqt_create_pkgconfig_file(
|
||||||
|
PACKAGE_NAME ${PROJECT_NAME}
|
||||||
|
DESCRIPTIVE_NAME ${PROJECT_NAME}
|
||||||
|
DESCRIPTION "LXQt global key shortcuts client library"
|
||||||
|
INCLUDEDIRS ${PROJECT_NAME}
|
||||||
|
LIBS ${PROJECT_NAME}
|
||||||
|
REQUIRES ${${PROJECT_NAME}_PKG_CONFIG_REQUIRES}
|
||||||
|
VERSION ${LXQT_VERSION}
|
||||||
|
INSTALL
|
||||||
|
)
|
||||||
|
@ -41,9 +41,11 @@ ActionImpl::ActionImpl(ClientImpl *client, Action *interface, const QString &pat
|
|||||||
, mInterface(interface)
|
, mInterface(interface)
|
||||||
, mPath(path)
|
, mPath(path)
|
||||||
, mDescription(description)
|
, mDescription(description)
|
||||||
|
, mRegistrationPending(false)
|
||||||
{
|
{
|
||||||
new OrgLxqtActionClientAdaptor(this);
|
new OrgLxqtActionClientAdaptor(this);
|
||||||
|
|
||||||
|
connect(this, SIGNAL(emitRegistrationFinished()), mInterface, SIGNAL(registrationFinished()));
|
||||||
connect(this, SIGNAL(emitActivated()), mInterface, SIGNAL(activated()));
|
connect(this, SIGNAL(emitActivated()), mInterface, SIGNAL(activated()));
|
||||||
connect(this, SIGNAL(emitShortcutChanged(QString, QString)), mInterface, SIGNAL(shortcutChanged(QString, QString)));
|
connect(this, SIGNAL(emitShortcutChanged(QString, QString)), mInterface, SIGNAL(shortcutChanged(QString, QString)));
|
||||||
}
|
}
|
||||||
@ -55,12 +57,18 @@ ActionImpl::~ActionImpl()
|
|||||||
|
|
||||||
QString ActionImpl::changeShortcut(const QString &shortcut)
|
QString ActionImpl::changeShortcut(const QString &shortcut)
|
||||||
{
|
{
|
||||||
|
if (mRegistrationPending)
|
||||||
|
return mShortcut;
|
||||||
|
|
||||||
mShortcut = mClient->changeClientActionShortcut(mPath, shortcut);
|
mShortcut = mClient->changeClientActionShortcut(mPath, shortcut);
|
||||||
return mShortcut;
|
return mShortcut;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ActionImpl::changeDescription(const QString &description)
|
bool ActionImpl::changeDescription(const QString &description)
|
||||||
{
|
{
|
||||||
|
if (mRegistrationPending)
|
||||||
|
return false;
|
||||||
|
|
||||||
bool result = mClient->modifyClientAction(mPath, description);
|
bool result = mClient->modifyClientAction(mPath, description);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
@ -99,6 +107,19 @@ bool ActionImpl::isValid() const
|
|||||||
return mValid;
|
return mValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ActionImpl::setRegistrationPending(bool registrationPending)
|
||||||
|
{
|
||||||
|
mRegistrationPending = registrationPending;
|
||||||
|
if (!mRegistrationPending)
|
||||||
|
emit emitRegistrationFinished();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ActionImpl::isRegistrationPending() const
|
||||||
|
{
|
||||||
|
return mRegistrationPending;
|
||||||
|
}
|
||||||
|
|
||||||
void ActionImpl::activated()
|
void ActionImpl::activated()
|
||||||
{
|
{
|
||||||
emit emitActivated();
|
emit emitActivated();
|
||||||
|
@ -62,8 +62,10 @@ public:
|
|||||||
QString description() const;
|
QString description() const;
|
||||||
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
bool isRegistrationPending() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void registrationFinished();
|
||||||
void activated();
|
void activated();
|
||||||
void shortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
void shortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
||||||
|
|
||||||
|
@ -60,11 +60,15 @@ public:
|
|||||||
void setValid(bool valid);
|
void setValid(bool valid);
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
|
void setRegistrationPending(bool registrationPending);
|
||||||
|
bool isRegistrationPending() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void activated();
|
void activated();
|
||||||
void shortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
void shortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void emitRegistrationFinished();
|
||||||
void emitActivated();
|
void emitActivated();
|
||||||
void emitShortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
void emitShortcutChanged(const QString &oldShortcut, const QString &newShortcut);
|
||||||
|
|
||||||
@ -76,6 +80,7 @@ private:
|
|||||||
QString mShortcut;
|
QString mShortcut;
|
||||||
QString mDescription;
|
QString mDescription;
|
||||||
bool mValid;
|
bool mValid;
|
||||||
|
bool mRegistrationPending;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -82,14 +82,11 @@ void ClientImpl::daemonAppeared(const QString &)
|
|||||||
{
|
{
|
||||||
ActionImpl *globalActionImpl = I.value()->impl;
|
ActionImpl *globalActionImpl = I.value()->impl;
|
||||||
|
|
||||||
QDBusPendingReply<QString, qulonglong> reply = mProxy->addClientAction(globalActionImpl->shortcut(), QDBusObjectPath(globalActionImpl->path()), globalActionImpl->description());
|
QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(mProxy->addClientAction(globalActionImpl->shortcut(), QDBusObjectPath(globalActionImpl->path()), globalActionImpl->description()));
|
||||||
reply.waitForFinished();
|
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher *)), this, SLOT(registrationFinished(QDBusPendingCallWatcher *)));
|
||||||
globalActionImpl->setValid(!reply.isError() && reply.argumentAt<1>());
|
mPendingRegistrationsActions[watcher] = globalActionImpl;
|
||||||
|
mPendingRegistrationsWatchers[globalActionImpl] = watcher;
|
||||||
if (globalActionImpl->isValid())
|
globalActionImpl->setRegistrationPending(true);
|
||||||
{
|
|
||||||
globalActionImpl->setShortcut(reply.argumentAt<0>());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mDaemonPresent = true;
|
mDaemonPresent = true;
|
||||||
emit emitDaemonAppeared();
|
emit emitDaemonAppeared();
|
||||||
@ -101,6 +98,29 @@ bool ClientImpl::isDaemonPresent() const
|
|||||||
return mDaemonPresent;
|
return mDaemonPresent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClientImpl::registrationFinished(QDBusPendingCallWatcher *watcher)
|
||||||
|
{
|
||||||
|
QMap<QDBusPendingCallWatcher*, ActionImpl*>::Iterator I = mPendingRegistrationsActions.find(watcher);
|
||||||
|
if (I != mPendingRegistrationsActions.end())
|
||||||
|
{
|
||||||
|
ActionImpl *globalActionImpl = I.value();
|
||||||
|
|
||||||
|
QDBusPendingReply<QString, qulonglong> reply = *watcher;
|
||||||
|
globalActionImpl->setValid(!reply.isError() && reply.argumentAt<1>());
|
||||||
|
|
||||||
|
if (globalActionImpl->isValid())
|
||||||
|
{
|
||||||
|
globalActionImpl->setShortcut(reply.argumentAt<0>());
|
||||||
|
}
|
||||||
|
|
||||||
|
mPendingRegistrationsWatchers.remove(globalActionImpl);
|
||||||
|
mPendingRegistrationsActions.erase(I);
|
||||||
|
watcher->deleteLater();
|
||||||
|
|
||||||
|
globalActionImpl->setRegistrationPending(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Action *ClientImpl::addClientAction(const QString &shortcut, const QString &path, const QString &description, QObject *parent)
|
Action *ClientImpl::addClientAction(const QString &shortcut, const QString &path, const QString &description, QObject *parent)
|
||||||
{
|
{
|
||||||
if (!QRegExp("(/[A-Za-z0-9_]+){2,}").exactMatch(path))
|
if (!QRegExp("(/[A-Za-z0-9_]+){2,}").exactMatch(path))
|
||||||
@ -125,13 +145,11 @@ Action *ClientImpl::addClientAction(const QString &shortcut, const QString &path
|
|||||||
|
|
||||||
if (mDaemonPresent)
|
if (mDaemonPresent)
|
||||||
{
|
{
|
||||||
QDBusPendingReply<QString, qulonglong> reply = mProxy->addClientAction(shortcut, QDBusObjectPath(path), description);
|
QDBusPendingCallWatcher* watcher = new QDBusPendingCallWatcher(mProxy->addClientAction(shortcut, QDBusObjectPath(path), description));
|
||||||
reply.waitForFinished();
|
connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher *)), this, SLOT(registrationFinished(QDBusPendingCallWatcher *)));
|
||||||
globalActionImpl->setValid(!reply.isError() && reply.argumentAt<1>());
|
mPendingRegistrationsActions[watcher] = globalActionImpl;
|
||||||
if (globalActionImpl->isValid())
|
mPendingRegistrationsWatchers[globalActionImpl] = watcher;
|
||||||
{
|
globalActionImpl->setRegistrationPending(true);
|
||||||
globalActionImpl->setShortcut(reply.argumentAt<0>());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -204,6 +222,21 @@ bool ClientImpl::removeClientAction(const QString &path)
|
|||||||
|
|
||||||
void ClientImpl::removeAction(ActionImpl *actionImpl)
|
void ClientImpl::removeAction(ActionImpl *actionImpl)
|
||||||
{
|
{
|
||||||
|
if (actionImpl->isRegistrationPending())
|
||||||
|
{
|
||||||
|
QMap<ActionImpl*, QDBusPendingCallWatcher*>::Iterator I = mPendingRegistrationsWatchers.find(actionImpl);
|
||||||
|
if (I != mPendingRegistrationsWatchers.end())
|
||||||
|
{
|
||||||
|
QDBusPendingCallWatcher *watcher = I.value();
|
||||||
|
|
||||||
|
watcher->disconnect();
|
||||||
|
|
||||||
|
mPendingRegistrationsActions.remove(watcher);
|
||||||
|
mPendingRegistrationsWatchers.erase(I);
|
||||||
|
watcher->deleteLater();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString path = actionImpl->path();
|
QString path = actionImpl->path();
|
||||||
if (!mActions.contains(path))
|
if (!mActions.contains(path))
|
||||||
{
|
{
|
||||||
|
@ -81,6 +81,7 @@ public slots:
|
|||||||
void grabShortcutFinished(QDBusPendingCallWatcher *call);
|
void grabShortcutFinished(QDBusPendingCallWatcher *call);
|
||||||
void daemonDisappeared(const QString &);
|
void daemonDisappeared(const QString &);
|
||||||
void daemonAppeared(const QString &);
|
void daemonAppeared(const QString &);
|
||||||
|
void registrationFinished(QDBusPendingCallWatcher *call);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void emitShortcutGrabbed(const QString &);
|
void emitShortcutGrabbed(const QString &);
|
||||||
@ -98,6 +99,9 @@ private:
|
|||||||
QMap<QString, Action*> mActions;
|
QMap<QString, Action*> mActions;
|
||||||
QDBusServiceWatcher *mServiceWatcher;
|
QDBusServiceWatcher *mServiceWatcher;
|
||||||
bool mDaemonPresent;
|
bool mDaemonPresent;
|
||||||
|
|
||||||
|
QMap<QDBusPendingCallWatcher*, ActionImpl*> mPendingRegistrationsActions;
|
||||||
|
QMap<ActionImpl*, QDBusPendingCallWatcher*> mPendingRegistrationsWatchers;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# XDG standards expects system-wide configuration files in the /etc/xdg/lxqt location.
|
|
||||||
# Unfortunately QSettings we are using internally can be overriden in the Qt compilation
|
|
||||||
# time to use different path for system-wide configs. (for example configure ... -sysconfdir /etc/settings ...)
|
|
||||||
# This path can be found calling Qt4's qmake:
|
|
||||||
# qmake -query QT_INSTALL_CONFIGURATION
|
|
||||||
#
|
|
||||||
if(NOT DEFINED LXQT_ETC_XDG_DIR)
|
|
||||||
if(NOT QT_QMAKE_EXECUTABLE)
|
|
||||||
message(FATAL_ERROR "LXQT_ETC_XDG_DIR: qmake not found or wrongly detected (inlude before qt configured?)")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_CONFIGURATION
|
|
||||||
OUTPUT_VARIABLE LXQT_ETC_XDG_DIR
|
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
||||||
|
|
||||||
message(STATUS "LXQT_ETC_XDG_DIR autodetected as '${LXQT_ETC_XDG_DIR}'")
|
|
||||||
message(STATUS "You can set it manually with -DLXQT_ETC_XDG_DIR=<value>")
|
|
||||||
message(STATUS "")
|
|
||||||
endif ()
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
#
|
|
||||||
# Write a pkg-config pc file for given "name" with "decription"
|
|
||||||
# Arguments:
|
|
||||||
# name: a library name (withoud "lib" prefix and "so" suffixes
|
|
||||||
# desc: a desription string
|
|
||||||
#
|
|
||||||
macro (create_pkgconfig_file name desc)
|
|
||||||
set(_pkgfname "${CMAKE_CURRENT_BINARY_DIR}/${name}.pc")
|
|
||||||
#message(STATUS "${name}: writing pkgconfig file ${_pkgfname}")
|
|
||||||
|
|
||||||
file(WRITE "${_pkgfname}"
|
|
||||||
"# file generated by LXQt cmake build\n"
|
|
||||||
"prefix=${CMAKE_INSTALL_PREFIX}\n"
|
|
||||||
"libdir=\${prefix}/lib${LIB_SUFFIX}\n"
|
|
||||||
"includedir=\${prefix}/include\n"
|
|
||||||
"\n"
|
|
||||||
"Name: ${name}\n"
|
|
||||||
"Description: ${desc}\n"
|
|
||||||
"Version: ${LXQT_VERSION}\n"
|
|
||||||
"Libs: -L\${libdir} -l${name}\n"
|
|
||||||
"Cflags: -I\${includedir}\n"
|
|
||||||
"\n"
|
|
||||||
)
|
|
||||||
|
|
||||||
# FreeBSD loves to install files to different locations
|
|
||||||
# http://www.freebsd.org/doc/handbook/dirstructure.html
|
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
|
||||||
install(FILES ${_pkgfname} DESTINATION libdata/pkgconfig)
|
|
||||||
else()
|
|
||||||
install(FILES ${_pkgfname} DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
endmacro()
|
|
@ -3,41 +3,24 @@
|
|||||||
# The module defines the following variables
|
# The module defines the following variables
|
||||||
# LXQT_GLOBALKEYS_FOUND - Set to TRUE if all of the above has been found
|
# LXQT_GLOBALKEYS_FOUND - Set to TRUE if all of the above has been found
|
||||||
#
|
#
|
||||||
# LXQT_GLOBALKEYS_INCLUDE_DIR - The lxqt-globalkeys include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_INCLUDE_DIRS - The lxqt-globalkeys include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_LIBRARY_DIRS - The lxqt-globalkeys include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_LIBRARIES - The libraries needed to use lxqt-globalkeys
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_USE_FILE - The variable LXQT_GLOBALKEYS_USE_FILE is set which is the path
|
|
||||||
# to a CMake file that can be included to compile lxqt-globalkeys
|
|
||||||
# applications and libraries. It sets up the compilation
|
|
||||||
# environment for include directories and populates a
|
|
||||||
# LXQT_GLOBALKEYS_LIBRARIES variable.
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_QT_LIBRARIES - The Qt libraries needed by lxqt-globalkeys
|
|
||||||
#
|
|
||||||
# Typical usage:
|
# Typical usage:
|
||||||
# find_package(lxqt-globalkeys)
|
# find_package(lxqt-globalkeys)
|
||||||
# include(${LXQT_GLOBALKEYS_USE_FILE})
|
|
||||||
# add_executable(use-lxqt-globalkeys main.cpp)
|
# add_executable(use-lxqt-globalkeys main.cpp)
|
||||||
# target_link_libraries(use-qtxdg ${LXQT_GLOBALKEYS_QT_LIBRARIES} ${LXQT_GLOBALKEYS_LIBRARIES})
|
# target_link_libraries(use-lxqt-globalkeys lxqt-globalkeys)
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_INCLUDE_DIR @LXQT_GLOBALKEYS_INCLUDE_DIR@)
|
@PACKAGE_INIT@
|
||||||
set(LXQT_GLOBALKEYS_LIBRARY @LXQT_GLOBALKEYS_LIBRARY_NAME@)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_LIBRARIES "${LXQT_GLOBALKEYS_LIBRARY}")
|
include(CMakeFindDependencyMacro)
|
||||||
set(LXQT_GLOBALKEYS_INCLUDE_DIRS "${LXQT_GLOBALKEYS_INCLUDE_DIR}")
|
|
||||||
set(LXQT_GLOBALKEYS_LIBRARY_DIRS @CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/lxqt_globalkeys_use.cmake")
|
|
||||||
set(LXQT_GLOBALKEYS_FOUND 1)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_MAJOR_VERSION @LXQT_MAJOR_VERSION@)
|
set(LXQT_GLOBALKEYS_MAJOR_VERSION @LXQT_MAJOR_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_MINOR_VERSION @LXQT_MINOR_VERSION@)
|
set(LXQT_GLOBALKEYS_MINOR_VERSION @LXQT_MINOR_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_PATCH_VERSION @LXQT_PATCH_VERSION@)
|
set(LXQT_GLOBALKEYS_PATCH_VERSION @LXQT_PATCH_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_VERSION @LXQT_VERSION@)
|
set(LXQT_GLOBALKEYS_VERSION @LXQT_VERSION@)
|
||||||
|
|
||||||
mark_as_advanced(LXQT_GLOBALKEYS_LIBRARY LXQT_GLOBALKEYS_INCLUDE_DIR)
|
find_dependency(Qt5Widgets)
|
||||||
|
find_dependency(Qt5DBus)
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER 2.8.12)
|
||||||
|
cmake_policy(SET CMP0024 OLD)
|
||||||
|
endif()
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/lxqt-globalkeys-targets.cmake")
|
||||||
|
@ -3,41 +3,25 @@
|
|||||||
# The module defines the following variables
|
# The module defines the following variables
|
||||||
# LXQT_GLOBALKEYS_UI_FOUND - Set to TRUE if all of the above has been found
|
# LXQT_GLOBALKEYS_UI_FOUND - Set to TRUE if all of the above has been found
|
||||||
#
|
#
|
||||||
# LXQT_GLOBALKEYS_UI_INCLUDE_DIR - The lxqt-globalkeys-ui include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_UI_INCLUDE_DIRS - The lxqt-globalkeys-ui include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_LIBRARY_DIRS - The lxqt-globalkeys include directory
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_UI_LIBRARIES - The libraries needed to use lxqt-globalkeys-ui
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_UI_USE_FILE - The variable LXQT_GLOBALKEYS_UI_USE_FILE is set which is the path
|
|
||||||
# to a CMake file that can be included to compile lxqt-globalkeys-ui
|
|
||||||
# applications and libraries. It sets up the compilation
|
|
||||||
# environment for include directories and populates a
|
|
||||||
# LXQT_GLOBALKEYS_UI_LIBRARIES variable.
|
|
||||||
#
|
|
||||||
# LXQT_GLOBALKEYS_UI_QT_LIBRARIES - The Qt libraries needed by lxqt-globalkeys-ui
|
|
||||||
#
|
|
||||||
# Typical usage:
|
# Typical usage:
|
||||||
# find_package(lxqt-globalkeys-ui)
|
# find_package(lxqt-globalkeys-ui)
|
||||||
# include(${LXQT_GLOBALKEYS_UI_USE_FILE})
|
|
||||||
# add_executable(use-lxqt-globalkeys-ui main.cpp)
|
# add_executable(use-lxqt-globalkeys-ui main.cpp)
|
||||||
# target_link_libraries(use-qtxdg ${LXQT_GLOBALKEYS_UI_QT_LIBRARIES} ${LXQT_GLOBALKEYS_UI_LIBRARIES})
|
# target_link_libraries(use-lxqt-globalkeys-ui lxqt-globalkeys-ui)
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_UI_INCLUDE_DIR @LXQT_GLOBALKEYS_UI_INCLUDE_DIR@)
|
@PACKAGE_INIT@
|
||||||
set(LXQT_GLOBALKEYS_UI_LIBRARY @LXQT_GLOBALKEYS_UI_LIBRARY_NAME@)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_UI_LIBRARIES "${LXQT_GLOBALKEYS_UI_LIBRARY}")
|
include(CMakeFindDependencyMacro)
|
||||||
set(LXQT_GLOBALKEYS_UI_INCLUDE_DIRS "${LXQT_GLOBALKEYS_UI_INCLUDE_DIR}")
|
|
||||||
set(LXQT_GLOBALKEYS_UI_LIBRARY_DIRS @CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_UI_USE_FILE "${CMAKE_CURRENT_LIST_DIR}/lxqt_globalkeys_ui_use.cmake")
|
|
||||||
set(LXQT_GLOBALKEYS_UI_FOUND 1)
|
|
||||||
|
|
||||||
set(LXQT_GLOBALKEYS_UI_MAJOR_VERSION @LXQT_MAJOR_VERSION@)
|
set(LXQT_GLOBALKEYS_UI_MAJOR_VERSION @LXQT_MAJOR_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_UI_MINOR_VERSION @LXQT_MINOR_VERSION@)
|
set(LXQT_GLOBALKEYS_UI_MINOR_VERSION @LXQT_MINOR_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_UI_PATCH_VERSION @LXQT_PATCH_VERSION@)
|
set(LXQT_GLOBALKEYS_UI_PATCH_VERSION @LXQT_PATCH_VERSION@)
|
||||||
set(LXQT_GLOBALKEYS_UI_VERSION @LXQT_VERSION@)
|
set(LXQT_GLOBALKEYS_UI_VERSION @LXQT_VERSION@)
|
||||||
|
|
||||||
mark_as_advanced(LXQT_GLOBALKEYS_UI_LIBRARY LXQT_GLOBALKEYS_UI_INCLUDE_DIR)
|
find_dependency(Qt5Widgets)
|
||||||
|
find_dependency(Qt5DBus)
|
||||||
|
find_dependency(lxqt-globalkeys)
|
||||||
|
|
||||||
|
if (CMAKE_VERSION VERSION_GREATER 2.8.12)
|
||||||
|
cmake_policy(SET CMP0024 OLD)
|
||||||
|
endif()
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/lxqt-globalkeys-ui-targets.cmake")
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
include_directories(${LXQT_GLOBALKEYS_UI_INCLUDE_DIRS})
|
|
||||||
link_directories(${LXQT_GLOBALKEYS_UI_LIBRARY_DIRS})
|
|
@ -1,2 +0,0 @@
|
|||||||
include_directories(${LXQT_GLOBALKEYS_INCLUDE_DIRS})
|
|
||||||
link_directories(${LXQT_GLOBALKEYS_LIBRARY_DIRS})
|
|
@ -7,18 +7,8 @@ endif()
|
|||||||
|
|
||||||
find_package(KF5WindowSystem REQUIRED QUIET)
|
find_package(KF5WindowSystem REQUIRED QUIET)
|
||||||
|
|
||||||
set(QTX_INCLUDE_DIRS "")
|
|
||||||
set(QTX_LIBRARIES Qt5::Widgets Qt5::DBus)
|
|
||||||
|
|
||||||
set(QT_DBUS_PREFIX "org.qtproject")
|
set(QT_DBUS_PREFIX "org.qtproject")
|
||||||
|
|
||||||
include_directories(
|
|
||||||
"${PROJECT_SOURCE_DIR}"
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
${QTX_INCLUDE_DIRS}
|
|
||||||
${LXQT_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_PATH_TO_DAEMON "${LXQT_GLOBALKEYS_SOURCE_DIR}/daemon")
|
set(${PROJECT_NAME}_PATH_TO_DAEMON "${LXQT_GLOBALKEYS_SOURCE_DIR}/daemon")
|
||||||
|
|
||||||
set(${PROJECT_NAME}_SOURCES
|
set(${PROJECT_NAME}_SOURCES
|
||||||
@ -29,7 +19,6 @@ set(${PROJECT_NAME}_SOURCES
|
|||||||
shortcut_selector.cpp
|
shortcut_selector.cpp
|
||||||
${${PROJECT_NAME}_PATH_TO_DAEMON}/meta_types.cpp
|
${${PROJECT_NAME}_PATH_TO_DAEMON}/meta_types.cpp
|
||||||
edit_action_dialog.cpp
|
edit_action_dialog.cpp
|
||||||
shortcut_delegate.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(${PROJECT_NAME}_FORMS
|
set(${PROJECT_NAME}_FORMS
|
||||||
@ -94,23 +83,22 @@ foreach(DBUS_INTERFACE ${${PROJECT_NAME}_DBUS_INTERFACES})
|
|||||||
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
||||||
configure_file(
|
configure_file(
|
||||||
${DBUS_INTERFACE}
|
${DBUS_INTERFACE}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}
|
"${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
||||||
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
||||||
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
||||||
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} PROPERTIES
|
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" PROPERTIES
|
||||||
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
||||||
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
||||||
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
||||||
)
|
)
|
||||||
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} ${DBUS_INTERFACE_BASENAME})
|
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" ${DBUS_INTERFACE_BASENAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
||||||
qt5_wrap_ui(${PROJECT_NAME}_FORM_FILES ${${PROJECT_NAME}_FORMS})
|
|
||||||
|
|
||||||
# Translations **********************************
|
# Translations **********************************
|
||||||
lxqt_translate_ts(${PROJECT_NAME}_QM_FILES
|
lxqt_translate_ts(${PROJECT_NAME}_QM_FILES
|
||||||
@ -145,7 +133,16 @@ set(${PROJECT_NAME}_ALL_FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_ALL_FILES})
|
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_ALL_FILES})
|
||||||
target_link_libraries(${PROJECT_NAME} KF5::WindowSystem ${QTX_LIBRARIES} ${LXQT_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME} KF5::WindowSystem lxqt)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
install(FILES ${${PROJECT_NAME}_DESKTOP_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications)
|
${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_DESKTOP_FILES}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
@ -91,12 +91,6 @@ QVariant DefaultModel::data(const QModelIndex &index, int role) const
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::EditRole:
|
case Qt::EditRole:
|
||||||
if ((index.row() >= 0) && (index.row() < rowCount()) && (index.column() >= 0) && (index.column() < columnCount()))
|
|
||||||
switch (index.column())
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
return mContent[mContent.keys()[index.row()]].shortcut;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::FontRole:
|
case Qt::FontRole:
|
||||||
@ -179,25 +173,11 @@ Qt::ItemFlags DefaultModel::flags(const QModelIndex &index) const
|
|||||||
{
|
{
|
||||||
result |= Qt::ItemIsUserCheckable;
|
result |= Qt::ItemIsUserCheckable;
|
||||||
}
|
}
|
||||||
if (index.column() == 1)
|
|
||||||
{
|
|
||||||
result |= Qt::ItemIsEditable;
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DefaultModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
bool DefaultModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||||
{
|
{
|
||||||
switch (role)
|
|
||||||
{
|
|
||||||
case Qt::EditRole:
|
|
||||||
if ((index.row() >= 0) && (index.row() < rowCount()) && index.column() == 1)
|
|
||||||
{
|
|
||||||
mActions->changeShortcut(mContent.keys()[index.row()], value.toString());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,6 @@ Comment=Configure shortcut keys in LXQt
|
|||||||
Exec=lxqt-config-globalkeyshortcuts
|
Exec=lxqt-config-globalkeyshortcuts
|
||||||
Icon=preferences-desktop-keyboard
|
Icon=preferences-desktop-keyboard
|
||||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
Categories=Settings;DesktopSettings;Qt;LXQt;
|
||||||
OnlyShowIn=LXQt;LXDE;
|
OnlyShowIn=LXQt;
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=translations
|
#TRANSLATIONS_DIR=translations
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
LxQt::SingleApplication a(argc, argv);
|
LXQt::SingleApplication a(argc, argv);
|
||||||
|
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
a.setActivationWindow(&w);
|
a.setActivationWindow(&w);
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "actions.h"
|
#include "actions.h"
|
||||||
#include "default_model.h"
|
#include "default_model.h"
|
||||||
#include "edit_action_dialog.h"
|
#include "edit_action_dialog.h"
|
||||||
#include "shortcut_delegate.h"
|
|
||||||
|
|
||||||
#include <QItemSelectionModel>
|
#include <QItemSelectionModel>
|
||||||
#include <QSortFilterProxyModel>
|
#include <QSortFilterProxyModel>
|
||||||
@ -66,8 +65,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
mSelectionModel = new QItemSelectionModel(actions_TV->model());
|
mSelectionModel = new QItemSelectionModel(actions_TV->model());
|
||||||
actions_TV->setSelectionModel(mSelectionModel);
|
actions_TV->setSelectionModel(mSelectionModel);
|
||||||
|
|
||||||
actions_TV->setItemDelegateForColumn(1, new ShortcutDelegate(mActions, this));
|
|
||||||
|
|
||||||
connect(mSelectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(selectionChanged(QItemSelection, QItemSelection)));
|
connect(mSelectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(selectionChanged(QItemSelection, QItemSelection)));
|
||||||
|
|
||||||
connect(mActions, SIGNAL(daemonDisappeared()), SLOT(daemonDisappeared()));
|
connect(mActions, SIGNAL(daemonDisappeared()), SLOT(daemonDisappeared()));
|
||||||
@ -173,9 +170,6 @@ void MainWindow::on_actions_TV_doubleClicked(const QModelIndex &index)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
editAction(index);
|
editAction(index);
|
||||||
}
|
}
|
||||||
@ -185,18 +179,14 @@ void MainWindow::editAction(const QModelIndex &index)
|
|||||||
{
|
{
|
||||||
qulonglong id = 0;
|
qulonglong id = 0;
|
||||||
|
|
||||||
if (index.isValid())
|
if (!index.isValid())
|
||||||
{
|
return;
|
||||||
id = mDefaultModel->id(mSortFilterProxyModel->mapToSource(index));
|
|
||||||
}
|
id = mDefaultModel->id(mSortFilterProxyModel->mapToSource(index));
|
||||||
|
|
||||||
if (!mEditActionDialog)
|
if (!mEditActionDialog)
|
||||||
{
|
|
||||||
mEditActionDialog = new EditActionDialog(mActions, this);
|
mEditActionDialog = new EditActionDialog(mActions, this);
|
||||||
}
|
|
||||||
|
|
||||||
if (mEditActionDialog->load(id))
|
if (mEditActionDialog->load(id))
|
||||||
{
|
|
||||||
mEditActionDialog->exec();
|
mEditActionDialog->exec();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org
|
|
||||||
*
|
|
||||||
* Copyright: 2013 Razor team
|
|
||||||
* Authors:
|
|
||||||
* Kuzma Shapran <kuzma.shapran@gmail.com>
|
|
||||||
*
|
|
||||||
* This program or 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
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "shortcut_delegate.h"
|
|
||||||
#include "shortcut_selector.h"
|
|
||||||
#include "actions.h"
|
|
||||||
|
|
||||||
#include <QTimer>
|
|
||||||
|
|
||||||
|
|
||||||
ShortcutDelegate::ShortcutDelegate(Actions *actions, QObject *parent)
|
|
||||||
: QItemDelegate(parent)
|
|
||||||
, mActions(actions)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *ShortcutDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &/* option */, const QModelIndex &/* index */) const
|
|
||||||
{
|
|
||||||
ShortcutSelector *button = new ShortcutSelector(mActions, parent);
|
|
||||||
button->autoApplyShortcut();
|
|
||||||
QTimer::singleShot(0, button, SLOT(click()));
|
|
||||||
return button;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShortcutDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
|
||||||
{
|
|
||||||
ShortcutSelector *button = static_cast<ShortcutSelector*>(editor);
|
|
||||||
if (button->isGrabbing())
|
|
||||||
button->cancelNow();
|
|
||||||
model->setData(index, button->text(), Qt::EditRole);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShortcutDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
|
|
||||||
{
|
|
||||||
editor->setGeometry(option.rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ShortcutDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
|
|
||||||
{
|
|
||||||
static_cast<QAbstractButton*>(editor)->setText(index.model()->data(index, Qt::EditRole).toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
QSize ShortcutDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
|
||||||
{
|
|
||||||
QSize sizeHint = QItemDelegate::sizeHint(option , index);
|
|
||||||
sizeHint.setHeight(sizeHint.height() + 15);
|
|
||||||
return sizeHint;
|
|
||||||
}
|
|
@ -1,57 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org
|
|
||||||
*
|
|
||||||
* Copyright: 2013 Razor team
|
|
||||||
* Authors:
|
|
||||||
* Kuzma Shapran <kuzma.shapran@gmail.com>
|
|
||||||
*
|
|
||||||
* This program or 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
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef GLOBAL_ACTION_CONFIG__SHORTCUT_DELEGATE__INCLUDED
|
|
||||||
#define GLOBAL_ACTION_CONFIG__SHORTCUT_DELEGATE__INCLUDED
|
|
||||||
|
|
||||||
|
|
||||||
#include <QItemDelegate>
|
|
||||||
|
|
||||||
|
|
||||||
class Actions;
|
|
||||||
|
|
||||||
class ShortcutDelegate : public QItemDelegate
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit ShortcutDelegate(Actions *actions, QObject *parent = 0);
|
|
||||||
|
|
||||||
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
||||||
|
|
||||||
void setEditorData(QWidget *editor, const QModelIndex &index) const;
|
|
||||||
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
|
|
||||||
|
|
||||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
||||||
|
|
||||||
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Actions *mActions;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GLOBAL_ACTION_CONFIG__SHORTCUT_DELEGATE__INCLUDED
|
|
@ -1,92 +1,167 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE TS>
|
<!DOCTYPE TS>
|
||||||
<TS version="2.0" language="en_US">
|
<TS version="2.1">
|
||||||
<context>
|
<context>
|
||||||
<name>CommandFinder</name>
|
<name>DefaultModel</name>
|
||||||
<message>
|
|
||||||
<source>...</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Find a command</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>ShortcutConfigWindow</name>
|
|
||||||
<message>
|
|
||||||
<source>LxQt Shortcut Editor</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Description</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Shortcut</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="49"/>
|
||||||
<source>Command</source>
|
<source>Command</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add New</source>
|
<location filename="../default_model.cpp" line="50"/>
|
||||||
|
<source>DBus call</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Remove</source>
|
<location filename="../default_model.cpp" line="51"/>
|
||||||
|
<source>Client</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add Group</source>
|
<location filename="../default_model.cpp" line="147"/>
|
||||||
|
<source>Id</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Reset</source>
|
<location filename="../default_model.cpp" line="150"/>
|
||||||
|
<source>Shortcut</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Close</source>
|
<location filename="../default_model.cpp" line="153"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="156"/>
|
||||||
|
<source>Type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="159"/>
|
||||||
|
<source>Info</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ShortcutEditor</name>
|
<name>EditActionDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<source>None</source>
|
<location filename="../edit_action_dialog.ui" line="14"/>
|
||||||
|
<source>Edit Action</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add Shortcut</source>
|
<location filename="../edit_action_dialog.ui" line="31"/>
|
||||||
|
<source>&Shortcut:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="74"/>
|
||||||
|
<source>&Description:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="87"/>
|
||||||
|
<source>&Enabled</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="102"/>
|
||||||
|
<source>&Command</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="109"/>
|
||||||
|
<source>&DBus message</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="118"/>
|
||||||
|
<source>Type:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="164"/>
|
||||||
|
<source>Co&mmand:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="206"/>
|
||||||
|
<source>S&ervice:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="219"/>
|
||||||
|
<source>&Path:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="232"/>
|
||||||
|
<source>&Interface:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="245"/>
|
||||||
|
<source>&Method:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="14"/>
|
||||||
|
<source>Global Actions Manager</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="52"/>
|
||||||
|
<source>Add ...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="62"/>
|
||||||
<source>Remove</source>
|
<source>Remove</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>New Group</source>
|
<location filename="../main_window.ui" line="72"/>
|
||||||
|
<source>Modify ...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Reset Changes</source>
|
<location filename="../main_window.ui" line="89"/>
|
||||||
|
<source>Swap</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Question</source>
|
<location filename="../main_window.ui" line="115"/>
|
||||||
|
<source>Multiple actions behaviour:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Delete group: %1? (everything inside will be removed altogether)</source>
|
<location filename="../main_window.ui" line="123"/>
|
||||||
|
<source>First</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Delete %1?</source>
|
<location filename="../main_window.ui" line="128"/>
|
||||||
|
<source>Last</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Binding for %1 already exists. Replace old one?</source>
|
<location filename="../main_window.ui" line="133"/>
|
||||||
|
<source>None</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="138"/>
|
||||||
|
<source>All</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="176"/>
|
||||||
|
<source>Close</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[cs]=Nastavení klávesových zkratek
|
Name[cs]=Nastavení klávesových zkratek
|
||||||
Comment[cs]=Nastavit celkové klávesové zkratky pro prostředí LxQt
|
Comment[cs]=Nastavit celkové klávesové zkratky pro prostředí LXQt
|
||||||
GenericName[cs]=Nastavení celkových klávesových zkratek
|
GenericName[cs]=Nastavení celkových klávesových zkratek
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor zkratek</translation>
|
<translation>Editor zkratek</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[cs_CZ]=Nastavení klávesových zkratek
|
Name[cs_CZ]=Nastavení klávesových zkratek
|
||||||
Comment[cs_CZ]=Nastavit celkové klávesové zkratky pro prostředí LxQt
|
Comment[cs_CZ]=Nastavit celkové klávesové zkratky pro prostředí LXQt
|
||||||
GenericName[cs_CZ]=Nastavení celkových klávesových zkratek
|
GenericName[cs_CZ]=Nastavení celkových klávesových zkratek
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor zkratek</translation>
|
<translation>Editor zkratek</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[da]=Konfiguration af LxQt Tastaturgenveje
|
Name[da]=Konfiguration af LXQt Tastaturgenveje
|
||||||
Comment[da]=Konfigurer globale tastaturgenveje for LxQt-skrivebordet
|
Comment[da]=Konfigurer globale tastaturgenveje for LXQt-skrivebordet
|
||||||
GenericName[da]=Konfiguration af LxQt Globale Tastaturgenveje
|
GenericName[da]=Konfiguration af LXQt Globale Tastaturgenveje
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[da_DK]=Konfiguration af LxQt Tastaturgenveje
|
Name[da_DK]=Konfiguration af LXQt Tastaturgenveje
|
||||||
Comment[da_DK]=Konfigurer globale tastaturgenveje for LxQt-skrivebordet
|
Comment[da_DK]=Konfigurer globale tastaturgenveje for LXQt-skrivebordet
|
||||||
GenericName[da_DK]=Konfiguration af LxQt Globale Tastaturgenveje
|
GenericName[da_DK]=Konfiguration af LXQt Globale Tastaturgenveje
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>LxQt Tastaturgenveje</translation>
|
<translation>LXQt Tastaturgenveje</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[de]=Kurzbefehl-Konfiguration
|
||||||
|
GenericName[de]=Globale Kurzbefehlkonfiguration
|
||||||
|
Comment[de]=Globale Kurzbefehle für die LXQt Arbeitsfläche definieren
|
@ -1,75 +1,169 @@
|
|||||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="de">
|
||||||
<context>
|
<context>
|
||||||
<name>CommandFinder</name>
|
<name>DefaultModel</name>
|
||||||
<message>
|
<message>
|
||||||
<source>...</source>
|
<location filename="../default_model.cpp" line="49"/>
|
||||||
<translation type="unfinished"/>
|
<source>Command</source>
|
||||||
|
<translation>Befehl</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Find a command</source>
|
<location filename="../default_model.cpp" line="50"/>
|
||||||
<translation type="unfinished"/>
|
<source>DBus call</source>
|
||||||
|
<translation>DBus-Aufruf</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="51"/>
|
||||||
|
<source>Client</source>
|
||||||
|
<translation>Client</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="147"/>
|
||||||
|
<source>Id</source>
|
||||||
|
<translation>Kennung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="150"/>
|
||||||
|
<source>Shortcut</source>
|
||||||
|
<translation>Kurzbefehl</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="153"/>
|
||||||
|
<source>Description</source>
|
||||||
|
<translation>Beschreibung</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="156"/>
|
||||||
|
<source>Type</source>
|
||||||
|
<translation>Typ</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../default_model.cpp" line="159"/>
|
||||||
|
<source>Info</source>
|
||||||
|
<translation>Information</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>EditActionDialog</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<location filename="../edit_action_dialog.ui" line="14"/>
|
||||||
<translation type="unfinished"/>
|
<source>Edit Action</source>
|
||||||
|
<translation>Befehl bearbeiten</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<location filename="../edit_action_dialog.ui" line="31"/>
|
||||||
<translation type="unfinished"/>
|
<source>&Shortcut:</source>
|
||||||
|
<translation>&Kurzbefehl:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Shortcut</source>
|
<location filename="../edit_action_dialog.ui" line="74"/>
|
||||||
<translation type="unfinished"/>
|
<source>&Description:</source>
|
||||||
|
<translation>&Beschreibung:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Command</source>
|
<location filename="../edit_action_dialog.ui" line="87"/>
|
||||||
<translation type="unfinished"/>
|
<source>&Enabled</source>
|
||||||
|
<translation>&Aktiviert</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add New</source>
|
<location filename="../edit_action_dialog.ui" line="102"/>
|
||||||
<translation type="unfinished"/>
|
<source>&Command</source>
|
||||||
|
<translation>B&efehl</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="109"/>
|
||||||
|
<source>&DBus message</source>
|
||||||
|
<translation>&DBus-Nachricht</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="118"/>
|
||||||
|
<source>Type:</source>
|
||||||
|
<translation>Typ:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="164"/>
|
||||||
|
<source>Co&mmand:</source>
|
||||||
|
<translation>Be&fehl:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="206"/>
|
||||||
|
<source>S&ervice:</source>
|
||||||
|
<translation>Ser&vice:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="219"/>
|
||||||
|
<source>&Path:</source>
|
||||||
|
<translation>&Pfad:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="232"/>
|
||||||
|
<source>&Interface:</source>
|
||||||
|
<translatorcomment>&Schnittstelle:</translatorcomment>
|
||||||
|
<translation>&Interface:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../edit_action_dialog.ui" line="245"/>
|
||||||
|
<source>&Method:</source>
|
||||||
|
<translation>&Methode:</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>MainWindow</name>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="14"/>
|
||||||
|
<source>Global Actions Manager</source>
|
||||||
|
<translation>Globaler Aktionsmanager</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="52"/>
|
||||||
|
<source>Add ...</source>
|
||||||
|
<translation>Hinzufügen ...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="62"/>
|
||||||
<source>Remove</source>
|
<source>Remove</source>
|
||||||
<translation>Entfernen</translation>
|
<translation>Entfernen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Add Group</source>
|
<location filename="../main_window.ui" line="72"/>
|
||||||
<translation type="unfinished"/>
|
<source>Modify ...</source>
|
||||||
|
<translation>Ändern ...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Reset</source>
|
<location filename="../main_window.ui" line="89"/>
|
||||||
<translation type="unfinished"/>
|
<source>Swap</source>
|
||||||
|
<translation>Tauschen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="115"/>
|
||||||
|
<source>Multiple actions behaviour:</source>
|
||||||
|
<translation>Verhalten bei mehreren Aktionen:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="123"/>
|
||||||
|
<source>First</source>
|
||||||
|
<translation>Erste</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="128"/>
|
||||||
|
<source>Last</source>
|
||||||
|
<translation>Letzte</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="133"/>
|
||||||
|
<source>None</source>
|
||||||
|
<translation>Keine</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="138"/>
|
||||||
|
<source>All</source>
|
||||||
|
<translation>Alle</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../main_window.ui" line="176"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation>Schließen</translation>
|
<translation>Schließen</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
|
||||||
<name>ShortcutEditor</name>
|
|
||||||
<message>
|
|
||||||
<source>None</source>
|
|
||||||
<translation type="unfinished"/>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Add Shortcut</source>
|
|
||||||
<translation type="unfinished"/>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Remove</source>
|
|
||||||
<translation>Entfernen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>New Group</source>
|
|
||||||
<translation type="unfinished"/>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reset Changes</source>
|
|
||||||
<translation type="unfinished"/>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
</TS>
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Name[de_DE]=LxQt Hotkey Konfiguration
|
|
||||||
Comment[de_DE]=Globalen Hotkey für LxQt Desktop definieren
|
|
||||||
GenericName[de_DE]=LxQt Globale Hotkey Konfiguration
|
|
@ -1,75 +0,0 @@
|
|||||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de_DE" version="2.0">
|
|
||||||
<context>
|
|
||||||
<name>CommandFinder</name>
|
|
||||||
<message>
|
|
||||||
<source>...</source>
|
|
||||||
<translation>...</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Find a command</source>
|
|
||||||
<translation>Finde einen Befehl</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>ShortcutConfigWindow</name>
|
|
||||||
<message>
|
|
||||||
<source>LxQt Shortcut Editor</source>
|
|
||||||
<translation>LxQt Hotkey Editor</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Description</source>
|
|
||||||
<translation>Beschreibung</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Shortcut</source>
|
|
||||||
<translation>Hotkey</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Command</source>
|
|
||||||
<translation>Befehl</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Add New</source>
|
|
||||||
<translation>Hinzufügen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Remove</source>
|
|
||||||
<translation>Entfernen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Add Group</source>
|
|
||||||
<translation>Gruppe hinzufügen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reset</source>
|
|
||||||
<translation>Verwerfen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Close</source>
|
|
||||||
<translation>Schließen</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
<context>
|
|
||||||
<name>ShortcutEditor</name>
|
|
||||||
<message>
|
|
||||||
<source>None</source>
|
|
||||||
<translation>Kein</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Add Shortcut</source>
|
|
||||||
<translation>Hotkey hinzufügen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Remove</source>
|
|
||||||
<translation>Entfernen</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>New Group</source>
|
|
||||||
<translation>Neue Gruppe</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<source>Reset Changes</source>
|
|
||||||
<translation>Änderungen verwerfen</translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
|
||||||
</TS>
|
|
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[el]=Πλήκτρα συντομεύσεων
|
||||||
|
GenericName[el]=Ρυθμίσεις συντομεύσεων πληκτρολογίου
|
||||||
|
Comment[el]=Διαμόρφωση των πλήκτρων συντομεύσεων του LXQt
|
@ -1,4 +1,6 @@
|
|||||||
<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0">
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="el">
|
||||||
<context>
|
<context>
|
||||||
<name>CommandFinder</name>
|
<name>CommandFinder</name>
|
||||||
<message>
|
<message>
|
||||||
@ -13,8 +15,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Επεξεργασία συντομεύσεων LxQt</translation>
|
<translation>Επεξεργασία συντομεύσεων LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Name[el_GR]=Διαμόρφωση συντομεύσεων LxQt
|
|
||||||
Comment[el_GR]=Διαμόρφωση των καθολικών συντομεύσεων του LxQt
|
|
||||||
GenericName[el_GR]=Διαμόρφωση καθολικών συντομεύσεων LxQt
|
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[es]=Configuración de Atajos de LxQt
|
Name[es]=Configuración de Atajos de LXQt
|
||||||
Comment[es]=Configure atajos globales del Escritorio de LxQt
|
Comment[es]=Configure atajos globales del Escritorio de LXQt
|
||||||
GenericName[es]=Configuración de Atajos Globales de LxQt
|
GenericName[es]=Configuración de Atajos Globales de LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor de Atajos de LxQt</translation>
|
<translation>Editor de Atajos de LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[es_VE]=Configuracion de atajos de LxQt
|
Name[es_VE]=Configuracion de atajos de LXQt
|
||||||
Comment[es_VE]=Configura atajos de teclado para el escritorio LxQt
|
Comment[es_VE]=Configura atajos de teclado para el escritorio LXQt
|
||||||
GenericName[es_VE]=Configuracion de Atajos globales de LxQt
|
GenericName[es_VE]=Configuracion de Atajos globales de LXQt
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor de atajos</translation>
|
<translation>Editor de atajos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[eu]=LxQt lasterbideen konfigurazioa
|
Name[eu]=LXQt lasterbideen konfigurazioa
|
||||||
Comment[eu]=Konfiguratu LxQt mahaigainaren lasterbide globalak
|
Comment[eu]=Konfiguratu LXQt mahaigainaren lasterbide globalak
|
||||||
GenericName[eu]=LxQt lasterbide globalen konfigurazioa
|
GenericName[eu]=LXQt lasterbide globalen konfigurazioa
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>LxQt lasterbide-editorea</translation>
|
<translation>LXQt lasterbide-editorea</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
# Translations
|
||||||
|
Name[hu]=LXQt gyorsbillentyűk
|
||||||
|
Comment[hu]=LXQt általános forróbillentyűinek beállítása
|
||||||
|
GenericName[hu]=LXQt gyorsbillentyűk beállítása
|
93
config/translations/lxqt-config-globalkeyshortcuts_hu.ts
Normal file
93
config/translations/lxqt-config-globalkeyshortcuts_hu.ts
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE TS>
|
||||||
|
<TS version="2.1" language="hu_HU">
|
||||||
|
<context>
|
||||||
|
<name>CommandFinder</name>
|
||||||
|
<message>
|
||||||
|
<source>...</source>
|
||||||
|
<translation>...</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Find a command</source>
|
||||||
|
<translation>Parancs keresés</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutConfigWindow</name>
|
||||||
|
<message>
|
||||||
|
<source>LXQt Shortcut Editor</source>
|
||||||
|
<translation>LXQt forróbillentyű szerkesztés</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Description</source>
|
||||||
|
<translation>Leírás</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Shortcut</source>
|
||||||
|
<translation>Forróbillentyű</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Command</source>
|
||||||
|
<translation>Parancs</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Add New</source>
|
||||||
|
<translation>Új</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove</source>
|
||||||
|
<translation>Törlés</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Add Group</source>
|
||||||
|
<translation>Csoport</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset</source>
|
||||||
|
<translation>Visszavon</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Close</source>
|
||||||
|
<translation>Bezár</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>ShortcutEditor</name>
|
||||||
|
<message>
|
||||||
|
<source>None</source>
|
||||||
|
<translation>Nincs</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Add Shortcut</source>
|
||||||
|
<translation>Forróbillentyű adás</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove</source>
|
||||||
|
<translation>Törlés</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>New Group</source>
|
||||||
|
<translation>Új csoport</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reset Changes</source>
|
||||||
|
<translation>Visszavonás</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Question</source>
|
||||||
|
<translation>Kérdés</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Delete group: %1? (everything inside will be removed altogether)</source>
|
||||||
|
<translation>A %1 csoport törlése? (Minden kapcsolata is törlődik)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Delete %1?</source>
|
||||||
|
<translation>%1 törlése?</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Binding for %1 already exists. Replace old one?</source>
|
||||||
|
<translation>A %1 már foglalt. Felváltsuk az újjal?</translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
|
</TS>
|
@ -1,4 +1,3 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[it_IT]=Configurazione delle scorciatoie di LxQt
|
Name[it_IT]=Scorciatoie globali
|
||||||
Comment[it_IT]=Configura le scorciatoie globali del desktop LxQt
|
Comment[it_IT]=Configura le scorciatoie globali di LXQt
|
||||||
GenericName[it_IT]=Configurazione delle scorciatoie globali di LxQt
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor delle scorciatoie di LxQt</translation>
|
<translation>Editor delle scorciatoie di LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[pl_PL]=Konfiguracja skrótów pulpitu LxQt
|
Name[pl_PL]=Konfiguracja skrótów pulpitu LXQt
|
||||||
Comment[pl_PL]=Określ globalny skrót pulpitu LxQt
|
Comment[pl_PL]=Określ globalny skrót pulpitu LXQt
|
||||||
GenericName[pl_PL]=Konfiguracja globalnych skrótów pulpitu LxQt
|
GenericName[pl_PL]=Konfiguracja globalnych skrótów pulpitu LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Edytor Skrótów LxQt</translation>
|
<translation>Edytor Skrótów LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[pt]=Teclas de atalho
|
Name[pt]=Teclas de atalho
|
||||||
GenericName[pt]=Definições das teclas de atalho
|
GenericName[pt]=Definições das teclas de atalho
|
||||||
Comment[pt]=Configurar as teclas de atalho do LxQt
|
Comment[pt]=Configurar as teclas de atalho do LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor de atalhos do LxQt</translation>
|
<translation>Editor de atalhos do LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[pt_BR]=Configuração Do Atalho
|
Name[pt_BR]=Configuração Do Atalho
|
||||||
Comment[pt_BR]=Configurar atalhos globais do desktop LxQt
|
Comment[pt_BR]=Configurar atalhos globais do desktop LXQt
|
||||||
GenericName[pt_BR]=Configurações Dos Atalhos Globais
|
GenericName[pt_BR]=Configurações Dos Atalhos Globais
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor De Atalhos</translation>
|
<translation>Editor De Atalhos</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[ro_RO]=Configurație acceleratori LxQt
|
Name[ro_RO]=Configurație acceleratori LXQt
|
||||||
Comment[ro_RO]=Configurează acceleratorii globali pentru LxQt
|
Comment[ro_RO]=Configurează acceleratorii globali pentru LXQt
|
||||||
GenericName[ro_RO]=Configurație acceleratori globali LxQt
|
GenericName[ro_RO]=Configurație acceleratori globali LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Editor acceleratori LxQt</translation>
|
<translation>Editor acceleratori LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[ru]=Сочетания клавиш
|
Name[ru]=Сочетания клавиш
|
||||||
Comment[ru]=Настроить сочетание клавиш в LxQt
|
Comment[ru]=Настроить сочетание клавиш в LXQt
|
||||||
GenericName[ru]=Настроить сочетания клавиш
|
GenericName[ru]=Настроить сочетания клавиш
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[ru_RU]=Сочетания клавиш
|
Name[ru_RU]=Сочетания клавиш
|
||||||
Comment[ru_RU]=Настроить сочетание клавиш в LxQt
|
Comment[ru_RU]=Настроить сочетание клавиш в LXQt
|
||||||
GenericName[ru_RU]=Настроить сочетания клавиш
|
GenericName[ru_RU]=Настроить сочетания клавиш
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[th_TH]=การตั้งค่าปุ่มลัด LxQt
|
Name[th_TH]=การตั้งค่าปุ่มลัด LXQt
|
||||||
Comment[th_TH]=ตั้งค่าปุ่มลัดหลักของ LxQt เดกส์ท็อป
|
Comment[th_TH]=ตั้งค่าปุ่มลัดหลักของ LXQt เดกส์ท็อป
|
||||||
GenericName[th_TH]=การตั้งค่าปุ่มลัดหลัก LxQt
|
GenericName[th_TH]=การตั้งค่าปุ่มลัดหลัก LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>ตัวแก้ไขปุ่มลัด LxQt</translation>
|
<translation>ตัวแก้ไขปุ่มลัด LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation type="unfinished"/>
|
<translation type="unfinished"/>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[uk]=Налаштування скорочень LxQt
|
Name[uk]=Налаштування скорочень LXQt
|
||||||
Comment[uk]=Налаштувати глобальні скорочення стільниці LxQt
|
Comment[uk]=Налаштувати глобальні скорочення стільниці LXQt
|
||||||
GenericName[uk]=Налаштування глобальних скорочень LxQt
|
GenericName[uk]=Налаштування глобальних скорочень LXQt
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>Редактор скорочень LxQt</translation>
|
<translation>Редактор скорочень LXQt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[zh_CN]=LxQt 快捷键配置
|
Name[zh_CN]=LXQt 快捷键配置
|
||||||
Comment[zh_CN]=配置 LxQt 桌面全局快捷键
|
Comment[zh_CN]=配置 LXQt 桌面全局快捷键
|
||||||
GenericName[zh_CN]=LxQt 全局快捷键配置
|
GenericName[zh_CN]=LXQt 全局快捷键配置
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>LxQt 快捷键编辑器</translation>
|
<translation>LXQt 快捷键编辑器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Translations
|
# Translations
|
||||||
Name[zh_TW]=LxQt快捷鍵設定
|
Name[zh_TW]=LXQt快捷鍵設定
|
||||||
Comment[zh_TW]=設定LxQt桌面的全域快捷鍵
|
Comment[zh_TW]=設定LXQt桌面的全域快捷鍵
|
||||||
GenericName[zh_TW]=LxQt全域快捷鍵設定
|
GenericName[zh_TW]=LXQt全域快捷鍵設定
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>ShortcutConfigWindow</name>
|
<name>ShortcutConfigWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<source>LxQt Shortcut Editor</source>
|
<source>LXQt Shortcut Editor</source>
|
||||||
<translation>LxQt快捷鍵編輯器</translation>
|
<translation>LXQt快捷鍵編輯器</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Description</source>
|
<source>Description</source>
|
||||||
|
@ -6,15 +6,10 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(X11)
|
find_package(X11)
|
||||||
include_directories(${X11_INCLUDE_DIR})
|
include_directories("${X11_INCLUDE_DIR}")
|
||||||
|
|
||||||
set(QT_DBUS_PREFIX "org.qtproject")
|
set(QT_DBUS_PREFIX "org.qtproject")
|
||||||
|
|
||||||
include_directories(
|
|
||||||
${PROJECT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_SOURCES
|
set(${PROJECT_NAME}_SOURCES
|
||||||
main.cpp
|
main.cpp
|
||||||
core.cpp
|
core.cpp
|
||||||
@ -92,7 +87,7 @@ foreach(DBUS_ADAPTOR ${${PROJECT_NAME}_DBUS_ADAPTORS})
|
|||||||
get_filename_component(DBUS_ADAPTOR_FILENAME ${DBUS_ADAPTOR} NAME)
|
get_filename_component(DBUS_ADAPTOR_FILENAME ${DBUS_ADAPTOR} NAME)
|
||||||
configure_file(
|
configure_file(
|
||||||
${DBUS_ADAPTOR}
|
${DBUS_ADAPTOR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME}
|
"${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME}"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
get_source_file_property(DBUS_ADAPTOR_INCLUDE ${DBUS_ADAPTOR} INCLUDE)
|
get_source_file_property(DBUS_ADAPTOR_INCLUDE ${DBUS_ADAPTOR} INCLUDE)
|
||||||
@ -101,12 +96,12 @@ foreach(DBUS_ADAPTOR ${${PROJECT_NAME}_DBUS_ADAPTORS})
|
|||||||
get_source_file_property(DBUS_ADAPTOR_CLASSNAME ${DBUS_ADAPTOR} CLASSNAME)
|
get_source_file_property(DBUS_ADAPTOR_CLASSNAME ${DBUS_ADAPTOR} CLASSNAME)
|
||||||
if(DBUS_ADAPTOR_BASENAME)
|
if(DBUS_ADAPTOR_BASENAME)
|
||||||
if(DBUS_ADAPTOR_CLASSNAME)
|
if(DBUS_ADAPTOR_CLASSNAME)
|
||||||
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME} ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME} ${DBUS_ADAPTOR_BASENAME} ${DBUS_ADAPTOR_CLASSNAME})
|
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME}" ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME} ${DBUS_ADAPTOR_BASENAME} ${DBUS_ADAPTOR_CLASSNAME})
|
||||||
else()
|
else()
|
||||||
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME} ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME} ${DBUS_ADAPTOR_BASENAME})
|
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME}" ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME} ${DBUS_ADAPTOR_BASENAME})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME} ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME})
|
qt5_add_dbus_adaptor(${PROJECT_NAME}_DBUS_ADAPTOR_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_ADAPTOR_FILENAME}" ${DBUS_ADAPTOR_INCLUDE} ${DBUS_ADAPTOR_PARENT_CLASSNAME})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@ -114,23 +109,22 @@ foreach(DBUS_INTERFACE ${${PROJECT_NAME}_DBUS_INTERFACES})
|
|||||||
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
||||||
configure_file(
|
configure_file(
|
||||||
${DBUS_INTERFACE}
|
${DBUS_INTERFACE}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}
|
"${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
||||||
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
get_source_file_property(DBUS_INTERFACE_INCLUDE ${DBUS_INTERFACE} INCLUDE)
|
||||||
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
get_source_file_property(DBUS_INTERFACE_CLASSNAME ${DBUS_INTERFACE} CLASSNAME)
|
||||||
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
get_source_file_property(DBUS_INTERFACE_NO_NAMESPACE ${DBUS_INTERFACE} NO_NAMESPACE)
|
||||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} PROPERTIES
|
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" PROPERTIES
|
||||||
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
INCLUDE ${DBUS_INTERFACE_INCLUDE}
|
||||||
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
||||||
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
||||||
)
|
)
|
||||||
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} ${DBUS_INTERFACE_BASENAME})
|
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" ${DBUS_INTERFACE_BASENAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
||||||
qt5_wrap_ui(${PROJECT_NAME}_FORM_FILES ${${PROJECT_NAME}_FORMS})
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_GENERATED_FILES
|
set(${PROJECT_NAME}_GENERATED_FILES
|
||||||
${${PROJECT_NAME}_FORM_FILES}
|
${${PROJECT_NAME}_FORM_FILES}
|
||||||
@ -147,6 +141,11 @@ set(${PROJECT_NAME}_ALL_FILES
|
|||||||
)
|
)
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_ALL_FILES})
|
add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_ALL_FILES})
|
||||||
target_link_libraries(${PROJECT_NAME} ${X11_LIBRARIES} Qt5::Widgets Qt5::DBus)
|
target_link_libraries(${PROJECT_NAME} ${X11_LIBRARIES} lxqt Qt5::Widgets Qt5::DBus)
|
||||||
|
lxqt_enable_target_exceptions(${PROJECT_NAME} PRIVATE)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
install(TARGETS
|
||||||
|
${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
343
daemon/core.cpp
343
daemon/core.cpp
@ -25,8 +25,9 @@
|
|||||||
*
|
*
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
* END_COMMON_COPYRIGHT_HEADER */
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <LXQt/Application>
|
||||||
|
|
||||||
|
#include <QScopedArrayPointer>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDBusConnectionInterface>
|
#include <QDBusConnectionInterface>
|
||||||
@ -69,14 +70,6 @@ enum
|
|||||||
static Core *s_Core = 0;
|
static Core *s_Core = 0;
|
||||||
|
|
||||||
|
|
||||||
void unixSignalHandler(int signalNumber)
|
|
||||||
{
|
|
||||||
if (s_Core)
|
|
||||||
{
|
|
||||||
s_Core->unixSignalHandler(signalNumber);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int x11ErrorHandler(Display *display, XErrorEvent *errorEvent)
|
int x11ErrorHandler(Display *display, XErrorEvent *errorEvent)
|
||||||
{
|
{
|
||||||
if (s_Core)
|
if (s_Core)
|
||||||
@ -411,8 +404,8 @@ Core::Core(bool useSyslog, bool minLogLevelSet, int minLogLevel, const QStringLi
|
|||||||
|
|
||||||
openlog("lxqt-global-action-daemon", LOG_PID, LOG_USER);
|
openlog("lxqt-global-action-daemon", LOG_PID, LOG_USER);
|
||||||
|
|
||||||
::signal(SIGTERM, ::unixSignalHandler);
|
connect(lxqtApp, &LXQt::Application::unixSignal, this, &Core::unixSignalHandler);
|
||||||
::signal(SIGINT, ::unixSignalHandler);
|
lxqtApp->listenToUnixSignals(QList<int>() << SIGTERM << SIGINT);
|
||||||
|
|
||||||
|
|
||||||
if (!QDBusConnection::sessionBus().registerService("org.lxqt.global_key_shortcuts"))
|
if (!QDBusConnection::sessionBus().registerService("org.lxqt.global_key_shortcuts"))
|
||||||
@ -581,7 +574,7 @@ Core::Core(bool useSyslog, bool minLogLevelSet, int minLogLevel, const QStringLi
|
|||||||
}
|
}
|
||||||
if (id)
|
if (id)
|
||||||
{
|
{
|
||||||
mShortcutAndActionById[id].second->setEnabled(enabled);
|
enableActionNonGuarded(id, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
@ -828,7 +821,7 @@ int Core::x11ErrorHandler(Display */*display*/, XErrorEvent *errorEvent)
|
|||||||
|
|
||||||
bool Core::waitForX11Error(int level, uint timeout)
|
bool Core::waitForX11Error(int level, uint timeout)
|
||||||
{
|
{
|
||||||
pollfd *fds = new pollfd[1];
|
pollfd fds[1];
|
||||||
fds[0].fd = mX11ErrorPipe[STDIN_FILENO];
|
fds[0].fd = mX11ErrorPipe[STDIN_FILENO];
|
||||||
fds[0].events = POLLIN | POLLERR | POLLHUP;
|
fds[0].events = POLLIN | POLLERR | POLLHUP;
|
||||||
if (poll(fds, 1, timeout) < 0)
|
if (poll(fds, 1, timeout) < 0)
|
||||||
@ -1367,7 +1360,7 @@ void Core::run()
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
pollfd *fds = new pollfd[1];
|
pollfd fds[1];
|
||||||
fds[0].fd = mX11RequestPipe[STDIN_FILENO];
|
fds[0].fd = mX11RequestPipe[STDIN_FILENO];
|
||||||
fds[0].events = POLLIN | POLLERR | POLLHUP;
|
fds[0].events = POLLIN | POLLERR | POLLHUP;
|
||||||
if (poll(fds, 1, 0) >= 0)
|
if (poll(fds, 1, 0) >= 0)
|
||||||
@ -1400,17 +1393,16 @@ void Core::run()
|
|||||||
}
|
}
|
||||||
if (length)
|
if (length)
|
||||||
{
|
{
|
||||||
char *str = new char[length + 1];
|
QScopedArrayPointer<char> str(new char[length + 1]);
|
||||||
str[length] = '\0';
|
str[length] = '\0';
|
||||||
if (error_t error = readAll(mX11RequestPipe[STDIN_FILENO], str, length))
|
if (error_t error = readAll(mX11RequestPipe[STDIN_FILENO], str.data(), length))
|
||||||
{
|
{
|
||||||
log(LOG_CRIT, "Cannot read from X11 request pipe: %s", strerror(error));
|
log(LOG_CRIT, "Cannot read from X11 request pipe: %s", strerror(error));
|
||||||
close(mX11ResponsePipe[STDIN_FILENO]);
|
close(mX11ResponsePipe[STDIN_FILENO]);
|
||||||
mX11EventLoopActive = false;
|
mX11EventLoopActive = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
KeySym keySym = XStringToKeysym(str);
|
KeySym keySym = XStringToKeysym(str.data());
|
||||||
delete[] str;
|
|
||||||
lockX11Error();
|
lockX11Error();
|
||||||
keyCode = XKeysymToKeycode(mDisplay, keySym);
|
keyCode = XKeysymToKeycode(mDisplay, keySym);
|
||||||
x11Error = checkX11Error();
|
x11Error = checkX11Error();
|
||||||
@ -1682,22 +1674,38 @@ void Core::serviceDisappeared(const QString &sender)
|
|||||||
{
|
{
|
||||||
const QString &shortcut = shortcutAndActionById.value().first;
|
const QString &shortcut = shortcutAndActionById.value().first;
|
||||||
|
|
||||||
dynamic_cast<ClientAction *>(shortcutAndActionById.value().second)->disappeared();
|
ClientAction * action = dynamic_cast<ClientAction *>(shortcutAndActionById.value().second);
|
||||||
|
action->disappeared();
|
||||||
mDaemonAdaptor->emit_clientActionSenderChanged(id, QString());
|
mDaemonAdaptor->emit_clientActionSenderChanged(id, QString());
|
||||||
|
|
||||||
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
if (action->isEnabled())
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
if (!remoteXUngrabKey(X11shortcut))
|
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (!remoteXUngrabKey(X11shortcut))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1798,17 +1806,15 @@ QString Core::remoteKeycodeToString(KeyCode keyCode)
|
|||||||
}
|
}
|
||||||
if (length)
|
if (length)
|
||||||
{
|
{
|
||||||
char *str = new char[length + 1];
|
QScopedArrayPointer<char> str(new char[length + 1]);
|
||||||
str[length] = '\0';
|
str[length] = '\0';
|
||||||
if (error_t error = readAll(mX11ResponsePipe[STDIN_FILENO], str, length))
|
if (error_t error = readAll(mX11ResponsePipe[STDIN_FILENO], str.data(), length))
|
||||||
{
|
{
|
||||||
log(LOG_CRIT, "Cannot read from X11 response pipe: %s", strerror(error));
|
log(LOG_CRIT, "Cannot read from X11 response pipe: %s", strerror(error));
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
result = str;
|
result = str.data();
|
||||||
|
|
||||||
delete[] str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -2389,7 +2395,7 @@ void Core::enableClientAction(bool &result, const QDBusObjectPath &path, bool en
|
|||||||
|
|
||||||
qulonglong id = idByNativeClient.value();
|
qulonglong id = idByNativeClient.value();
|
||||||
|
|
||||||
mShortcutAndActionById[id].second->setEnabled(enabled);
|
enableActionNonGuarded(id, enabled);
|
||||||
|
|
||||||
saveConfig();
|
saveConfig();
|
||||||
|
|
||||||
@ -2429,24 +2435,75 @@ void Core::isClientActionEnabled(bool &enabled, const QDBusObjectPath &path, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Core::enableAction(bool &result, qulonglong id, bool enabled)
|
void Core::enableAction(bool &result, qulonglong id, bool enabled)
|
||||||
|
{
|
||||||
|
QMutexLocker lock(&mDataMutex);
|
||||||
|
result = enableActionNonGuarded(id, enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Core::enableActionNonGuarded(qulonglong id, bool enabled)
|
||||||
{
|
{
|
||||||
log(LOG_INFO, "enableAction id:%llu enabled:%s", id, enabled ? "true" : " false");
|
log(LOG_INFO, "enableAction id:%llu enabled:%s", id, enabled ? "true" : " false");
|
||||||
|
|
||||||
QMutexLocker lock(&mDataMutex);
|
|
||||||
|
|
||||||
ShortcutAndActionById::iterator shortcutAndActionById = mShortcutAndActionById.find(id);
|
ShortcutAndActionById::iterator shortcutAndActionById = mShortcutAndActionById.find(id);
|
||||||
if (shortcutAndActionById == mShortcutAndActionById.end())
|
if (shortcutAndActionById == mShortcutAndActionById.end())
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "No action registered with id #%llu", id);
|
log(LOG_WARNING, "No action registered with id #%llu", id);
|
||||||
result = false;
|
return false;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
shortcutAndActionById.value().second->setEnabled(enabled);
|
BaseAction * action = shortcutAndActionById.value().second;
|
||||||
|
QString const & shortcut = shortcutAndActionById.value().first;
|
||||||
|
if (action->isEnabled() != enabled)
|
||||||
|
{
|
||||||
|
shortcutAndActionById.value().second->setEnabled(enabled);
|
||||||
|
if (enabled)
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
if (!remoteXGrabKey(mX11ByShortcut[shortcut]))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot grab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
idsByShortcut = mDisabledIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mIdsByShortcut[shortcut].insert(id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
saveConfig();
|
if (!remoteXUngrabKey(mX11ByShortcut[shortcut]))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mDisabledIdsByShortcut[shortcut].insert(id);
|
||||||
|
}
|
||||||
|
|
||||||
result = true;
|
saveConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::isActionEnabled(bool &enabled, qulonglong id)
|
void Core::isActionEnabled(bool &enabled, qulonglong id)
|
||||||
@ -2540,29 +2597,48 @@ void Core::changeClientActionShortcut(QPair<QString, qulonglong> &result, const
|
|||||||
|
|
||||||
if (oldShortcut != newShortcut)
|
if (oldShortcut != newShortcut)
|
||||||
{
|
{
|
||||||
newShortcut = grabOrReuseKey(X11shortcut, newShortcut);
|
BaseAction const * const action = shortcutAndActionById.value().second;
|
||||||
if (newShortcut.isEmpty())
|
|
||||||
{
|
|
||||||
result = qMakePair(QString(), id);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(oldShortcut);
|
if (action->isEnabled())
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
newShortcut = grabOrReuseKey(X11shortcut, newShortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (newShortcut.isEmpty())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
result = qMakePair(QString(), id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!remoteXUngrabKey(mX11ByShortcut[oldShortcut]))
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(oldShortcut);
|
||||||
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (!remoteXUngrabKey(mX11ByShortcut[oldShortcut]))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mIdsByShortcut[newShortcut].insert(id);
|
mIdsByShortcut[newShortcut].insert(id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(oldShortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mDisabledIdsByShortcut[newShortcut].insert(id);
|
||||||
|
}
|
||||||
shortcutAndActionById.value().first = newShortcut;
|
shortcutAndActionById.value().first = newShortcut;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2607,29 +2683,48 @@ void Core::changeShortcut(QString &result, const qulonglong &id, const QString &
|
|||||||
|
|
||||||
if (oldShortcut != newShortcut)
|
if (oldShortcut != newShortcut)
|
||||||
{
|
{
|
||||||
newShortcut = grabOrReuseKey(X11shortcut, newShortcut);
|
BaseAction const * const action = shortcutAndActionById.value().second;
|
||||||
if (newShortcut.isEmpty())
|
|
||||||
{
|
|
||||||
result = QString();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(oldShortcut);
|
if (action->isEnabled())
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
newShortcut = grabOrReuseKey(X11shortcut, newShortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (newShortcut.isEmpty())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
result = QString();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!remoteXUngrabKey(mX11ByShortcut[oldShortcut]))
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(oldShortcut);
|
||||||
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (!remoteXUngrabKey(mX11ByShortcut[oldShortcut]))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
mIdsByShortcut[newShortcut].insert(id);
|
mIdsByShortcut[newShortcut].insert(id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(oldShortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mDisabledIdsByShortcut[newShortcut].insert(id);
|
||||||
|
}
|
||||||
shortcutAndActionById.value().first = newShortcut;
|
shortcutAndActionById.value().first = newShortcut;
|
||||||
|
|
||||||
if (!strcmp(shortcutAndActionById.value().second->type(), ClientAction::id()))
|
if (!strcmp(shortcutAndActionById.value().second->type(), ClientAction::id()))
|
||||||
@ -2715,21 +2810,38 @@ void Core::removeClientAction(bool &result, const QDBusObjectPath &path, const Q
|
|||||||
|
|
||||||
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
||||||
|
|
||||||
delete shortcutAndActionById.value().second;
|
BaseAction * action = shortcutAndActionById.value().second;
|
||||||
|
const bool enabled = action->isEnabled();
|
||||||
|
delete action;
|
||||||
mShortcutAndActionById.erase(shortcutAndActionById);
|
mShortcutAndActionById.erase(shortcutAndActionById);
|
||||||
mIdByClientPath.remove(path);
|
mIdByClientPath.remove(path);
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
if (enabled)
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
if (!remoteXUngrabKey(X11shortcut))
|
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (!remoteXUngrabKey(X11shortcut))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2791,21 +2903,36 @@ void Core::removeAction(bool &result, const qulonglong &id)
|
|||||||
QString shortcut = shortcutAndActionById.value().first;
|
QString shortcut = shortcutAndActionById.value().first;
|
||||||
|
|
||||||
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
X11Shortcut X11shortcut = mX11ByShortcut[shortcut];
|
||||||
|
const bool enabled = action->isEnabled();
|
||||||
delete action;
|
delete action;
|
||||||
mShortcutAndActionById.erase(shortcutAndActionById);
|
mShortcutAndActionById.erase(shortcutAndActionById);
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
if (enabled)
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
if (!remoteXUngrabKey(X11shortcut))
|
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (enabled && !remoteXUngrabKey(X11shortcut))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2849,19 +2976,35 @@ void Core::deactivateClientAction(bool &result, const QDBusObjectPath &path, con
|
|||||||
ShortcutAndActionById::iterator shortcutAndActionById = mShortcutAndActionById.find(id);
|
ShortcutAndActionById::iterator shortcutAndActionById = mShortcutAndActionById.find(id);
|
||||||
QString shortcut = shortcutAndActionById.value().first;
|
QString shortcut = shortcutAndActionById.value().first;
|
||||||
|
|
||||||
dynamic_cast<ClientAction*>(shortcutAndActionById.value().second)->disappeared();
|
ClientAction * const action = dynamic_cast<ClientAction*>(shortcutAndActionById.value().second);
|
||||||
|
action->disappeared();
|
||||||
|
|
||||||
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
if (action->isEnabled())
|
||||||
if (idsByShortcut != mIdsByShortcut.end())
|
|
||||||
{
|
{
|
||||||
idsByShortcut.value().remove(id);
|
IdsByShortcut::iterator idsByShortcut = mIdsByShortcut.find(shortcut);
|
||||||
if (idsByShortcut.value().isEmpty())
|
if (idsByShortcut != mIdsByShortcut.end())
|
||||||
{
|
{
|
||||||
mIdsByShortcut.erase(idsByShortcut);
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
if (!remoteXUngrabKey(mX11ByShortcut[shortcut]))
|
|
||||||
{
|
{
|
||||||
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
mIdsByShortcut.erase(idsByShortcut);
|
||||||
|
|
||||||
|
if (!remoteXUngrabKey(mX11ByShortcut[shortcut]))
|
||||||
|
{
|
||||||
|
log(LOG_WARNING, "Cannot ungrab shortcut '%s'", qPrintable(shortcut));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IdsByShortcut::iterator idsByShortcut = mDisabledIdsByShortcut.find(shortcut);
|
||||||
|
if (idsByShortcut != mDisabledIdsByShortcut.end())
|
||||||
|
{
|
||||||
|
idsByShortcut.value().remove(id);
|
||||||
|
if (idsByShortcut.value().isEmpty())
|
||||||
|
{
|
||||||
|
mDisabledIdsByShortcut.erase(idsByShortcut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3174,17 +3317,15 @@ void Core::shortcutGrabbed()
|
|||||||
}
|
}
|
||||||
if (length)
|
if (length)
|
||||||
{
|
{
|
||||||
char *str = new char[length + 1];
|
QScopedArrayPointer<char> str(new char[length + 1]);
|
||||||
str[length] = '\0';
|
str[length] = '\0';
|
||||||
if (error_t error = readAll(mX11ResponsePipe[STDIN_FILENO], str, length))
|
if (error_t error = readAll(mX11ResponsePipe[STDIN_FILENO], str.data(), length))
|
||||||
{
|
{
|
||||||
log(LOG_CRIT, "Cannot read from X11 response pipe: %s", strerror(error));
|
log(LOG_CRIT, "Cannot read from X11 response pipe: %s", strerror(error));
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
shortcut = str;
|
shortcut = str.data();
|
||||||
|
|
||||||
delete[] str;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,6 +150,7 @@ private slots:
|
|||||||
void shortcutGrabTimedout();
|
void shortcutGrabTimedout();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool enableActionNonGuarded(qulonglong id, bool enabled);
|
||||||
QPair<QString, qulonglong> addOrRegisterClientAction(const QString &shortcut, const QDBusObjectPath &path, const QString &description, const QString &sender);
|
QPair<QString, qulonglong> addOrRegisterClientAction(const QString &shortcut, const QDBusObjectPath &path, const QString &description, const QString &sender);
|
||||||
qulonglong registerClientAction(const QString &shortcut, const QDBusObjectPath &path, const QString &description);
|
qulonglong registerClientAction(const QString &shortcut, const QDBusObjectPath &path, const QString &description);
|
||||||
qulonglong registerMethodAction(const QString &shortcut, const QString &service, const QDBusObjectPath &path, const QString &interface, const QString &method, const QString &description);
|
qulonglong registerMethodAction(const QString &shortcut, const QString &service, const QDBusObjectPath &path, const QString &interface, const QString &method, const QString &description);
|
||||||
@ -218,6 +219,7 @@ private:
|
|||||||
X11ByShortcut mX11ByShortcut;
|
X11ByShortcut mX11ByShortcut;
|
||||||
ShortcutByX11 mShortcutByX11;
|
ShortcutByX11 mShortcutByX11;
|
||||||
IdsByShortcut mIdsByShortcut;
|
IdsByShortcut mIdsByShortcut;
|
||||||
|
IdsByShortcut mDisabledIdsByShortcut;
|
||||||
ShortcutAndActionById mShortcutAndActionById;
|
ShortcutAndActionById mShortcutAndActionById;
|
||||||
IdByClientPath mIdByClientPath;
|
IdByClientPath mIdByClientPath;
|
||||||
SenderByClientPath mSenderByClientPath; // add: path->sender
|
SenderByClientPath mSenderByClientPath; // add: path->sender
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
*
|
*
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
* END_COMMON_COPYRIGHT_HEADER */
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <LXQt/Application>
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
@ -230,15 +230,16 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ignoreIt = chdir("/");
|
const char* home = getenv("HOME");
|
||||||
|
int ignoreIt = chdir((home && *home) ? home : "/");
|
||||||
(void)ignoreIt;
|
(void)ignoreIt;
|
||||||
|
|
||||||
if (configFiles.empty())
|
if (configFiles.empty() && home && *home)
|
||||||
{
|
{
|
||||||
configFiles.push_back(QString::fromLocal8Bit(getenv("HOME")) + "/" DEFAULT_CONFIG);
|
configFiles.push_back(QString::fromLocal8Bit(home) + "/" DEFAULT_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
QCoreApplication app(argc, argv);
|
LXQt::Application app(argc, argv);
|
||||||
|
|
||||||
Core core(runAsDaemon || useSyslog, minLogLevelSet, minLogLevel, configFiles, multipleActionsBehaviourSet, multipleActionsBehaviour);
|
Core core(runAsDaemon || useSyslog, minLogLevelSet, minLogLevel, configFiles, multipleActionsBehaviourSet, multipleActionsBehaviour);
|
||||||
|
|
||||||
|
@ -6,14 +6,6 @@ set(QT_DBUS_PREFIX "org.qtproject")
|
|||||||
set(LXQT_GLOBALKEYS_LIBRARY lxqt-globalkeys)
|
set(LXQT_GLOBALKEYS_LIBRARY lxqt-globalkeys)
|
||||||
set(${PROJECT_NAME}_HEADER_NAMESPACE "LXQtGlobalKeysUi")
|
set(${PROJECT_NAME}_HEADER_NAMESPACE "LXQtGlobalKeysUi")
|
||||||
|
|
||||||
include_directories(
|
|
||||||
"${PROJECT_SOURCE_DIR}"
|
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
||||||
${LXQT_INCLUDE_DIRS}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_definitions(-DSHARED_EXPORT=Q_DECL_EXPORT)
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_SOURCES
|
set(${PROJECT_NAME}_SOURCES
|
||||||
shortcut_selector.cpp
|
shortcut_selector.cpp
|
||||||
)
|
)
|
||||||
@ -23,7 +15,7 @@ set(${PROJECT_NAME}_MAIN_HEADER
|
|||||||
|
|
||||||
#
|
#
|
||||||
# WARNING: Changing stuff here implies changing this:
|
# WARNING: Changing stuff here implies changing this:
|
||||||
#install(FILES ${${PROJECT_NAME}_PUBLIC_HEADERS} DESTINATION include/${PROJECT_NAME} COMPONENT development RENAME "shortcutselector.h")
|
#install(FILES ${${PROJECT_NAME}_PUBLIC_HEADERS} DESTINATION include/${PROJECT_NAME} COMPONENT Devel RENAME "shortcutselector.h")
|
||||||
#
|
#
|
||||||
set(${PROJECT_NAME}_PUBLIC_CPP_HEADERS
|
set(${PROJECT_NAME}_PUBLIC_CPP_HEADERS
|
||||||
shortcut_selector.h
|
shortcut_selector.h
|
||||||
@ -101,7 +93,7 @@ foreach(DBUS_INTERFACE ${${PROJECT_NAME}_DBUS_INTERFACES})
|
|||||||
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
get_filename_component(DBUS_INTERFACE_FILENAME ${DBUS_INTERFACE} NAME)
|
||||||
configure_file(
|
configure_file(
|
||||||
${DBUS_INTERFACE}
|
${DBUS_INTERFACE}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}
|
"${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}"
|
||||||
@ONLY
|
@ONLY
|
||||||
)
|
)
|
||||||
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
get_source_file_property(DBUS_INTERFACE_BASENAME ${DBUS_INTERFACE} BASENAME)
|
||||||
@ -113,11 +105,10 @@ foreach(DBUS_INTERFACE ${${PROJECT_NAME}_DBUS_INTERFACES})
|
|||||||
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
CLASSNAME ${DBUS_INTERFACE_CLASSNAME}
|
||||||
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
NO_NAMESPACE ${DBUS_INTERFACE_NO_NAMESPACE}
|
||||||
)
|
)
|
||||||
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES ${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME} ${DBUS_INTERFACE_BASENAME})
|
qt5_add_dbus_interface(${PROJECT_NAME}_DBUS_INTERFACE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${DBUS_INTERFACE_FILENAME}" ${DBUS_INTERFACE_BASENAME})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
qt5_add_resources(${PROJECT_NAME}_RESOURCE_FILES ${${PROJECT_NAME}_RESOURCES})
|
||||||
qt5_wrap_ui(${PROJECT_NAME}_FORM_FILES ${${PROJECT_NAME}_FORMS})
|
|
||||||
|
|
||||||
set(${PROJECT_NAME}_GENERATED_FILES
|
set(${PROJECT_NAME}_GENERATED_FILES
|
||||||
${${PROJECT_NAME}_FORM_FILES}
|
${${PROJECT_NAME}_FORM_FILES}
|
||||||
@ -133,17 +124,34 @@ set(${PROJECT_NAME}_ALL_FILES
|
|||||||
${${PROJECT_NAME}_GENERATED_FILES}
|
${${PROJECT_NAME}_GENERATED_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(${PROJECT_NAME}_PKG_CONFIG_REQUIRES "Qt5Widgets, Qt5DBus, ${LXQT_GLOBALKEYS_LIBRARY}")
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_ALL_FILES})
|
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_ALL_FILES})
|
||||||
target_link_libraries(${PROJECT_NAME}
|
target_link_libraries(${PROJECT_NAME}
|
||||||
Qt5::Widgets
|
PUBLIC
|
||||||
Qt5::DBus
|
Qt5::Widgets
|
||||||
${LXQT_GLOBALKEYS_LIBRARY}
|
Qt5::DBus
|
||||||
|
${LXQT_GLOBALKEYS_LIBRARY}
|
||||||
)
|
)
|
||||||
set_target_properties(${PROJECT_NAME}
|
set_target_properties(${PROJECT_NAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${LXQT_VERSION}
|
VERSION ${LXQT_VERSION}
|
||||||
SOVERSION ${LXQT_MAJOR_VERSION}
|
SOVERSION ${LXQT_MAJOR_VERSION}
|
||||||
)
|
)
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
INTERFACE "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${LXQT_GLOBALKEYS_UI_LIBRARY_NAME}>"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(${PROJECT_NAME}
|
||||||
|
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/include>"
|
||||||
|
INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}>"
|
||||||
|
)
|
||||||
|
|
||||||
|
target_compile_definitions(${PROJECT_NAME}
|
||||||
|
PRIVATE "SHARED_EXPORT=Q_DECL_EXPORT"
|
||||||
|
)
|
||||||
|
|
||||||
|
export(TARGETS ${PROJECT_NAME} APPEND FILE "${CMAKE_BINARY_DIR}/${PROJECT_NAME}-targets.cmake")
|
||||||
|
|
||||||
include(create_portable_headers)
|
include(create_portable_headers)
|
||||||
create_portable_headers(${PROJECT_NAME}_PORTABLE_HEADERS
|
create_portable_headers(${PROJECT_NAME}_PORTABLE_HEADERS
|
||||||
@ -151,11 +159,62 @@ create_portable_headers(${PROJECT_NAME}_PORTABLE_HEADERS
|
|||||||
FILENAMES ${${PROJECT_NAME}_PUBLIC_CLASSES}
|
FILENAMES ${${PROJECT_NAME}_PUBLIC_CLASSES}
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR} COMPONENT runtime)
|
# Copy public headers for intree building
|
||||||
install(FILES ${${PROJECT_NAME}_PUBLIC_HEADERS} DESTINATION include/${PROJECT_NAME} COMPONENT development)
|
foreach(h ${${PROJECT_NAME}_PUBLIC_HEADERS})
|
||||||
install(FILES ${${PROJECT_NAME}_PUBLIC_HEADERS} DESTINATION include/${PROJECT_NAME} COMPONENT development RENAME "shortcutselector.h")
|
get_filename_component(bh ${h} NAME)
|
||||||
install(FILES ${${PROJECT_NAME}_PORTABLE_HEADERS} DESTINATION include/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE} COMPONENT development)
|
configure_file("${h}" "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/${bh}" COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(h ${${PROJECT_NAME}_PORTABLE_HEADERS})
|
||||||
|
get_filename_component(bh ${h} NAME)
|
||||||
|
configure_file("${h}" "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE}/${bh}" COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach(h ${${PROJECT_NAME}_PUBLIC_HEADERS})
|
||||||
|
get_filename_component(bh ${h} NAME)
|
||||||
|
configure_file("${h}" "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/include/${PROJECT_NAME}/shortcutselector.h" COPYONLY)
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
install(TARGETS
|
||||||
|
${PROJECT_NAME}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||||
|
EXPORT ${PROJECT_NAME}-targets
|
||||||
|
COMPONENT Runtime
|
||||||
|
)
|
||||||
|
|
||||||
|
install(EXPORT
|
||||||
|
${PROJECT_NAME}-targets
|
||||||
|
DESTINATION "${LXQT_INSTALL_CMAKE_DIR}/${LXQT_GLOBALKEYS_UI_CMAKE_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_PUBLIC_HEADERS}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_PUBLIC_HEADERS}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}"
|
||||||
|
COMPONENT Devel
|
||||||
|
RENAME "shortcutselector.h"
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${${PROJECT_NAME}_PORTABLE_HEADERS}
|
||||||
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${${PROJECT_NAME}_HEADER_NAMESPACE}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
include(create_pkgconfig_file)
|
lxqt_create_pkgconfig_file(
|
||||||
create_pkgconfig_file(${PROJECT_NAME} "LXQt global key shortcuts GUI support library")
|
PACKAGE_NAME ${PROJECT_NAME}
|
||||||
|
DESCRIPTIVE_NAME ${PROJECT_NAME}
|
||||||
|
DESCRIPTION "LXQt global key shortcuts GUI support library"
|
||||||
|
INCLUDEDIRS ${PROJECT_NAME}
|
||||||
|
LIBS ${PROJECT_NAME}
|
||||||
|
REQUIRES ${${PROJECT_NAME}_PKG_CONFIG_REQUIRES}
|
||||||
|
VERSION ${LXQT_VERSION}
|
||||||
|
INSTALL
|
||||||
|
)
|
||||||
|
@ -40,7 +40,11 @@ namespace GlobalKeyShortcut
|
|||||||
class Client;
|
class Client;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShortcutSelector : public QToolButton
|
#ifndef SHARED_EXPORT
|
||||||
|
#define SHARED_EXPORT Q_DECL_IMPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class SHARED_EXPORT ShortcutSelector : public QToolButton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user