Commit 6ed0d76e authored by Laurent Montel's avatar Laurent Montel 😁

Keep "disable emoticon" state even if we switch message

CCMAIL: faure@kde.org
parent 652dd42d
......@@ -601,7 +601,7 @@ QAction *Viewer::resetMessageDisplayFormatAction() const
return d->mResetMessageDisplayFormat;
}
QAction *Viewer::disableEmoticonAction() const
KToggleAction *Viewer::disableEmoticonAction() const
{
Q_D(const Viewer);
return d->mDisableEmoticonAction;
......
......@@ -278,7 +278,7 @@ public:
QAction *saveAsAction() const;
QAction *saveMessageDisplayFormatAction() const;
QAction *resetMessageDisplayFormatAction() const;
QAction *disableEmoticonAction() const;
KToggleAction *disableEmoticonAction() const;
KActionMenu *shareServiceUrlMenu() const;
HeaderStylePlugin *headerStylePlugin() const;
void setPluginName(const QString &pluginName);
......
......@@ -1254,7 +1254,6 @@ void ViewerPrivate::printPreviewMessage(const Akonadi::Item &message)
void ViewerPrivate::resetStateForNewMessage()
{
mForceEmoticons = true;
mClickedUrl.clear();
mImageUrl.clear();
enableMessageDisplay(); // just to make sure it's on
......@@ -1719,7 +1718,7 @@ void ViewerPrivate::createActions()
ac->addAction(QStringLiteral("shareservice_menu"), mShareServiceUrlMenu);
connect(mShareServiceManager, &PimCommon::ShareServiceUrlManager::serviceUrlSelected, this, &ViewerPrivate::slotServiceUrlSelected);
mDisableEmoticonAction = new QAction(i18n("Disable Emoticon"), this);
mDisableEmoticonAction = new KToggleAction(i18n("Disable Emoticon"), this);
ac->addAction(QStringLiteral("disable_emoticon"), mDisableEmoticonAction);
connect(mDisableEmoticonAction, &QAction::triggered, this, &ViewerPrivate::slotDisableEmoticon);
ac->setDefaultShortcut(mFindInMessageAction, KStandardShortcut::find().first());
......@@ -3140,8 +3139,6 @@ void ViewerPrivate::setPrintElementBackground(bool printElementBackground)
void ViewerPrivate::slotDisableEmoticon()
{
if (mForceEmoticons) {
mForceEmoticons = false;
update(MimeTreeParser::Force);
}
mForceEmoticons = !mForceEmoticons;
update(MimeTreeParser::Force);
}
......@@ -643,7 +643,7 @@ public:
QAction *mFindInMessageAction;
QAction *mSaveMessageDisplayFormat;
QAction *mResetMessageDisplayFormat;
QAction *mDisableEmoticonAction;
KToggleAction *mDisableEmoticonAction;
KToggleAction *mHeaderOnlyAttachmentsAction;
KSelectAction *mSelectEncodingAction;
KToggleAction *mToggleFixFontAction;
......
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