Commit 9244b004 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to implement new plugin: allow to open url in specific apps (as

zoom/ruqola etc.)
parent caeb683e
......@@ -8,3 +8,4 @@ add_subdirectory(dkim-verify)
add_subdirectory(expireaccounttrashfolder)
add_subdirectory(foldersettings)
add_subdirectory(scamsettings)
add_subdirectory(openurlwith)
# SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
kcoreaddons_add_plugin(messageviewer_openurlwithconfigplugin INSTALL_NAMESPACE messageviewer/configuresettings)
target_sources(messageviewer_openurlwithconfigplugin PRIVATE
openurlwithconfigplugin.cpp
openurlwithconfigplugin.h
)
target_link_libraries(messageviewer_openurlwithconfigplugin
KF5::MessageViewer
KF5::I18n
)
add_library(openurlwithconfigure)
target_sources(openurlwithconfigure PRIVATE
)
ecm_qt_declare_logging_category(openurlwithconfigure HEADER libopenurlwithconfigure_debug.h IDENTIFIER LIBOPENURLWITHCONFIGURE_PLUGIN_LOG
CATEGORY_NAME org.kde.pim.libopenurlwithconfigureplugin
DESCRIPTION "kdepim-addons (open url with plugin)"
EXPORT KDEPIMADDONS
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(openurlwithconfigure PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(openurlwithconfigure BASE_NAME libopenurlwithconfigure)
target_link_libraries(openurlwithconfigure
KF5::I18n
KF5::MessageViewer
KF5::ItemViews
)
set_target_properties(openurlwithconfigure
PROPERTIES OUTPUT_NAME openurlwithconfigure VERSION ${KDEPIMADDONS_LIB_VERSION} SOVERSION ${KDEPIMADDONS_LIB_SOVERSION}
)
install(TARGETS openurlwithconfigure ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
if(BUILD_TESTING)
add_subdirectory(autotests)
endif()
{
"KPlugin": {
"Description": "This plugin allows you to configure which apps used for specific url.",
"Name": "Open Url With",
"Version": "1.0"
},
"X-KDE-MessageViewer-Configure-Order": "100"
}
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "openurlwithconfigplugin.h"
#include <KPluginFactory>
K_PLUGIN_CLASS_WITH_JSON(OpenUrlWithConfigPlugin, "messageviewer_openurlwithconfigplugin.json")
OpenUrlWithConfigPlugin::OpenUrlWithConfigPlugin(QObject *parent, const QList<QVariant> &)
: MessageViewer::MessageViewerConfigureSettingsPlugin(parent)
{
}
OpenUrlWithConfigPlugin::~OpenUrlWithConfigPlugin() = default;
void OpenUrlWithConfigPlugin::showConfigureDialog(QWidget *parent)
{
// DKIMConfigureDialog dlg(parent);
// dlg.exec();
}
#include "openurlwithconfigplugin.moc"
/*
SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <MessageViewer/MessageViewerConfigureSettingsPlugin>
#include <QVariant>
class OpenUrlWithConfigPlugin : public MessageViewer::MessageViewerConfigureSettingsPlugin
{
Q_OBJECT
public:
explicit OpenUrlWithConfigPlugin(QObject *parent = nullptr, const QList<QVariant> & = QList<QVariant>());
~OpenUrlWithConfigPlugin() override;
void showConfigureDialog(QWidget *parent) override;
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment