diff --git a/CMakeLists.txt b/CMakeLists.txt index fed63dbc9..130c054d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ ecm_setup_version(1.4.0 if (SAILFISHOS) set(KF5_REQUIRED_COMPONENTS I18n CoreAddons Config) set(KF5_OPTIONAL_COMPONENTS) - + set(Qca_LIBRARY CONAN_PKG::Qca-qt5) add_definitions(-DSAILFISHOS) @@ -105,13 +105,14 @@ if (NOT SAILFISHOS) add_subdirectory(nautilus-extension) add_subdirectory(fileitemactionplugin) add_subdirectory(smsapp) - + add_subdirectory(settings) + if(NOT WIN32) add_subdirectory(kio) add_subdirectory(plasmoid) endif() endif() - + if(KF5DocTools_FOUND) add_subdirectory(doc) endif() diff --git a/kcm/CMakeLists.txt b/kcm/CMakeLists.txt index 07cddc640..b9d126380 100644 --- a/kcm/CMakeLists.txt +++ b/kcm/CMakeLists.txt @@ -9,10 +9,6 @@ set(kcm_SRCS kcm.cpp ) -set(kcm_wrapper_SRCS main.cpp) -add_executable(kdeconnect-settings ${kcm_wrapper_SRCS}) -target_link_libraries(kdeconnect-settings KF5::I18n KF5::KCMUtils) - ki18n_wrap_ui(kcm_SRCS kcm.ui) add_library(kcm_kdeconnect MODULE ${kcm_SRCS}) @@ -26,7 +22,4 @@ target_link_libraries(kcm_kdeconnect ) install(TARGETS kcm_kdeconnect DESTINATION ${PLUGIN_INSTALL_DIR}) -install(TARGETS kdeconnect-settings ${INSTALL_TARGETS_DEFAULT_ARGS}) - -install(FILES org.kde.kdeconnect.kcm.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(FILES kcm_kdeconnect.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/settings/CMakeLists.txt b/settings/CMakeLists.txt new file mode 100644 index 000000000..88b49979e --- /dev/null +++ b/settings/CMakeLists.txt @@ -0,0 +1,9 @@ +add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-settings") + +include_directories(${CMAKE_BINARY_DIR}) + +add_executable(kdeconnect-settings main.cpp) +target_link_libraries(kdeconnect-settings KF5::I18n KF5::KCMUtils KF5::DBusAddons) + +install(TARGETS kdeconnect-settings ${INSTALL_TARGETS_DEFAULT_ARGS}) +install(FILES org.kde.kdeconnect.settings.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) diff --git a/settings/Messages.sh b/settings/Messages.sh new file mode 100644 index 000000000..539d581eb --- /dev/null +++ b/settings/Messages.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +$EXTRACTRC `find -name '*.ui' -o -name '*.rc'` >> rc.cpp +$XGETTEXT rc.cpp -o $podir/kdeconnect-settings.pot +rm -f rc.cpp + +#.cpp (-j passed to merge into existing file) +$XGETTEXT `find . -name '*.cpp'` -j -o $podir/kdeconnect-settings.pot + + diff --git a/kcm/main.cpp b/settings/main.cpp similarity index 92% rename from kcm/main.cpp rename to settings/main.cpp index 4c487ebd3..6962672dc 100644 --- a/kcm/main.cpp +++ b/settings/main.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "kdeconnect-version.h" int main(int argc, char** argv) @@ -33,9 +34,11 @@ int main(int argc, char** argv) QStringLiteral(KDECONNECT_VERSION_STRING), i18n("KDE Connect Settings"), KAboutLicense::GPL, - i18n("(C) 2018 Nicolas Fella")); + i18n("(C) 2018-2020 Nicolas Fella")); KAboutData::setApplicationData(about); + KDBusService dbusService(KDBusService::Unique); + KCMultiDialog* dialog = new KCMultiDialog; dialog->addModule(QStringLiteral("kcm_kdeconnect")); dialog->setAttribute(Qt::WA_DeleteOnClose); diff --git a/kcm/org.kde.kdeconnect.kcm.desktop b/settings/org.kde.kdeconnect.settings.desktop similarity index 99% rename from kcm/org.kde.kdeconnect.kcm.desktop rename to settings/org.kde.kdeconnect.settings.desktop index 724b2b605..7bf840838 100755 --- a/kcm/org.kde.kdeconnect.kcm.desktop +++ b/settings/org.kde.kdeconnect.settings.desktop @@ -19,7 +19,7 @@ Name[eu]=KDE Connect ezarpenak Name[fi]=KDE Connectin asetukset Name[fr]=Paramètres de KDE Connect Name[gl]=Configuración de KDE Connect -Name[he]=הגדרות KDE Connect +Name[he]=הגדרות KDE Connect Name[hu]=A KDE Connect beállításai Name[id]=Pengaturan KDE Connect Name[it]=Impostazioni di KDE Connect