From e5bbc37546c3e5a6f5f2aa4988f45586ee5dc1dc Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 2 Nov 2018 02:58:02 +0100 Subject: [PATCH] Add contract file Summary: This allows sending files from ElementaryOS apps such as their file manager. Create a data dir for similar files Test Plan: run contractor; run pantheon-files, right-click file -> Send via KDE Connect Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: apol, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16603 --- CMakeLists.txt | 4 +--- data/CMakeLists.txt | 5 +++++ data/kdeconnect.contract | 7 +++++++ .../org.kde.kdeconnect.kcm.appdata.xml | 0 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 data/CMakeLists.txt create mode 100644 data/kdeconnect.contract rename org.kde.kdeconnect.kcm.appdata.xml => data/org.kde.kdeconnect.kcm.appdata.xml (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 03bfa0ba8..44f260659 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -81,6 +81,7 @@ endif() add_subdirectory(icon) add_subdirectory(interfaces) +add_subdirectory(data) option(EXPERIMENTALAPP_ENABLED OFF) if(EXPERIMENTALAPP_ENABLED) @@ -119,7 +120,4 @@ if(BUILD_TESTING AND NOT SAILFISHOS) add_subdirectory(tests) endif() -if(NOT SAILFISHOS) - install(FILES org.kde.kdeconnect.kcm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) -endif() feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100644 index 000000000..194c5ddad --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,5 @@ +install (FILES "kdeconnect.contract" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/contractor/) + +if(NOT SAILFISHOS) + install(FILES org.kde.kdeconnect.kcm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) +endif() diff --git a/data/kdeconnect.contract b/data/kdeconnect.contract new file mode 100644 index 000000000..f6136cb54 --- /dev/null +++ b/data/kdeconnect.contract @@ -0,0 +1,7 @@ +[Contractor Entry] +Name=Send via KDE Connect +Icon=kdeconnect +Description=Send files via KDE Connect +MimeType=!inode; +Exec=kdeconnect-handler %F +Gettext-Domain=kdeconnect diff --git a/org.kde.kdeconnect.kcm.appdata.xml b/data/org.kde.kdeconnect.kcm.appdata.xml similarity index 100% rename from org.kde.kdeconnect.kcm.appdata.xml rename to data/org.kde.kdeconnect.kcm.appdata.xml