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

Remove zoomtextonly as it's not supported now

parent 991eadb4
......@@ -37,7 +37,6 @@ void ZoomActionMenuTest::shouldHaveDefaultValue()
menu.setActionCollection(new KActionCollection(this));
menu.createZoomActions();
QVERIFY(menu.zoomTextOnlyAction());
QVERIFY(menu.zoomInAction());
QVERIFY(menu.zoomOutAction());
QVERIFY(menu.zoomResetAction());
......
......@@ -130,10 +130,6 @@ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/sta
<label>Allow messages to load external references from the Internet</label>
<default>false</default>
</entry>
<entry name="zoomTextOnly" type="Bool">
<label>Zoom only text</label>
<default>false</default>
</entry>
<entry name="attachmentStrategy" type="String" key="attachment-strategy">
<label>How attachments are shown</label>
<default>Smart</default>
......
......@@ -587,18 +587,6 @@ void Viewer::slotZoomOut()
d->mZoomActionMenu->slotZoomOut();
}
void Viewer::setZoomTextOnly(bool textOnly)
{
Q_D(Viewer);
d->mZoomActionMenu->setZoomTextOnly(textOnly);
}
bool Viewer::zoomTextOnly() const
{
Q_D(const Viewer);
return d->mZoomTextOnly;
}
QAction *Viewer::findInMessageAction() const
{
Q_D(const Viewer);
......
......@@ -274,9 +274,6 @@ public:
void setZoomFactor(qreal zoomFactor);
void setZoomTextOnly(bool textOnly);
bool zoomTextOnly() const;
KToggleAction *toggleFixFontAction() const;
KToggleAction *toggleMimePartTreeAction() const;
......
......@@ -1115,9 +1115,6 @@ void ViewerPrivate::readConfig()
mHtmlMailGlobalSetting = MessageViewer::MessageViewerSettings::self()->htmlMail();
mHtmlLoadExternalGlobalSetting = MessageViewer::MessageViewerSettings::self()->htmlLoadExternal();
if (mZoomActionMenu) {
mZoomActionMenu->setZoomTextOnly(MessageViewer::MessageViewerSettings::self()->zoomTextOnly());
}
readGravatarConfig();
if (mHeaderStyleMenuManager) {
mHeaderStyleMenuManager->readConfig();
......@@ -1165,9 +1162,6 @@ void ViewerPrivate::writeConfig(bool sync)
if (attachmentStrategy()) {
MessageViewer::MessageViewerSettings::self()->setAttachmentStrategy(QLatin1String(attachmentStrategy()->name()));
}
if (mZoomActionMenu) {
MessageViewer::MessageViewerSettings::self()->setZoomTextOnly(mZoomActionMenu->zoomTextOnly());
}
saveSplitterSizes();
if (sync) {
Q_EMIT requestConfigSync();
......
......@@ -658,7 +658,6 @@ public:
bool mShowSignatureDetails;
bool mShowAttachmentQuicklist;
bool mExternalWindow;
bool mZoomTextOnly;
int mRecursionCountForDisplayMessage;
KMime::Content *mCurrentContent;
KMime::Content *mMessagePartNode;
......
......@@ -35,24 +35,20 @@ class MessageViewer::ZoomActionMenuPrivate
public:
ZoomActionMenuPrivate(KActionMenu *qq)
: mZoomFactor(100),
mZoomTextOnlyAction(Q_NULLPTR),
mZoomInAction(Q_NULLPTR),
mZoomOutAction(Q_NULLPTR),
mZoomResetAction(Q_NULLPTR),
mActionCollection(Q_NULLPTR),
mZoomTextOnly(false),
q(qq)
{
}
void createMenu();
qreal mZoomFactor;
KToggleAction *mZoomTextOnlyAction;
QAction *mZoomInAction;
QAction *mZoomOutAction;
QAction *mZoomResetAction;
KActionCollection *mActionCollection;
bool mZoomTextOnly;
KActionMenu *q;
};
......@@ -75,10 +71,6 @@ void ZoomActionMenu::setActionCollection(KActionCollection *ac)
void ZoomActionMenu::createZoomActions()
{
// Zoom actions
d->mZoomTextOnlyAction = new KToggleAction(i18n("Zoom Text Only"), this);
d->mActionCollection->addAction(QStringLiteral("toggle_zoomtextonly"), d->mZoomTextOnlyAction);
connect(d->mZoomTextOnlyAction, &QAction::triggered, this, &ZoomActionMenu::slotZoomTextOnly);
d->mZoomInAction = new QAction(QIcon::fromTheme(QStringLiteral("zoom-in")), i18n("&Zoom In"), this);
d->mActionCollection->addAction(QStringLiteral("zoom_in"), d->mZoomInAction);
connect(d->mZoomInAction, &QAction::triggered, this, &ZoomActionMenu::slotZoomIn);
......@@ -96,11 +88,6 @@ void ZoomActionMenu::createZoomActions()
d->createMenu();
}
KToggleAction *ZoomActionMenu::zoomTextOnlyAction() const
{
return d->mZoomTextOnlyAction;
}
QAction *ZoomActionMenu::zoomInAction() const
{
return d->mZoomInAction;
......@@ -150,31 +137,12 @@ void ZoomActionMenu::slotZoomOut()
Q_EMIT zoomChanged(d->mZoomFactor / 100.0);
}
void ZoomActionMenu::setZoomTextOnly(bool textOnly)
{
d->mZoomTextOnly = textOnly;
if (d->mZoomTextOnlyAction) {
d->mZoomTextOnlyAction->setChecked(d->mZoomTextOnly);
}
Q_EMIT zoomTextOnlyChanged(d->mZoomTextOnly);
}
void ZoomActionMenu::slotZoomTextOnly()
{
setZoomTextOnly(!d->mZoomTextOnly);
}
void ZoomActionMenu::slotZoomReset()
{
d->mZoomFactor = 100;
Q_EMIT zoomChanged(1.0);
}
bool ZoomActionMenu::zoomTextOnly() const
{
return d->mZoomTextOnly;
}
qreal ZoomActionMenu::zoomFactor() const
{
return d->mZoomFactor;
......
......@@ -33,7 +33,6 @@ public:
~ZoomActionMenu();
void createZoomActions();
KToggleAction *zoomTextOnlyAction() const;
QAction *zoomInAction() const;
......@@ -47,17 +46,13 @@ public:
qreal zoomFactor() const;
void setWebViewerZoomFactor(qreal zoomFactor);
bool zoomTextOnly() const;
Q_SIGNALS:
void zoomChanged(qreal value);
void zoomTextOnlyChanged(bool b);
public Q_SLOTS:
void slotZoomIn();
void slotZoomOut();
void setZoomTextOnly(bool textOnly);
void slotZoomTextOnly();
void slotZoomReset();
private:
......
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