From 9a56d7531bfe3283544d436104ff2f31faba4f5c Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 2 Nov 2018 02:58:02 +0100 Subject: [PATCH 1/3] 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 Subscribers: 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 From a53d99a8ad59291ae380dba60990600373e0ee64 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 2 Nov 2018 03:19:50 +0100 Subject: [PATCH 2/3] Thunar integration Summary: Add desktop file for integration into Thunar Test Plan: Run Thunar, Right-click file -> Send to -> Send via KDE Connect Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16604 --- data/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 194c5ddad..555e5cef8 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,4 +1,5 @@ install (FILES "kdeconnect.contract" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/contractor/) +install (FILES "kdeconnect-thunar.desktop" DESTINATION ${CMAKE_INSTALL_PREFIX}/share/Thunar/sendto/) if(NOT SAILFISHOS) install(FILES org.kde.kdeconnect.kcm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) From e66817928f24875857c953f134ca1a9f3010be40 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Fri, 2 Nov 2018 03:22:05 +0100 Subject: [PATCH 3/3] Actually include desktop file --- data/kdeconnect-thunar.desktop | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/kdeconnect-thunar.desktop diff --git a/data/kdeconnect-thunar.desktop b/data/kdeconnect-thunar.desktop new file mode 100644 index 000000000..b5599e17d --- /dev/null +++ b/data/kdeconnect-thunar.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Version=0.1 +Encoding=UTF-8 +Exec=kdeconnect-handler %F +Icon=kdeconnect +Name=Send via KDE Connect