Commit d41a0589 authored by Laurent Montel's avatar Laurent Montel 😁

Allow to hide/show action in headerstyle

parent 3924ce72
......@@ -17,6 +17,7 @@
#include "defaultgrantleeheaderstyleinterface.h"
#include "defaultgrantleeheaderstyleplugin.h"
#include "globalsettings_base.h"
#include <messageviewer/grantleeheaderstyle.h>
#include "defaultgrantleeheaderstrategy.h"
#include <kpluginfactory.h>
......@@ -29,6 +30,7 @@ DefaultGrantleeHeaderStylePlugin::DefaultGrantleeHeaderStylePlugin(QObject *pare
mHeaderStyle(new GrantleeHeaderStyle),
mHeaderStrategy(new DefaultGrantleeHeaderStrategy)
{
initializePlugin();
}
DefaultGrantleeHeaderStylePlugin::~DefaultGrantleeHeaderStylePlugin()
......@@ -36,6 +38,11 @@ DefaultGrantleeHeaderStylePlugin::~DefaultGrantleeHeaderStylePlugin()
}
void DefaultGrantleeHeaderStylePlugin::initializePlugin()
{
mHeaderStyle->setShowMailAction(DefaultGrantleeHeaderStylePluginSettings::self()->showActionMail());
}
HeaderStyle *DefaultGrantleeHeaderStylePlugin::headerStyle() const
{
return mHeaderStyle;
......
......@@ -37,6 +37,7 @@ public:
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;
};
......
......@@ -8,7 +8,7 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/sta
<default>5.2</default>
</entry>
<entry name="ShowActionMail" type="bool">
<default>true</default>
<default>false</default>
</entry>
</group>
......
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