Commit d28763fd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove hack about plugin. Use a virtual method for it

parent 0954c9bd
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
set(PIM_VERSION "5.13.46") set(PIM_VERSION "5.13.47")
if (POLICY CMP0053) if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW) cmake_policy(SET CMP0053 NEW)
......
...@@ -67,6 +67,11 @@ bool HeaderStylePlugin::isEnabled() const ...@@ -67,6 +67,11 @@ bool HeaderStylePlugin::isEnabled() const
return d->mIsEnabled; return d->mIsEnabled;
} }
QString HeaderStylePlugin::attachmentHtml() const
{
return {};
}
bool HeaderStylePlugin::hasConfigureDialog() const bool HeaderStylePlugin::hasConfigureDialog() const
{ {
return false; return false;
......
...@@ -53,6 +53,8 @@ public: ...@@ -53,6 +53,8 @@ public:
void setIsEnabled(bool enabled); void setIsEnabled(bool enabled);
bool isEnabled() const; bool isEnabled() const;
virtual QString attachmentHtml() const;
virtual bool hasConfigureDialog() const; virtual bool hasConfigureDialog() const;
virtual void showConfigureDialog(QWidget *parent); virtual void showConfigureDialog(QWidget *parent);
......
...@@ -2405,11 +2405,7 @@ QString ViewerPrivate::attachmentHtml() ...@@ -2405,11 +2405,7 @@ QString ViewerPrivate::attachmentHtml()
initializeColorFromScheme(); initializeColorFromScheme();
QString html = renderAttachments(mMessage.data(), mBackgroundAttachment); QString html = renderAttachments(mMessage.data(), mBackgroundAttachment);
if (!html.isEmpty()) { if (!html.isEmpty()) {
const bool isFancyTheme = (headerStylePlugin()->name() == QLatin1String("fancy")); html.prepend(headerStylePlugin()->attachmentHtml());
if (isFancyTheme) {
html.prepend(QStringLiteral("<div style=\"float:left;\">%1&nbsp;</div>").arg(i18n(
"Attachments:")));
}
} }
return html; return html;
} }
......
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