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

Add more actions

parent 227b713f
......@@ -18,7 +18,7 @@ include(KDEFrameworkCompilerSettings)
include(ECMQtDeclareLoggingCategory)
include(ECMAddTests)
set(MESSAGELIB_LIB_VERSION "5.1.61")
set(MESSAGELIB_LIB_VERSION "5.1.62")
set(KF5_VERSION "5.17.0")
set(KDEPIMLIBS_LIB_VERSION "5.1.42")
......
......@@ -423,6 +423,16 @@ QString HeaderStyleUtil::mailAction(Viewer::MailAction action) const
html = QStringLiteral("<a href=\"kmailaction:newMessage\"><img title=\"%2\" src=\"file:///%1\"></a>").arg(iconPath, i18n("New Message"));
break;
}
case Viewer::Print: {
const QString iconPath = IconNameCache::instance()->iconPath(QStringLiteral("document-print"), KIconLoader::Small);
html = QStringLiteral("<a href=\"kmailaction:print\"><img title=\"%2\" src=\"file:///%1\"></a>").arg(iconPath, i18n("Print"));
break;
}
case Viewer::PrintPreview: {
const QString iconPath = IconNameCache::instance()->iconPath(QStringLiteral("document-print-preview"), KIconLoader::Small);
html = QStringLiteral("<a href=\"kmailaction:printpreview\"><img title=\"%2\" src=\"file:///%1\"></a>").arg(iconPath, i18n("Print Preview"));
break;
}
}
return html;
}
......@@ -107,6 +107,12 @@ public:
} else if (urlPath == QStringLiteral("newMessage")) {
viewer->setMailAction(MessageViewer::Viewer::NewMessage);
return true;
} else if (urlPath == QStringLiteral("print")) {
viewer->setMailAction(MessageViewer::Viewer::Print);
return true;
} else if (urlPath == QStringLiteral("printpreview")) {
viewer->setMailAction(MessageViewer::Viewer::PrintPreview);
return true;
}
}
return false;
......
......@@ -131,7 +131,9 @@ public:
Reply,
ReplyToAll,
Forward,
NewMessage
NewMessage,
Print,
PrintPreview
};
/**
......
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