Commit 75ded15b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add action

parent b48975fb
......@@ -9,6 +9,7 @@
*/
#include "viewer_p.h"
#include "viewer.h"
#include "viewerpurposemenuwidget.h"
#include "messageviewer_debug.h"
#include "utils/mimetype.h"
......@@ -1710,6 +1711,13 @@ void ViewerPrivate::createActions()
connect(mSpeakTextAction, &QAction::triggered,
this, &ViewerPrivate::slotSpeakText);
MailfilterPurposeMenuWidget *purposeMenuWidget = new MailfilterPurposeMenuWidget(mViewer, this);
mShareTextAction = new QAction(i18n("Share Text..."), this);
mShareTextAction->setMenu(purposeMenuWidget->menu());
mShareTextAction->setIcon(QIcon::fromTheme(QStringLiteral("document-share")));
ac->addAction(QStringLiteral("purpose_share_text_menu"), mShareTextAction);
purposeMenuWidget->setViewer(mViewer);
mCopyImageLocation = new QAction(i18n("Copy Image Location"), this);
mCopyImageLocation->setIcon(QIcon::fromTheme(QStringLiteral("view-media-visualization")));
ac->addAction(QStringLiteral("copy_image_location"), mCopyImageLocation);
......
......@@ -641,6 +641,7 @@ public:
QAction *mDevelopmentToolsAction = nullptr;
QAction *mSpeakTextAction = nullptr;
QAction *mCopyImageLocation = nullptr;
QAction *mShareTextAction = nullptr;
QUrl mClickedUrl;
QUrl mImageUrl;
HtmlWriter *mHtmlWriter = nullptr;
......
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