diff --git a/CMakeLists.txt b/CMakeLists.txt index 9510fc99..8431e202 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,85 +1,84 @@ cmake_minimum_required(VERSION 3.0) project(kdeconnect) set(KDECONNECT_VERSION_MAJOR 1) set(KDECONNECT_VERSION_MINOR 3) set(KDECONNECT_VERSION_PATCH 0) set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}") set(QT_MIN_VERSION "5.7.0") set(KF5_MIN_VERSION "5.42.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Quick Network) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n ConfigWidgets DBusAddons IconThemes Notifications KIO KCMUtils OPTIONAL_COMPONENTS DocTools ) find_package(Qca-qt5 2.1.0 REQUIRED) find_package(Phonon4Qt5 4.9.0 NO_MODULE) set_package_properties(Phonon4Qt5 PROPERTIES DESCRIPTION "Qt-based audio library" TYPE OPTIONAL PURPOSE "Required for Find My Device plugin" ) include_directories(${CMAKE_SOURCE_DIR}) configure_file(kdeconnect-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeconnect-version.h) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(ECMAddTests) include(ECMSetupVersion) include(ECMInstallIcons) include(FeatureSummary) include(KDEConnectMacros.cmake) add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_NO_KEYWORDS) include(GenerateExportHeader) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_subdirectory(core) add_subdirectory(kcm) add_subdirectory(kcmplugin) if(NOT WIN32) add_subdirectory(kio) add_subdirectory(plasmoid) endif() add_subdirectory(icon) add_subdirectory(interfaces) option(EXPERIMENTALAPP_ENABLED OFF) if(EXPERIMENTALAPP_ENABLED) add_subdirectory(app) endif() add_subdirectory(daemon) add_subdirectory(plugins) add_subdirectory(cli) add_subdirectory(indicator) -add_subdirectory(fileitemactionplugin) add_subdirectory(urlhandler) add_subdirectory(nautilus-extension) option(SMSAPP_ENABLED OFF) if(SMSAPP_ENABLED) find_package(KF5People REQUIRED) add_subdirectory(smsapp) endif() if(KF5DocTools_FOUND) add_subdirectory(doc) endif() if(BUILD_TESTING) add_subdirectory(tests) endif() install(FILES org.kde.kdeconnect.kcm.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/fileitemactionplugin/CMakeLists.txt b/fileitemactionplugin/CMakeLists.txt deleted file mode 100644 index d4af2952..00000000 --- a/fileitemactionplugin/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_definitions(-DTRANSLATION_DOMAIN="kdeconnect-fileitemaction") -include_directories(${CMAKE_SOURCE_DIR}) - -add_library(kdeconnectfileitemaction MODULE sendfileitemaction.cpp) -target_link_libraries(kdeconnectfileitemaction - KF5::KIOWidgets - KF5::I18n - kdeconnectinterfaces -) -install(TARGETS kdeconnectfileitemaction DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES kdeconnectsendfile.desktop DESTINATION ${SERVICES_INSTALL_DIR}) diff --git a/fileitemactionplugin/Messages.sh b/fileitemactionplugin/Messages.sh deleted file mode 100644 index ad6cb760..00000000 --- a/fileitemactionplugin/Messages.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -$XGETTEXT `find . -name '*.cpp'` -o $podir/kdeconnect-fileitemaction.pot diff --git a/fileitemactionplugin/kdeconnectsendfile.desktop b/fileitemactionplugin/kdeconnectsendfile.desktop deleted file mode 100644 index 51c0ced1..00000000 --- a/fileitemactionplugin/kdeconnectsendfile.desktop +++ /dev/null @@ -1,88 +0,0 @@ -[Desktop Entry] -Type=Service -Name=Send file via KDE Connect service -Name[ar]=أرسل ملفًّا عبر خدمة «كدي المتّصل» -Name[ast]=Unviar ficheru pel serviciu de KDE Connect -Name[bg]=Изпращане на файл през услугата KDE Connect -Name[bs]=Pošalji datoteku putem KDE Connect servisa -Name[ca]=Envia un fitxer a través del servei KDE Connect -Name[ca@valencia]=Envia un fitxer a través del servei KDE Connect -Name[cs]=Poslat soubor přes službu KDE Connect -Name[da]=Send fil via KDE Connect-tjeneste -Name[de]=Datei mit KDE-Connect -Dienst versenden -Name[el]=Αποστολή αρχείου μέσω της υπηρεσίας KDE Connect -Name[en_GB]=Send file via KDE Connect service -Name[es]=Enviar archivo usando el servicio KDE Connect -Name[et]=Faili saatmine KDE Connecti teenuse kaudu -Name[eu]=Bidali fitxategia KDE Connect zerbitzuaren bidez -Name[fi]=Lähetä tiedosto KDE Connect -palvelulla -Name[fr]=Envoyer un fichier via le service KDE Connect -Name[gl]=Enviar un ficheiro mediante o servizo de KDE Connect -Name[he]=שלח קובץ דרך שירות KDE Connect -Name[hu]=Fájl küldése a KDE csatlakozás szolgáltatáson keresztül -Name[id]=Kirim file via layanan KDE Connect -Name[it]=Invia un file tramite il servizio KDE Connect -Name[ko]=KDE Connect 서비스로 파일 보내기 -Name[nl]=Bestand via de service KDE Connect versturen -Name[nn]=Send fil med KDE Connect-tenesta -Name[pl]=Wyślij plik przez usługę KDE Connect -Name[pt]=Enviar um ficheiro pelo serviço KDE Connect -Name[pt_BR]=Enviar arquivo pelo serviço KDE Connect -Name[ru]=Отправить файл через KDE Connect -Name[sk]=Poslať súbor cez službu KDE Connect -Name[sr]=Шаљи фајл преко КДЕ‑конекцијиног сервиса -Name[sr@ijekavian]=Шаљи фајл преко КДЕ‑конекцијиног сервиса -Name[sr@ijekavianlatin]=Šalji fajl preko KDE‑konekcijinog servisa -Name[sr@latin]=Šalji fajl preko KDE‑konekcijinog servisa -Name[sv]=Skicka fil via KDE:s anslutningstjänst -Name[tr]=KDE Connect servisi ile dosya gönderin -Name[uk]=Надсилання файла за допомогою служби з’єднання KDE -Name[x-test]=xxSend file via KDE Connect servicexx -Name[zh_CN]=通过 KDE Connect 服务发送文件 -Name[zh_TW]=以已經連結到KDE之服務或裝置來傳送檔案 -X-KDE-Library=kdeconnectfileitemaction -X-KDE-Submenu=Connect -X-KDE-Submenu[ar]=اتّصل,اتصل -X-KDE-Submenu[ast]=Coneutar -X-KDE-Submenu[bg]=Свързване -X-KDE-Submenu[bs]=Uspostavi vezu -X-KDE-Submenu[ca]=Connecta -X-KDE-Submenu[ca@valencia]=Connecta -X-KDE-Submenu[cs]=Připojit -X-KDE-Submenu[da]=Forbind -X-KDE-Submenu[de]=Verbinden -X-KDE-Submenu[el]=Σύνδεση -X-KDE-Submenu[en_GB]=Connect -X-KDE-Submenu[es]=Conectar -X-KDE-Submenu[et]=Ühendus -X-KDE-Submenu[eu]=Konektatu -X-KDE-Submenu[fi]=Yhdistä -X-KDE-Submenu[fr]=Connecter -X-KDE-Submenu[gl]=Conectar -X-KDE-Submenu[he]=חיבור -X-KDE-Submenu[hu]=Csatlakozás -X-KDE-Submenu[ia]=Connecte -X-KDE-Submenu[id]=Connect -X-KDE-Submenu[it]=Connetti -X-KDE-Submenu[ko]=연결 -X-KDE-Submenu[nl]=Verbinden -X-KDE-Submenu[nn]=Kopla til -X-KDE-Submenu[pl]=Połącz -X-KDE-Submenu[pt]=Ligar -X-KDE-Submenu[pt_BR]=Conectar -X-KDE-Submenu[ru]=KDE Connect -X-KDE-Submenu[sk]=Pripojiť -X-KDE-Submenu[sr]=Повежи се -X-KDE-Submenu[sr@ijekavian]=Повежи се -X-KDE-Submenu[sr@ijekavianlatin]=Poveži se -X-KDE-Submenu[sr@latin]=Poveži se -X-KDE-Submenu[sv]=Anslut -X-KDE-Submenu[tr]=Bağlan -X-KDE-Submenu[uk]=З’єднання -X-KDE-Submenu[x-test]=xxConnectxx -X-KDE-Submenu[zh_CN]=连接 -X-KDE-Submenu[zh_TW]=連線 - -Icon=preferences-system-network -ServiceTypes=KFileItemAction/Plugin -MimeType=application/octet-stream diff --git a/fileitemactionplugin/sendfileitemaction.cpp b/fileitemactionplugin/sendfileitemaction.cpp deleted file mode 100644 index 4b213618..00000000 --- a/fileitemactionplugin/sendfileitemaction.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2011 Alejandro Fiestas Olivares - * Copyright (C) 2014 Aleix Pol Gonzalez - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "sendfileitemaction.h" - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -K_PLUGIN_FACTORY(SendFileItemActionFactory, registerPlugin();) - -Q_LOGGING_CATEGORY(KDECONNECT_FILEITEMACTION, "kdeconnect.fileitemaction") - -SendFileItemAction::SendFileItemAction(QObject* parent, const QVariantList& ): KAbstractFileItemActionPlugin(parent) -{ -} - -QList SendFileItemAction::actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) -{ - QList actions; - - DaemonDbusInterface iface; - if (!iface.isValid()) { - return actions; - } - - QDBusPendingReply reply = iface.devices(true, true); - reply.waitForFinished(); - const QStringList devices = reply.value(); - for (const QString& id : devices) { - DeviceDbusInterface deviceIface(id); - if (!deviceIface.isValid()) { - continue; - } - if (!deviceIface.hasPlugin(QStringLiteral("kdeconnect_share"))) { - continue; - } - QAction* action = new QAction(QIcon::fromTheme(deviceIface.iconName()), deviceIface.name(), parentWidget); - action->setProperty("id", id); - action->setProperty("urls", QVariant::fromValue(fileItemInfos.urlList())); - action->setProperty("parentWidget", QVariant::fromValue(parentWidget)); - connect(action, &QAction::triggered, this, &SendFileItemAction::sendFile); - actions += action; - } - - if (actions.count() > 1) { - QAction* menuAction = new QAction(QIcon::fromTheme(QStringLiteral("kdeconnect")), i18n("Send via KDE Connect"), parentWidget); - QMenu* menu = new QMenu(parentWidget); - menu->addActions(actions); - menuAction->setMenu(menu); - return QList() << menuAction; - } else { - if(actions.count() == 1) { - actions.first()->setText(i18n("Send to '%1' via KDE Connect", actions.first()->text())); - } - return actions; - } -} - -void SendFileItemAction::sendFile() -{ - const QList urls = sender()->property("urls").value>(); - QString id = sender()->property("id").toString(); - for (const QUrl& url : urls) { - QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), "/modules/kdeconnect/devices/"+id+"/share", QStringLiteral("org.kde.kdeconnect.device.share"), QStringLiteral("shareUrl")); - msg.setArguments(QVariantList() << url.toString()); - QDBusConnection::sessionBus().call(msg); - } -} - -#include "sendfileitemaction.moc" diff --git a/fileitemactionplugin/sendfileitemaction.h b/fileitemactionplugin/sendfileitemaction.h deleted file mode 100644 index 6020a23d..00000000 --- a/fileitemactionplugin/sendfileitemaction.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2011 Alejandro Fiestas Olivares - * Copyright (C) 2014 Aleix Pol Gonzalez - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#ifndef SENDFILEITEMACTION_H -#define SENDFILEITEMACTION_H - -#include -#include -#include - -class QAction; -class KFileItemListProperties; -class QWidget; - -Q_DECLARE_LOGGING_CATEGORY(KDECONNECT_FILEITEMACTION) -class SendFileItemAction : public KAbstractFileItemActionPlugin -{ -Q_OBJECT -public: - SendFileItemAction(QObject* parent, const QVariantList& args); - QList< QAction* > actions(const KFileItemListProperties& fileItemInfos, QWidget* parentWidget) override; - -private Q_SLOTS: - void sendFile(); - -}; - -#endif // SENDFILEITEMACTION_H