From 70fc65c50b5e3fc588170938fb52b0b224f89857 Mon Sep 17 00:00:00 2001 From: Yukiharu YABUKI Date: Wed, 19 Aug 2015 06:40:18 +0900 Subject: [PATCH] Merging upstram 0.9.0+20150807. --- CMakeLists.txt | 26 ++++++++--------- man/lxqt-policykit-agent.1 | 24 ++++++++-------- src/main.cpp | 4 +-- src/policykitagentgui.cpp | 4 +-- translations/lxqt-policykit-agent_hu.ts | 38 +++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 29 deletions(-) create mode 100644 translations/lxqt-policykit-agent_hu.ts diff --git a/CMakeLists.txt b/CMakeLists.txt index ec03f81..7a02dfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,25 +1,27 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(lxqt-policykit-agent) option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) +include(GNUInstallDirs) + find_package(PkgConfig) pkg_check_modules(POLKIT_AGENT REQUIRED polkit-agent-1) message(STATUS "polkit agent: ${POLKIT_AGENT_INCLUDE_DIRS} ${POLKIT_AGENT_LIBRARIES}") +set(POLKIT_AGENT_BINARY_DIR "${CMAKE_INSTALL_BINDIR}" CACHE FILEPATH "Directory for install polkit agent") + set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) find_package(PolkitQt5-1 REQUIRED) find_package(Qt5Widgets REQUIRED QUIET) find_package(Qt5LinguistTools REQUIRED QUIET) find_package(lxqt REQUIRED QUIET) -find_package(qt5xdg REQUIRED QUIET) - -include(${LXQT_USE_FILE}) -include(${QTXDG_USE_FILE}) +include(LXQtCompilerSettings NO_POLICY_SCOPE) include(LXQtTranslate) # Deal with a bug in polkit-qt5 @@ -37,8 +39,6 @@ message(STATUS " include: ${POLKITQT-1_INCLUDE_DIR}") # pkg-config --cflags glib-2.0 # pkg-config --cflags polkit-agent-1 include_directories( - "${CMAKE_CURRENT_SOURCE_DIR}/src" - "${CMAKE_CURRENT_BINARY_DIR}" ${POLKIT_AGENT_INCLUDE_DIRS} "${POLKITQT-1_INCLUDE_DIR}" ) @@ -72,27 +72,27 @@ lxqt_translate_ts(lxqt-policykit-agent_QM_FILES lxqt_app_translation_loader(QM_LOADER ${PROJECT_NAME}) -qt5_wrap_ui(lxqt-policykit-agent_UI_CPP ${lxqt-policykit-agent_UI}) - add_executable(lxqt-policykit-agent ${lxqt-policykit-agent_SRCS} ${lxqt-policykit-agent_MOCS} - ${lxqt-policykit-agent_UI_CPP} ${lxqt-policykit-agent_QM_FILES} ${QM_LOADER} ) target_link_libraries(lxqt-policykit-agent Qt5::Widgets - ${QTXDG_LIBRARY} - ${LXQT_LIBRARIES} + lxqt ${POLKITQT-1_CORE_LIBRARY} ${POLKITQT-1_AGENT_LIBRARY} ${POLKIT_AGENT_LIBRARIES} ) # install -install(TARGETS lxqt-policykit-agent DESTINATION bin) +install(TARGETS + lxqt-policykit-agent + DESTINATION "${POLKIT_AGENT_BINARY_DIR}" + COMPONENT Runtime +) # building tarball with CPack ------------------------------------------------- include(InstallRequiredSystemLibraries) diff --git a/man/lxqt-policykit-agent.1 b/man/lxqt-policykit-agent.1 index ba14634..db4ee26 100644 --- a/man/lxqt-policykit-agent.1 +++ b/man/lxqt-policykit-agent.1 @@ -1,18 +1,18 @@ -.TH lxqt-policykit-agent "1" "September 2012" "LxQt\-qt\ 0.5.0" "LxQt\-Qt\ Module" +.TH lxqt-policykit-agent "1" "September 2012" "LXQt\ 0.5.0" "LXQt\ Module" .SH NAME -lxqt-policykit-agent \- Polkit agent for \fBLXDE-Qt\fR: the faster and lighter QT Desktop Environment +lxqt-policykit-agent \- Polkit agent for \fBLXQt\fR: the faster and lighter QT Desktop Environment .SH SYNOPSIS .B lxqt-policykit-agent [\fICurrently No command line arguments\fR] .br .SH DESCRIPTION -This module handles policykit for \fBLXDE-Qt\fR. The polkit module, will perform +This module handles policykit for \fBLXQt\fR. The polkit module, will perform security tast over scale action privilegies. .P -The \fBLXDE-Qt modules\fR are desktop independent tools, +The \fBLXQt modules\fR are desktop independent tools, and operate as daemons for the local user for desktop specific operations. .P -\fBLXDE-Qt\fR is an advanced, easy-to-use, and fast desktop environment based on Qt +\fBLXQt\fR is an advanced, easy-to-use, and fast desktop environment based on Qt technologies, ships several core desktop components, all of which are optional: .P * Panel @@ -31,22 +31,22 @@ Manager. The module detected on shares privilege escalation, and maintain a security dialog that ask for the user's key need for action. .SH AUTOSTART -The module only are showed on \fBLXDE-Qt\fR desktop, but u can create an autostart action +The module only are showed on \fBLXQt\fR desktop, but u can create an autostart action for u prefered desktop environment. .SH "REPORTING BUGS" -Report bugs to https://github.com/LXDE-Qt/LXDE-Qt/issues +Report bugs to https://github.com/LXDE/LXQt/issues .SH "SEE ALSO" -\fBLXDE-Qt\fR it has been tailored for users who value simplicity, speed, and +\fBLXQt\fR it has been tailored for users who value simplicity, speed, and an intuitive interface, also intended for less powerful machines. See: .\" any module must refers to session app, for more info on start it .P -\fBlxqt-session.1\fR LXDE-Qt for manage LXDE-Qt complete environment +\fBlxqt-session.1\fR LXQt for manage LXQt complete environment .P -\fBstart-lxqt.1\fR LXDE-Qt display management independient starup. +\fBstart-lxqt.1\fR LXQt display management independient starup. .P -\fBlxqt-config-session.1\fR LXDE-Qt application for performing session autostart applications +\fBlxqt-config-session.1\fR LXQt application for performing session autostart applications .P .SH AUTHOR This manual page was created by \fBPICCORO Lenz McKAY\fR \fI\fR -for \fBLXDE-Qt\fR project and VENENUX GNU/Linux but can be used by others. +for \fBLXQt\fR project and VENENUX GNU/Linux but can be used by others. diff --git a/src/main.cpp b/src/main.cpp index 081b4d6..877ef52 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,8 +40,8 @@ int main(int argc, char *argv[]) g_type_init(); #endif - LxQt::Application app(argc, argv); - + LxQt::Application app(argc, argv); + app.setQuitOnLastWindowClosed(false); LxQtPolicykit::PolicykitAgent agent; diff --git a/src/policykitagentgui.cpp b/src/policykitagentgui.cpp index 20aeae4..dd55ace 100644 --- a/src/policykitagentgui.cpp +++ b/src/policykitagentgui.cpp @@ -24,7 +24,7 @@ * Boston, MA 02110-1301 USA * * END_COMMON_COPYRIGHT_HEADER */ - + #include #include "policykitagentgui.h" @@ -45,7 +45,7 @@ PolicykitAgentGUI::PolicykitAgentGUI(const QString &actionId, messageLabel->setText(message); iconLabel->setPixmap(XdgIcon::fromTheme(iconName).pixmap(64, 64)); - + foreach (PolkitQt1::Identity identity, identities) { m_identityMap[identity.toString()] = identity; diff --git a/translations/lxqt-policykit-agent_hu.ts b/translations/lxqt-policykit-agent_hu.ts new file mode 100644 index 0000000..a903583 --- /dev/null +++ b/translations/lxqt-policykit-agent_hu.ts @@ -0,0 +1,38 @@ + + + + + PolicykitAgentGUI + + Authentication Required + Hitelesítés kell + + + Identity: + Név: + + + Password: + Jelszó: + + + + LxQtPolicykit::PolicykitAgent + + PolicyKit Information + Policykit információ + + + Authorization Failed + Hitelesítés sikertelen + + + Authorization failed for some reason + Hitelesítés valami miatt sikertelen + + + PolicyKit Error + Policykit hiba + + +