diff --git a/cmake/DbusActivationMacros.cmake b/cmake/DbusActivationMacros.cmake new file mode 100644 index 000000000..2a038a591 --- /dev/null +++ b/cmake/DbusActivationMacros.cmake @@ -0,0 +1,31 @@ +include(UsePkgConfig) + +MACRO(PKGCONFIG_GETVAR _package _var _output_variable) + SET(${_output_variable}) + + # if pkg-config has been found + IF(PKGCONFIG_EXECUTABLE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + + # and if the package of interest also exists for pkg-config, then get the information + IF(NOT _return_VALUE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable ${_var} OUTPUT_VARIABLE ${_output_variable} ) + + ENDIF(NOT _return_VALUE) + + ENDIF(PKGCONFIG_EXECUTABLE) + +ENDMACRO(PKGCONFIG_GETVAR _package _var _output_variable) + +macro(dbus_add_activation_service _sources) + PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir) + foreach (_i ${_sources}) + get_filename_component(_service_file ${_i} ABSOLUTE) + string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i}) + set(_target ${CMAKE_CURRENT_BINARY_DIR}/${_output_file}) + configure_file(${_service_file} ${_target}) + install(FILES ${_target} DESTINATION ${_install_dir}) + endforeach (_i ${ARGN}) +endmacro(dbus_add_activation_service _sources) diff --git a/cmake/macros.cmake b/cmake/DbusInterfaceMacros.cmake similarity index 100% rename from cmake/macros.cmake rename to cmake/DbusInterfaceMacros.cmake diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index aba295459..faaac94b0 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -54,7 +54,7 @@ set_target_properties(kdeconnectcore PROPERTIES target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) generate_export_header(kdeconnectcore EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectcore_export.h BASE_NAME KDEConnectCore) -include(macros) +include(DbusInterfaceMacros) generate_and_install_dbus_interface( kdeconnectcore diff --git a/kcm/kcm_kdeconnect.desktop b/kcm/kcm_kdeconnect.desktop index 2296175b4..d780522e1 100755 --- a/kcm/kcm_kdeconnect.desktop +++ b/kcm/kcm_kdeconnect.desktop @@ -80,7 +80,7 @@ X-KDE-Keywords[ru]=Network,Android,Devices,сеть,Андроид, устрой X-KDE-Keywords[sk]=Sieť,Android,Zariadenia X-KDE-Keywords[sv]=Nätverk, Android, apparater X-KDE-Keywords[tr]=Ağ,Android,Cihazlar,Aygıtlar -X-KDE-Keywords[uk]=Network;Android;Devices;мережа;андроїд;пристрої +X-KDE-Keywords[uk]=Network,Android,Devices,мережа,андроїд,пристрої X-KDE-Keywords[x-test]=xxNetwork,Android,Devicesxx Categories=Qt;KDE;X-KDE-settings-kdeconnect; diff --git a/kded/CMakeLists.txt b/kded/CMakeLists.txt index 764efd3c1..7560ae3c2 100644 --- a/kded/CMakeLists.txt +++ b/kded/CMakeLists.txt @@ -1,15 +1,16 @@ include_directories(${CMAKE_SOURCE_DIR}) + add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-kded") configure_file(config-kded.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kded.h) +add_library(kded_kdeconnect MODULE kded.cpp) +target_link_libraries(kded_kdeconnect KF5::Service KF5::DBusAddons) +install(TARGETS kded_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES kdeconnect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded) add_executable(kdeconnectd kdeconnectd.cpp) target_link_libraries(kdeconnectd kdeconnectcore KF5::DBusAddons KF5::ConfigWidgets) - -add_library(kded_kdeconnect MODULE kded.cpp) - -target_link_libraries(kded_kdeconnect KF5::Service KF5::DBusAddons) - install(TARGETS kdeconnectd DESTINATION ${LIBEXEC_INSTALL_DIR}) -install(TARGETS kded_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES kdeconnect.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded) + +include(DbusActivationMacros) +dbus_add_activation_service(org.kde.kdeconnect.service.in) diff --git a/kded/org.kde.kdeconnect.service.in b/kded/org.kde.kdeconnect.service.in new file mode 100644 index 000000000..977764294 --- /dev/null +++ b/kded/org.kde.kdeconnect.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.kde.kdeconnect +Exec=@LIBEXEC_INSTALL_DIR@/kdeconnectd diff --git a/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt index a2a2092d7..d2a4237b6 100644 --- a/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -16,7 +16,7 @@ target_link_libraries(kdeconnect_battery install(TARGETS kdeconnect_battery DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_battery.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(macros) +include(DbusInterfaceMacros) generate_and_install_dbus_interface( kdeconnect_battery diff --git a/plugins/kdeconnect.notifyrc b/plugins/kdeconnect.notifyrc index 180c38ac1..34b35e02c 100644 --- a/plugins/kdeconnect.notifyrc +++ b/plugins/kdeconnect.notifyrc @@ -51,13 +51,29 @@ Comment[x-test]=xxNotifications from your devicesxx [Event/pairingRequest] Name=Pairing Request +Name[ca]=Sol·licitud d'aparellament +Name[cs]=Požadavek na párování +Name[de]=Verbindungsanfrage +Name[es]=Petición de vinculación +Name[fi]=Parituspyyntö Name[nl]=Verzoek om een paar te maken +Name[pl]=Żądanie parowania +Name[pt]=Pedido de Emparelhamento Name[pt_BR]=Solicitação de emparelhamento +Name[sk]=Požiadavka na spárovanie Name[uk]=Запит щодо пов’язування Name[x-test]=xxPairing Requestxx Comment=Pairing request received from a devices +Comment[ca]=Les sol·licituds d'aparellament rebudes des d'un dispositiu +Comment[cs]=Požadavek na párování přijat ze zařízení +Comment[de]=Verbindungsanfrage von einem Gerät erhalten +Comment[es]=Petición de vinculación recibida desde un dispositivo +Comment[fi]=Saatiin parituspyyntö laitteelta Comment[nl]=Verzoek om een paar te maken ontvangen van een apparaat +Comment[pl]=Otrzymano żądanie parowania z urządzeń +Comment[pt]=Pedido de emparelhamento recebido de um dispositivo Comment[pt_BR]=Solicitação de emparelhamento recebida de um dispositivo +Comment[sk]=Požiadavka na spárovanie prijatá zo zariadenia Comment[uk]=Від пристрою отримано запит щодо пов’язування Comment[x-test]=xxPairing request received from a devicesxx Action=Popup @@ -370,13 +386,29 @@ Action=Popup [Event/transferReceived] Name=Pairing Request +Name[ca]=Sol·licitud d'aparellament +Name[cs]=Požadavek na párování +Name[de]=Verbindungsanfrage +Name[es]=Petición de vinculación +Name[fi]=Parituspyyntö Name[nl]=Verzoek om een paar te maken +Name[pl]=Żądanie parowania +Name[pt]=Pedido de Emparelhamento Name[pt_BR]=Solicitação de emparelhamento +Name[sk]=Požiadavka na spárovanie Name[uk]=Запит щодо пов’язування Name[x-test]=xxPairing Requestxx Comment=Pairing request received from a devices +Comment[ca]=Les sol·licituds d'aparellament rebudes des d'un dispositiu +Comment[cs]=Požadavek na párování přijat ze zařízení +Comment[de]=Verbindungsanfrage von einem Gerät erhalten +Comment[es]=Petición de vinculación recibida desde un dispositivo +Comment[fi]=Saatiin parituspyyntö laitteelta Comment[nl]=Verzoek om een paar te maken ontvangen van een apparaat +Comment[pl]=Otrzymano żądanie parowania z urządzeń +Comment[pt]=Pedido de emparelhamento recebido de um dispositivo Comment[pt_BR]=Solicitação de emparelhamento recebida de um dispositivo +Comment[sk]=Požiadavka na spárovanie prijatá zo zariadenia Comment[uk]=Від пристрою отримано запит щодо пов’язування Comment[x-test]=xxPairing request received from a devicesxx Action=Popup diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index 9f749a81b..9f5647190 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -16,7 +16,8 @@ target_link_libraries(kdeconnect_notifications install(TARGETS kdeconnect_notifications DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_notifications.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(macros) +include(DbusInterfaceMacros) + generate_and_install_dbus_interface( kdeconnect_notifications notificationsdbusinterface.h diff --git a/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt index 8d1fbc997..ae10b5ffc 100644 --- a/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(kdeconnect_sftp install(TARGETS kdeconnect_sftp DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_sftp.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(macros) +include(DbusInterfaceMacros) generate_and_install_dbus_interface( kdeconnect_sftp diff --git a/plugins/sftp/kdeconnect_sftp.desktop b/plugins/sftp/kdeconnect_sftp.desktop index 72c44b0f5..9c3c53c7d 100644 --- a/plugins/sftp/kdeconnect_sftp.desktop +++ b/plugins/sftp/kdeconnect_sftp.desktop @@ -17,7 +17,7 @@ Name[ca]=Navegador pel sistema de fitxers remot Name[cs]=Prohlížeč vzdáleného souborového systému Name[da]=Gennemse eksternt filsystem Name[de]=Datei-Browser für entferne Systeme -Name[es]=Navegador de sistemas de archivos remoto +Name[es]=Navegador de sistemas de archivos remoto Name[fi]=Etätiedostojärjestelmäselain Name[fr]=Contrôlez à distance le navigateur du système de fichiers Name[hu]=Távoli fájlrendszer böngésző diff --git a/plugins/share/kdeconnect_share.desktop b/plugins/share/kdeconnect_share.desktop index 79271c88b..5f2c3201a 100644 --- a/plugins/share/kdeconnect_share.desktop +++ b/plugins/share/kdeconnect_share.desktop @@ -38,7 +38,7 @@ Comment[ca]=Rep i envia fitxers, els URL o text pla amb facilitat Comment[cs]=Jednoduše přijímejte a posílejte soubory, URL nebo čistý text Comment[da]=Modtag og send filer, URL'er eller klartekst på nem måde Comment[de]=Empfang und Senden von Dateien, URLs oder einfacher Text -Comment[es]=Recibir y enviar archivos, URLs o texto plano fácilmente +Comment[es]=Recibir y enviar archivos, URL o texto sin formato fácilmente Comment[fi]=Vastaanota ja lähetä tiedostoja, verkko-osoitteita tai tekstiä helposti Comment[fr]=Recevoir et envoyer des fichiers, des URLs ou du texte brut facilement Comment[hu]=Fájlok, URL-ek vagy egyszerű szövegek könnyű fogadása és küldése