summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-18 13:32:37 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-18 13:32:37 (GMT)
commitac9c14d21c2d7270c2c66277fbd19f5c043f0235 (patch)
tree454ea95786d51ba72ba6f956433e592953e620e2
parent2a08af3d40b30db5e6ecbbbb148b46c14364f051 (diff)
Move defaultgrantleeheaderstyleplugin in messageviewer directly
-rw-r--r--plugins/messageviewerheaderplugins/CMakeLists.txt2
-rw-r--r--plugins/messageviewerheaderplugins/autotests/CMakeLists.txt3
-rw-r--r--plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp57
-rw-r--r--plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h37
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/CMakeLists.txt20
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.cpp32
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.h44
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.cpp69
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.h45
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.cpp73
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h47
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/messageviewer_defaultgrantleeheaderstyleplugin.json42
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/defaultgrantleeheaderstyleplugin.kcfg16
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/globalsettings_base.kcfgc5
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html88
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/kmail_default.desktop54
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.pngbin975 -> 0 bytes
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.svg107
-rw-r--r--plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/style.css79
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt15
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json35
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp38
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h59
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp51
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h41
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp66
-rw-r--r--plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h45
27 files changed, 448 insertions, 722 deletions
diff --git a/plugins/messageviewerheaderplugins/CMakeLists.txt b/plugins/messageviewerheaderplugins/CMakeLists.txt
index 1a7f09f..96ea726 100644
--- a/plugins/messageviewerheaderplugins/CMakeLists.txt
+++ b/plugins/messageviewerheaderplugins/CMakeLists.txt
@@ -6,7 +6,7 @@ add_subdirectory(enterpriseheaderstyleplugin)
add_subdirectory(fancyheaderstyleplugin)
add_subdirectory(grantleeheaderstyleplugin)
add_subdirectory(longheaderstyleplugin)
-add_subdirectory(defaultgrantleeheaderstyleplugin)
+add_subdirectory(standardsheaderstyleplugin)
if(BUILD_TESTING)
add_subdirectory(autotests)
add_subdirectory(tests)
diff --git a/plugins/messageviewerheaderplugins/autotests/CMakeLists.txt b/plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
index d9fd41d..257a420 100644
--- a/plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
+++ b/plugins/messageviewerheaderplugins/autotests/CMakeLists.txt
@@ -34,4 +34,7 @@ add_messageviewer_header_unittest( grantleeheaderstyleplugintest.cpp "../grantle
add_messageviewer_header_unittest( longheaderstyleplugintest.cpp "../longheaderstyleplugin/longheaderstyleplugin.cpp;../longheaderstyleplugin/longheaderstyleinterface.cpp")
+add_messageviewer_header_unittest( standardsheaderstyleplugintest.cpp "../standardsheaderstyleplugin/standardheaderstrategy.cpp;../standardsheaderstyleplugin/standardsheaderstyleplugin.cpp;../standardsheaderstyleplugin/standardsheaderstyleinterface.cpp")
+
+
add_messageviewer_header_class_unittest( headerstylepluginmanagertest.cpp)
diff --git a/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp b/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp
new file mode 100644
index 0000000..25872ad
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.cpp
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 "standardsheaderstyleplugintest.h"
+#include "../standardsheaderstyleplugin/standardsheaderstyleplugin.h"
+#include "../standardsheaderstyleplugin/standardsheaderstyleinterface.h"
+#include <QTest>
+#include <KActionCollection>
+#include <KActionMenu>
+#include <QActionGroup>
+
+StandardsHeaderStylePluginTest::StandardsHeaderStylePluginTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
+
+StandardsHeaderStylePluginTest::~StandardsHeaderStylePluginTest()
+{
+
+}
+
+void StandardsHeaderStylePluginTest::shouldHaveDefaultValue()
+{
+ MessageViewer::StandardsHeaderStylePlugin plugin;
+ QVERIFY(plugin.headerStyle());
+ QVERIFY(plugin.headerStrategy());
+}
+
+void StandardsHeaderStylePluginTest::shouldCreateInterface()
+{
+ MessageViewer::StandardsHeaderStylePlugin plugin;
+ KActionMenu *menu = new KActionMenu(this);
+ QActionGroup *act = new QActionGroup(this);
+
+ MessageViewer::HeaderStyleInterface *interface = plugin.createView(menu, act, new KActionCollection(this));
+ QVERIFY(interface);
+ QVERIFY(!interface->action().isEmpty());
+}
+
+QTEST_MAIN(StandardsHeaderStylePluginTest)
diff --git a/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h b/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h
new file mode 100644
index 0000000..781ce5f
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/autotests/standardsheaderstyleplugintest.h
@@ -0,0 +1,37 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 STANDARDSHEADERSTYLEPLUGINTEST_H
+#define STANDARDSHEADERSTYLEPLUGINTEST_H
+
+#include <QObject>
+
+class StandardsHeaderStylePluginTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit StandardsHeaderStylePluginTest(QObject *parent = Q_NULLPTR);
+ ~StandardsHeaderStylePluginTest();
+
+private Q_SLOTS:
+ void shouldHaveDefaultValue();
+ void shouldCreateInterface();
+};
+
+#endif // STANDARDSHEADERSTYLEPLUGINTEST_H
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/CMakeLists.txt b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/CMakeLists.txt
deleted file mode 100644
index 6edcbab..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-set(messageviewer_defaultgrantleeheaderstyleplugin_SRCS
- defaultgrantleeheaderstyleplugin.cpp
- defaultgrantleeheaderstyleinterface.cpp
- defaultgrantleeheaderstrategy.cpp
-)
-
-kconfig_add_kcfg_files(messageviewer_defaultgrantleeheaderstyleplugin_SRCS
- settings/globalsettings_base.kcfgc
-)
-
-kcoreaddons_add_plugin(messageviewer_defaultgrantleeheaderstyleplugin JSON messageviewer_defaultgrantleeheaderstyleplugin.json SOURCES
- ${messageviewer_defaultgrantleeheaderstyleplugin_SRCS} INSTALL_NAMESPACE messageviewer)
-
-target_link_libraries(messageviewer_defaultgrantleeheaderstyleplugin
- KF5::MessageViewer
- KF5::GrantleeTheme
- KF5::XmlGui
-)
-
-install(DIRECTORY theme/5.2 DESTINATION ${KDE_INSTALL_DATADIR}/messageviewer/defaultthemes/ )
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.cpp b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.cpp
deleted file mode 100644
index 69765d6..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "defaultgrantleeheaderstrategy.h"
-
-using namespace MessageViewer;
-
-DefaultGrantleeHeaderStrategy::DefaultGrantleeHeaderStrategy()
-{
-
-}
-
-DefaultGrantleeHeaderStrategy::~DefaultGrantleeHeaderStrategy()
-{
-
-}
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.h b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.h
deleted file mode 100644
index 8e78c40..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstrategy.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef DEFAULTGRANTLEEHEADERSTRATEGY_H
-#define DEFAULTGRANTLEEHEADERSTRATEGY_H
-
-#include <messageviewer/headerstrategy.h>
-
-namespace MessageViewer
-{
-class DefaultGrantleeHeaderStrategy : public HeaderStrategy
-{
-public:
- DefaultGrantleeHeaderStrategy();
- ~DefaultGrantleeHeaderStrategy();
-
-public:
- const char *name() const Q_DECL_OVERRIDE
- {
- return "defaultgrantlee";
- }
- DefaultPolicy defaultPolicy() const Q_DECL_OVERRIDE
- {
- return Hide;
- }
-};
-}
-#endif // DEFAULTGRANTLEEHEADERSTRATEGY_H
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.cpp b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.cpp
deleted file mode 100644
index 4bfd329..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "defaultgrantleeheaderstyleinterface.h"
-#include "messageviewer/headerstyleplugin.h"
-#include "messageviewer/headerstyle.h"
-#include <grantleetheme/grantleethememanager.h>
-#include "globalsettings_base.h"
-#include <KToggleAction>
-#include <KActionCollection>
-#include <QStandardPaths>
-
-using namespace MessageViewer;
-DefaultGrantleeHeaderStyleInterface::DefaultGrantleeHeaderStyleInterface(MessageViewer::HeaderStylePlugin *plugin, QObject *parent)
- : MessageViewer::HeaderStyleInterface(plugin, parent)
-{
- qDebug()<<" DefaultGrantleeHeaderStyleInterface"<<this;
-}
-
-DefaultGrantleeHeaderStyleInterface::~DefaultGrantleeHeaderStyleInterface()
-{
-
-}
-
-void DefaultGrantleeHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac)
-{
- qDebug()<<" void DefaultGrantleeHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac)";
- const QStringList defaultThemePath = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("messageviewer/defaultthemes/"), QStandardPaths::LocateDirectory);
- if (!defaultThemePath.isEmpty()) {
- const QString themeName = DefaultGrantleeHeaderStylePluginSettings::self()->themeName();
- mDefaultTheme = GrantleeTheme::ThemeManager::loadTheme(defaultThemePath.at(0) + QLatin1Char('/') + themeName,
- themeName,
- QStringLiteral("kmail_default.desktop"));
- }
- mHeaderStylePlugin->headerStyle()->setTheme(mDefaultTheme);
- KToggleAction *act = new KToggleAction(mDefaultTheme.name(), this);
- ac->addAction(QStringLiteral("default_grantlee_theme"), act);
- connect(act, &KToggleAction::triggered, this, &DefaultGrantleeHeaderStyleInterface::slotDefaultGrantleeHeaders);
- mAction.append(act);
- addActionToMenu(menu, actionGroup);
-}
-
-void DefaultGrantleeHeaderStyleInterface::activateAction()
-{
- mAction.at(0)->setChecked(true);
-}
-
-void DefaultGrantleeHeaderStyleInterface::slotDefaultGrantleeHeaders()
-{
- qDebug()<<" void DefaultGrantleeHeaderStyleInterface::slotDefaultGrantleeHeaders()************";
- mHeaderStylePlugin->headerStyle()->setTheme(mDefaultTheme);
- slotStyleChanged();
-}
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.h b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.h
deleted file mode 100644
index b749f7d..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleinterface.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef DEFAULTGRANTLEEHEADERSTYLEINTERFACE_H
-#define DEFAULTGRANTLEEHEADERSTYLEINTERFACE_H
-
-#include <messageviewer/headerstyleinterface.h>
-#include <grantleetheme/grantleetheme.h>
-
-namespace MessageViewer
-{
-
-class DefaultGrantleeHeaderStyleInterface : public MessageViewer::HeaderStyleInterface
-{
- Q_OBJECT
-public:
- explicit DefaultGrantleeHeaderStyleInterface(HeaderStylePlugin *plugin, QObject *parent = Q_NULLPTR);
- ~DefaultGrantleeHeaderStyleInterface();
-
- void createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac) Q_DECL_OVERRIDE;
- void activateAction() Q_DECL_OVERRIDE;
-private:
- void slotDefaultGrantleeHeaders();
- GrantleeTheme::Theme mDefaultTheme;
-};
-
-}
-
-#endif // DEFAULTGRANTLEEHEADERSTYLEINTERFACE_H
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.cpp b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.cpp
deleted file mode 100644
index 75dfda7..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#include "defaultgrantleeheaderstyleinterface.h"
-#include "defaultgrantleeheaderstyleplugin.h"
-#include "globalsettings_base.h"
-#include <messageviewer/grantleeheaderstyle.h>
-#include "defaultgrantleeheaderstrategy.h"
-#include <kpluginfactory.h>
-using namespace MessageViewer;
-
-K_PLUGIN_FACTORY_WITH_JSON(MessageViewerDefaultGrantleeHeaderStylePluginFactory, "messageviewer_defaultgrantleeheaderstyleplugin.json", registerPlugin<DefaultGrantleeHeaderStylePlugin>();)
-
-DefaultGrantleeHeaderStylePlugin::DefaultGrantleeHeaderStylePlugin(QObject *parent, const QList<QVariant> &)
- : MessageViewer::HeaderStylePlugin(parent),
- mHeaderStyle(new GrantleeHeaderStyle),
- mHeaderStrategy(new DefaultGrantleeHeaderStrategy)
-{
- initializePlugin();
-}
-
-DefaultGrantleeHeaderStylePlugin::~DefaultGrantleeHeaderStylePlugin()
-{
- delete mHeaderStyle;
- delete mHeaderStrategy;
-}
-
-void DefaultGrantleeHeaderStylePlugin::initializePlugin()
-{
- mHeaderStyle->setShowMailAction(DefaultGrantleeHeaderStylePluginSettings::self()->showActionMail());
-}
-
-HeaderStyle *DefaultGrantleeHeaderStylePlugin::headerStyle() const
-{
- return mHeaderStyle;
-}
-
-HeaderStrategy *DefaultGrantleeHeaderStylePlugin::headerStrategy() const
-{
- return mHeaderStrategy;
-}
-
-HeaderStyleInterface *DefaultGrantleeHeaderStylePlugin::createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent)
-{
- MessageViewer::HeaderStyleInterface *view = new MessageViewer::DefaultGrantleeHeaderStyleInterface(this, parent);
- if (ac) {
- view->createAction(menu, actionGroup, ac);
- }
- return view;
-}
-
-QString DefaultGrantleeHeaderStylePlugin::name() const
-{
- return QStringLiteral("defaultgrantlee");
-}
-
-#include "defaultgrantleeheaderstyleplugin.moc"
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h
deleted file mode 100644
index 33ab6bf..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/defaultgrantleeheaderstyleplugin.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- Copyright (C) 2015-2016 Montel Laurent <montel@kde.org>
-
- 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 General Public License
- along with this program; see the file COPYING. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef DEFAULTGRANTLEEHEADERSTYLEPLUGIN_H
-#define DEFAULTGRANTLEEHEADERSTYLEPLUGIN_H
-
-#include "messageviewer/headerstyleplugin.h"
-
-#include <QVariant>
-
-namespace MessageViewer
-{
-class GrantleeHeaderStyle;
-class DefaultGrantleeHeaderStylePlugin : public MessageViewer::HeaderStylePlugin
-{
- Q_OBJECT
-public:
- explicit DefaultGrantleeHeaderStylePlugin(QObject *parent = Q_NULLPTR, const QList<QVariant> & = QList<QVariant>());
- ~DefaultGrantleeHeaderStylePlugin();
-
- HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
- HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
- HeaderStyleInterface *createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent = Q_NULLPTR) Q_DECL_OVERRIDE;
- QString name() const Q_DECL_OVERRIDE;
-private:
- void initializePlugin();
- GrantleeHeaderStyle *mHeaderStyle;
- HeaderStrategy *mHeaderStrategy;
-};
-}
-#endif // DEFAULTGRANTLEEHEADERSTYLEPLUGIN_H
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/messageviewer_defaultgrantleeheaderstyleplugin.json b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/messageviewer_defaultgrantleeheaderstyleplugin.json
deleted file mode 100644
index 793e63f..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/messageviewer_defaultgrantleeheaderstyleplugin.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "KPlugin": {
- "Description": "This plugin allows you a default grantlee mail header.",
- "Description[ca@valencia]": "Este connector permet una capçalera «Grantlee» predeterminada al correu.",
- "Description[ca]": "Aquest connector permet una capçalera «Grantlee» predeterminada al correu.",
- "Description[en_GB]": "This plugin allows you a default Grantlee mail header.",
- "Description[nl]": "Deze plug-in stelt u in staat een standaard Grantlee e-mailheader te gebruiken.",
- "Description[pt]": "Este 'plugin' permite-lhe atribuir um cabeçalho de e-mail predefinido do Grantlee.",
- "Description[sv]": "Insticksprogrammet gör det möjligt att använda ett Grantlee-standardbrevhuvud.",
- "Description[uk]": "Цей додаток визначає типовий заголовок повідомлення grantlee.",
- "Description[x-test]": "xxThis plugin allows you a default grantlee mail header.xx",
- "EnabledByDefault": "true",
- "Name": "Default Grantlee Header Style",
- "Name[ca@valencia]": "Estil de capçalera «Grantlee» predeterminat",
- "Name[ca]": "Estil de capçalera «Grantlee» predeterminat",
- "Name[de]": "Vorspann-Design „Standard-Grantlee“",
- "Name[es]": "Estilo de encabezado predeterminado Grantlee",
- "Name[et]": "Vaikimisi Grantlee päisestiil",
- "Name[fi]": "Grantlee-oletusotsaketyyli",
- "Name[gl]": "Estilo de cabeceira predeterminado de Grantlee",
- "Name[it]": "Stile con intestazioni di Grantlee predefinite",
- "Name[nl]": "Stijl met standaard Grantlee header",
- "Name[pl]": "Domyślny styl nagłówków Grantlee",
- "Name[pt]": "Estilo de Cabeçalho Predefinido do Grantlee",
- "Name[pt_BR]": "Estilo de cabeçalho Grantlee padrão",
- "Name[ru]": "Стандартный стиль заголовков Grantlee",
- "Name[sk]": "Predvolený štýl hlavičiek Grantlee",
- "Name[sl]": "Privzet slog z glavami Grantlee",
- "Name[sr@ijekavian]": "Подразумевани Грантлијев стил заглавља",
- "Name[sr@ijekavianlatin]": "Podrazumevani Grantleejev stil zaglavlja",
- "Name[sr@latin]": "Podrazumevani Grantleejev stil zaglavlja",
- "Name[sr]": "Подразумевани Грантлијев стил заглавља",
- "Name[sv]": "Grantlee-standardtema för huvudstil",
- "Name[uk]": "Типовий стиль заголовків Grantlee",
- "Name[x-test]": "xxDefault Grantlee Header Stylexx",
- "ServiceTypes": [
- "MessageViewerHeaderStyle/Plugin"
- ],
- "Version": "1.0"
- },
- "X-KDE-MessageViewer-Header-Order": "100"
-} \ No newline at end of file
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/defaultgrantleeheaderstyleplugin.kcfg b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/defaultgrantleeheaderstyleplugin.kcfg
deleted file mode 100644
index 64b0c21..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/defaultgrantleeheaderstyleplugin.kcfg
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
-
- <group name="GrantleeDefaultTheme">
- <entry name="ThemeName" type="String">
- <default>5.2</default>
- </entry>
- <entry name="ShowActionMail" type="bool">
- <default>false</default>
- </entry>
- </group>
-
-</kcfg>
-
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/globalsettings_base.kcfgc b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/globalsettings_base.kcfgc
deleted file mode 100644
index 92f4f57..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/settings/globalsettings_base.kcfgc
+++ /dev/null
@@ -1,5 +0,0 @@
-File=defaultgrantleeheaderstyleplugin.kcfg
-ClassName=DefaultGrantleeHeaderStylePluginSettings
-Mutators=true
-Singleton=true
-ItemAccessors=true
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
deleted file mode 100644
index 41c3d8e..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/header.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<link href="{{ header.absoluteThemePath }}/style.css" rel="stylesheet" type="text/css" />
-<div id="kmailPage">
-<div id="headerbox" dir="ltr">
- {% if header.showMailAction %}
- {% if header.screenmode %}
- <div class="actiontable">
- <div class="actionrowtable">
- <div class="theactioncell"> {{ header.newmessageaction|safe }} </div>
- <div class="theactioncell"> {{ header.printpreviewmessageaction|safe }} </div>
- <div class="theactioncell"> {{ header.printmessageaction|safe }} </div>
- <div class="theactioncell theactionbigcell"></div>
- <div class="theactioncell"> {{ header.replyaction|safe }} </div>
- <div class="theactioncell"> {{ header.replyallaction|safe }} </div>
- <div class="theactioncell"> {{ header.forwardaction|safe }} </div>
- {% if header.readOnlyMessage %}
- {% else %}
- <div class="theactioncell"> {{ header.trashaction|safe }} </div>
- {% endif %}
- </div>
- </div>
- {% endif %}
- {% endif %}
- <div id="subject" dir="{{ header.subjectDir }}">{{ header.subject|safe }}</div>
- <div id="photo">
- {% if header.photourl %}
- <img src="{{ header.photourl }}" width="{{ header.photowidth }}" height="{{ header.photoheight }}" />
- {% else %}
- <img src="{{ header.absoluteThemePath }}/photo.svg" width="{{ header.photowidth }}" height="{{ header.photoheight }}" />
- {% endif %}
- </div>
- <div class="table">
- <div class="row">
- <div class="headerleft">{{ header.fromi18n }}</div>
- <div class="headerright">
- {{ header.from|safe }}
- {% if header.resentfrom %}
- {{ header.resentfromi18n }}: {{ header.resentfrom|safe }}
- {% endif %}
- {% if vCardName %}
- <a href="{{ header.vcardname|safe }}">{{ header.vcardi18n }}</a>
- {% endif %}
- {% if header.organization %}
- ({{ header.organization|safe }})
- {% endif %}
- </div>
- </div>
- <div class="row">
- <div class="headerleft">{{ header.toi18n }}</div>
- <div class="headerright">{{ header.toExpandable|safe }}</div>
- </div>
- {% if header.cc %}
- <div class="row">
- <div class="headerleft">{{ header.cci18n }}</div>
- <div class="headerright">{{ header.ccExpandable|safe }}</div>
- </div>
- {% endif %}
- {% if header.bcc %}
- <div class="row">
- <div class="headerleft">{{ header.bcci18n }}</div>
- <div class="headerright">{{ header.bcc|safe }}</div>
- </div>
- {% endif %}
- {% if header.sender %}
- <div class="row">
- <div class="headerleft">{{ header.senderi18n }}</div>
- <div class="headerright">{{ header.sender|safe }}</div>
- </div>
- {% endif %}
- {% if header.listid %}
- <div class="row">
- <div class="headerleft">{{ header.listidi18n }}</div>
- <div class="headerright">{{ header.listid }}</div>
- </div>
- {% endif %}
- <div class="row">
- <div class="headerleft">{{ header.datei18n }}</div>
- <div class="headerrightdate" dir="{{ dateDir }}">{{ header.dateshort }}</div>
- </div>
- {% if header.spamHTML %}
- <div class="row">
- <div class="headerleft">{{ header.spamstatusi18n }}</div>
- <div class="headerrightdate">{{ header.spamHTML|safe }}</div>
- </div>
- {% endif %}
- </div>
- <div id="attachmentInjectionPoint"></div>
-</div>
-<div id="kmailContent">
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/kmail_default.desktop b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/kmail_default.desktop
deleted file mode 100644
index 7ee750f..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/kmail_default.desktop
+++ /dev/null
@@ -1,54 +0,0 @@
-[Desktop Entry]
-Author=KMail 5.2 Default Theme
-AuthorEmail=montel@kde.org
-Description=KMail Default Theme 5.2 (Based on Breeze Flat author Kristofer Rickheden Gustavsson)
-Description[ca]=Tema per omissió pel KMail 5.2 (basat en la Brisa Flat de l'autor Kristofer Rickheden Gustavsson)
-Description[ca@valencia]=Tema per omissió pel KMail 5.2 (basat en la Brisa Flat de l'autor Kristofer Rickheden Gustavsson)
-Description[de]=KMail-Standarddesign 5.2 (Basiert auf „Breeze Flach“, Autor: Kristofer Rickheden Gustavsson)
-Description[en_GB]=KMail Default Theme 5.2 (Based on Breeze Flat author Kristofer Rickheden Gustavsson)
-Description[es]=KMail tema predeterminado 5.2 (basado en brisa plano, autor Kristofer Rickheden Gustavsson)
-Description[et]=KMaili vaiketeema 5.2 (aluseks on Breeze Flat, autor: Kristofer Rickheden Gustavsson)
-Description[fi]=KMail 5.2 -oletusteema (perustuu Breeze Flat -teemaan, jonka teki Kristofer Rickheden Gustavsson)
-Description[gl]=Tema predeterminado de KMail 5.2 (baseado en Breeze Flat, creado por Kristofer Rickheden Gustavsson)
-Description[it]=Tema predefinito di KMail 5.2 (basato su Brezza piatto, autore Kristofer Rickheden Gustavsson)
-Description[nl]=KMail standaard thema 5.2 (gebaseerd op de auteur van Breeze Flat Kristofer Rickheden Gustavsson)
-Description[pl]=Domyślny wystrój KMaila 5.2 (Oparty na Płaskiej Bryzie autorstwa Kristofer Rickheden Gustavsson)
-Description[pt]=Tema Predefinido 5.2 do KMail (Baseado no autor do Brisa Plano Kristofer Rickheden Gustavsson)
-Description[pt_BR]=Tema padrão do KMail 5.2 (Baseado no autor do Breeze Flat, Kristofer Rickheden Gustavsson)
-Description[sk]=Predvolená téma KMail 5.2 (založená na Breeze Flat, autor Kristofer Rickheden Gustavsson)
-Description[sl]=Privzeta tema za KMail 5.2 (Temelječa na ploski temi za Sapico, avtorja Kristoferja Rickhedena Gustavssona)
-Description[sr]=К‑поштина подразумевана тема 5.2 (на основу Поветарца равног, аутор Кристофер Рикхеден Густавсон)
-Description[sr@ijekavian]=К‑поштина подразумевана тема 5.2 (на основу Поветарца равног, аутор Кристофер Рикхеден Густавсон)
-Description[sr@ijekavianlatin]=K‑poština podrazumevana tema 5.2 (na osnovu Povetarca ravnog, autor Kristofer Rikheden Gustavson)
-Description[sr@latin]=K‑poština podrazumevana tema 5.2 (na osnovu Povetarca ravnog, autor Kristofer Rikheden Gustavson)
-Description[sv]=Kmail 5.2 standardtema (baserat på Breeze flat med upphovsma Kristofer Rickheden Gustavsson)
-Description[uk]=Типова тема KMail 5.2 (засновано на Breeze Flat, автором якої є Kristofer Rickheden Gustavsson)
-Description[x-test]=xxKMail Default Theme 5.2 (Based on Breeze Flat author Kristofer Rickheden Gustavsson)xx
-FileName=header.html
-Name=KMail 5.2
-Name[ast]=KMail 5.2
-Name[ca]=KMail 5.2
-Name[ca@valencia]=KMail 5.2
-Name[cs]=KMail 5.2
-Name[da]=KMail 5.2
-Name[de]=KMail 5.2
-Name[en_GB]=KMail 5.2
-Name[es]=KMail 5.2
-Name[et]=KMail 5.2
-Name[fi]=KMail 5.2
-Name[gl]=KMail 5.2
-Name[it]=KMail 5.2
-Name[nl]=KMail 5.2
-Name[pl]=KMail 5.2
-Name[pt]=KMail 5.2
-Name[pt_BR]=KMail 5.2
-Name[sk]=KMail 5.2
-Name[sl]=KMail 5.2
-Name[sr]=К‑пошта 5.2
-Name[sr@ijekavian]=К‑пошта 5.2
-Name[sr@ijekavianlatin]=K‑pošta 5.2
-Name[sr@latin]=K‑pošta 5.2
-Name[sv]=Kmail 5.2
-Name[uk]=KMail 5.2
-Name[x-test]=xxKMail 5.2xx
-ThemeVersion=1
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.png b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.png
deleted file mode 100644
index 982bd82..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.png
+++ /dev/null
Binary files differ
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.svg b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.svg
deleted file mode 100644
index 778dd98..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/photo.svg
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="48"
- height="72"
- id="svg3049"
- version="1.1"
- inkscape:version="0.91 r13725"
- sodipodi:docname="photo.svg"
- inkscape:export-filename="/home/uri/.kde/share/icons/NITRUX-KDE/16x16/actions/view-right-new.png"
- inkscape:export-xdpi="30"
- inkscape:export-ydpi="30">
- <defs
- id="defs3051" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="19.655546"
- inkscape:cx="6.5434849"
- inkscape:cy="43.289616"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="true"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="3200"
- inkscape:window-height="1660"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:window-maximized="1"
- inkscape:showpageshadow="false"
- borderlayer="true"
- showguides="true">
- <sodipodi:guide
- position="2.0000044,20.00003"
- orientation="18,0"
- id="guide4067" />
- <sodipodi:guide
- position="2.0000044,2.0000296"
- orientation="0,18"
- id="guide4069" />
- <sodipodi:guide
- position="46,19"
- orientation="-18,0"
- id="guide4071" />
- <sodipodi:guide
- position="38,70"
- orientation="0,-18"
- id="guide4073" />
- <sodipodi:guide
- position="3.0000044,19.00003"
- orientation="16,0"
- id="guide4077" />
- <sodipodi:guide
- position="3.0000044,3.0000296"
- orientation="0,16"
- id="guide4079" />
- <sodipodi:guide
- position="45,11"
- orientation="-16,0"
- id="guide4081" />
- <sodipodi:guide
- position="37,69"
- orientation="0,-16"
- id="guide4083" />
- <inkscape:grid
- type="xygrid"
- id="grid4085" />
- </sodipodi:namedview>
- <metadata
- id="metadata3054">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Capa 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-421.71429,-475.79074)">
- <path
- style="opacity:1;fill:#bdc3c7;fill-opacity:1;stroke:none"
- d="m 445.67924,480.79074 c -6.648,0 -12,5.352 -12,12 0,6.648 5.352,12 12,12 6.648,0 12,-5.352 12,-12 0,-6.648 -5.352,-12 -12,-12 z m 0,32 c -11.08,0 -20,3.56792 -20,8 l 0,20 0,4 4.80468,0 30.39064,0 4.80468,0 0,-4 0,-20 c 0,-4.43208 -8.92,-8 -20,-8 z m 0,4 c 8.864,0 16,2.5452 16,5.71092 l 0,18.28908 -32,0 0,-18.28908 c 0,-3.16572 7.136,-5.71092 16,-5.71092 z"
- id="rect4109"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/style.css b/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/style.css
deleted file mode 100644
index 371d926..0000000
--- a/plugins/messageviewerheaderplugins/defaultgrantleeheaderstyleplugin/theme/5.2/style.css
+++ /dev/null
@@ -1,79 +0,0 @@
-body {
- margin: 0;
- padding: 0;
-}
-div#headerbox {
- border-radius: 3px;
- border-bottom: 1px solid rgb(190, 190, 190);
- color: rgb(100, 100, 100) !important;
- overflow: auto;
- padding: 5px 20px;
-}
-div#headerbox table.outer {
- display: inline;
- position: fixed !important;
- top: -1px;
- left: -1px;
- bottom: -1px;
- right: 0px;
- border: none !important;
- table-collapse: collapse;
-}
-div#headerbox div#subject {
- color: rgb(100, 100, 100) !important;
- font-size: 22px;
- font-weight: normal;
- line-height: 24px;
- padding-bottom: 5px;
- padding-top: 5px;
-}
-div#headerbox div#photo {
- float: left;
- margin: 5px;
-}
-div#headerbox div.table {
- display: table;
- padding-right: 12px;
- padding-top: 6px;
-}
-div#headerbox div.row {
- display: table-row;
-}
-div#headerbox div.headerleft {
- display: table-cell;
- padding: 0.1em 1em;
-}
-div#headerbox div.headerright {
- display: table-cell;
- font-weight: bold;
- padding: 0.1em;
-}
-div#headerbox div.headerrightdate {
- color: rgb(120, 125, 129) !important;
- display: table-cell;
- font-weight: bold;
- padding: 0.1em;
-}
-div#headerbox .actiontable {
- display: table;
- width: 100%;
-}
-div#headerbox div.actionrowtable {
- display:table-row;
-}
-div#headerbox div.theactioncell {
- display: table-cell;
- padding: 0px 2px; /* just some padding, if needed*/
- white-space: pre; /* this will avoid line breaks*/
-}
-div#headerbox div.theactionbigcell{
- display: table-cell;
- width: 100%; /* this will shrink other cells */
-}
-
-#kmailContent {
- clear: both;
- margin-top: 10px;
- padding: 20px;
-}
-
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt
new file mode 100644
index 0000000..fd313c7
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/CMakeLists.txt
@@ -0,0 +1,15 @@
+set(messageviewer_standardsheaderstyleplugin_SRCS
+ standardsheaderstyleplugin.cpp
+ standardsheaderstyleinterface.cpp
+ standardheaderstrategy.cpp
+)
+
+kcoreaddons_add_plugin(messageviewer_standardsheaderstyleplugin JSON messageviewer_standardsheaderstyleplugin.json SOURCES
+ ${messageviewer_standardsheaderstyleplugin_SRCS} INSTALL_NAMESPACE messageviewer)
+
+target_link_libraries(messageviewer_standardsheaderstyleplugin
+ KF5::MessageViewer
+ KF5::XmlGui
+ KF5::I18n
+ KF5::GrantleeTheme
+)
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json
new file mode 100644
index 0000000..1c147dc
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/messageviewer_standardsheaderstyleplugin.json
@@ -0,0 +1,35 @@
+{
+ "KPlugin": {
+ "EnabledByDefault": "true",
+ "Name": "Standards Header Style",
+ "Name[ca@valencia]": "Estil de capçalera estàndard",
+ "Name[ca]": "Estil de capçalera estàndard",
+ "Name[cs]": "Standardní styl hlavičky",
+ "Name[da]": "Standard header-stil",
+ "Name[de]": "Vorspann-Design „Standard“",
+ "Name[es]": "Estilo de encabezado estándar",
+ "Name[et]": "Standardne päisestiil",
+ "Name[fi]": "Vakio-otsaketyyli",
+ "Name[gl]": "Estilo de cabeceira estándar",
+ "Name[it]": "Stile con intestazioni standard",
+ "Name[nl]": "Standaarden van header-stijl",
+ "Name[pl]": "Standardowe nagłówki",
+ "Name[pt]": "Estilo de Cabeçalhos Padrão",
+ "Name[pt_BR]": "Estilo de cabeçalho Padrão",
+ "Name[ru]": "Стандартный стиль заголовков",
+ "Name[sk]": "Štandardný štýl hlavičiek",
+ "Name[sl]": "Slog z običajnimi glavami",
+ "Name[sr@ijekavian]": "стандардни стил заглавља",
+ "Name[sr@ijekavianlatin]": "standardni stil zaglavlja",
+ "Name[sr@latin]": "standardni stil zaglavlja",
+ "Name[sr]": "стандардни стил заглавља",
+ "Name[sv]": "Normal huvudstil",
+ "Name[uk]": "Стандартний стиль заголовків",
+ "Name[x-test]": "xxStandards Header Stylexx",
+ "ServiceTypes": [
+ "MessageViewerHeaderStyle/Plugin"
+ ],
+ "Version": "1.0"
+ },
+ "X-KDE-MessageViewer-Header-Order": "4"
+} \ No newline at end of file
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp
new file mode 100644
index 0000000..154ca95
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.cpp
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 "standardheaderstrategy.h"
+
+using namespace MessageViewer;
+static const char *const standardHeaders[] = {
+ "subject", "from", "cc", "bcc", "to"
+};
+static const int numStandardHeaders = sizeof standardHeaders / sizeof * standardHeaders;
+
+StandardHeaderStrategy::StandardHeaderStrategy()
+ : HeaderStrategy(),
+ mHeadersToDisplay(stringList(standardHeaders, numStandardHeaders))
+{
+
+}
+
+StandardHeaderStrategy::~StandardHeaderStrategy()
+{
+
+}
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h
new file mode 100644
index 0000000..2923d45
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardheaderstrategy.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 STANDARDHEADERSTRATEGY_H
+#define STANDARDHEADERSTRATEGY_H
+
+#include <messageviewer/headerstrategy.h>
+#include <QStringList>
+
+namespace MessageViewer
+{
+//
+// StandardHeaderStrategy:
+// BCC, CC, Date, From, Subject, To
+//
+
+class StandardHeaderStrategy : public HeaderStrategy
+{
+public:
+ StandardHeaderStrategy();
+ ~StandardHeaderStrategy();
+
+public:
+ const char *name() const Q_DECL_OVERRIDE
+ {
+ return "standard";
+ }
+
+ QStringList headersToDisplay() const Q_DECL_OVERRIDE
+ {
+ return mHeadersToDisplay;
+ }
+ DefaultPolicy defaultPolicy() const Q_DECL_OVERRIDE
+ {
+ return Hide;
+ }
+
+private:
+ const QStringList mHeadersToDisplay;
+};
+
+}
+#endif // STANDARDHEADERSTRATEGY_H
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp
new file mode 100644
index 0000000..4bfa1c2
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.cpp
@@ -0,0 +1,51 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 "standardsheaderstyleinterface.h"
+#include <KToggleAction>
+#include <KLocalizedString>
+#include <KActionCollection>
+
+using namespace MessageViewer;
+StandardsHeaderStyleInterface::StandardsHeaderStyleInterface(MessageViewer::HeaderStylePlugin *plugin, QObject *parent)
+ : MessageViewer::HeaderStyleInterface(plugin, parent)
+{
+
+}
+
+StandardsHeaderStyleInterface::~StandardsHeaderStyleInterface()
+{
+
+}
+
+void StandardsHeaderStyleInterface::createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac)
+{
+ KToggleAction *act = new KToggleAction(i18nc("View->headers->", "&Standard Headers"), this);
+ ac->addAction(QStringLiteral("view_headers_standard"), act);
+ connect(act, &KToggleAction::triggered, this, &StandardsHeaderStyleInterface::slotStyleChanged);
+ addHelpTextAction(act, i18n("Show standard list of message headers"));
+ mAction.append(act);
+ addActionToMenu(menu, actionGroup);
+}
+
+void StandardsHeaderStyleInterface::activateAction()
+{
+ mAction.at(0)->setChecked(true);
+}
+
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h
new file mode 100644
index 0000000..2dddfd3
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleinterface.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 STANDARDSHEADERSTYLEINTERFACE_H
+#define STANDARDSHEADERSTYLEINTERFACE_H
+
+#include <messageviewer/headerstyleinterface.h>
+
+namespace MessageViewer
+{
+
+class StandardsHeaderStyleInterface : public MessageViewer::HeaderStyleInterface
+{
+ Q_OBJECT
+public:
+ explicit StandardsHeaderStyleInterface(HeaderStylePlugin *plugin, QObject *parent = Q_NULLPTR);
+ ~StandardsHeaderStyleInterface();
+
+ void createAction(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac) Q_DECL_OVERRIDE;
+ void activateAction() Q_DECL_OVERRIDE;
+};
+
+}
+
+#endif // STANDARDSHEADERSTYLEINTERFACE_H
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp
new file mode 100644
index 0000000..06cab2e
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.cpp
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 "standardsheaderstyleplugin.h"
+#include "standardsheaderstyleinterface.h"
+#include "standardheaderstrategy.h"
+#include "messageviewer/plainheaderstyle.h"
+#include <kpluginfactory.h>
+using namespace MessageViewer;
+
+K_PLUGIN_FACTORY_WITH_JSON(MessageViewerStandardsHeaderStylePluginFactory, "messageviewer_standardsheaderstyleplugin.json", registerPlugin<StandardsHeaderStylePlugin>();)
+
+StandardsHeaderStylePlugin::StandardsHeaderStylePlugin(QObject *parent, const QList<QVariant> &)
+ : MessageViewer::HeaderStylePlugin(parent),
+ mHeaderStyle(new PlainHeaderStyle),
+ mHeaderStrategy(new StandardHeaderStrategy)
+{
+}
+
+StandardsHeaderStylePlugin::~StandardsHeaderStylePlugin()
+{
+ delete mHeaderStyle;
+ delete mHeaderStrategy;
+}
+
+HeaderStyle *StandardsHeaderStylePlugin::headerStyle() const
+{
+ return mHeaderStyle;
+}
+
+HeaderStrategy *StandardsHeaderStylePlugin::headerStrategy() const
+{
+ return mHeaderStrategy;
+}
+
+HeaderStyleInterface *StandardsHeaderStylePlugin::createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent)
+{
+ MessageViewer::HeaderStyleInterface *view = new MessageViewer::StandardsHeaderStyleInterface(this, parent);
+ if (ac) {
+ view->createAction(menu, actionGroup, ac);
+ }
+ return view;
+}
+
+QString StandardsHeaderStylePlugin::name() const
+{
+ return QStringLiteral("standards-header");
+}
+
+#include "standardsheaderstyleplugin.moc"
diff --git a/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h
new file mode 100644
index 0000000..db88769
--- /dev/null
+++ b/plugins/messageviewerheaderplugins/standardsheaderstyleplugin/standardsheaderstyleplugin.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2015-2016 Laurent Montel <montel@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library 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
+ Library 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 STANDARDSHEADERSTYLEPLUGIN_H
+#define STANDARDSHEADERSTYLEPLUGIN_H
+
+#include "messageviewer/headerstyleplugin.h"
+
+#include <QVariant>
+
+namespace MessageViewer
+{
+class StandardsHeaderStylePlugin : public MessageViewer::HeaderStylePlugin
+{
+ Q_OBJECT
+public:
+ explicit StandardsHeaderStylePlugin(QObject *parent = Q_NULLPTR, const QList<QVariant> & = QList<QVariant>());
+ ~StandardsHeaderStylePlugin();
+
+ HeaderStyle *headerStyle() const Q_DECL_OVERRIDE;
+ HeaderStrategy *headerStrategy() const Q_DECL_OVERRIDE;
+ HeaderStyleInterface *createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent = Q_NULLPTR) Q_DECL_OVERRIDE;
+ QString name() const Q_DECL_OVERRIDE;
+private:
+ HeaderStyle *mHeaderStyle;
+ HeaderStrategy *mHeaderStrategy;
+};
+}
+#endif // STANDARDSHEADERSTYLEPLUGIN_H