summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2022-10-09 20:33:10 +0200
committerSlávek Banko <slavek.banko@axis.cz>2022-10-13 05:54:25 +0200
commitc8e1b254e243af4368f5430d8478f7a3a66d1fc6 (patch)
tree9d51f004212c45f9cc4c2a7c5e634b43630ae46d /kmail/kmreaderwin.cpp
parent746e02af07f7dc223940ad80a0a234c0aff85850 (diff)
downloadtdepim-c8e1b254e243af4368f5430d8478f7a3a66d1fc6.tar.gz
tdepim-c8e1b254e243af4368f5430d8478f7a3a66d1fc6.zip
Distinguish between settings and explicit override for external content
Summary: This will allow KMail to properly communicate the difference also when using per-folder settings for loading external references. This in turn makes 746e02af07f7dc223940ad80a0a234c0aff85850 also work in that case. Taken from KDE patches and adapted to TDE. See https://phabricator.kde.org/D12393 and https://phabricator.kde.org/D12394 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 9ecb56b1a..00a71a78b 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -464,6 +464,7 @@ KMReaderWin::KMReaderWin(TQWidget *aParent,
readConfig();
mHtmlOverride = false;
+ mHtmlLoadExtDefault = false;
mHtmlLoadExtOverride = false;
mLevelQuote = GlobalSettings::self()->collapseQuoteLevelSpin() - 1;
@@ -902,7 +903,6 @@ void KMReaderWin::readConfig(void)
mToggleFixFontAction->setChecked( mUseFixedFont );
mHtmlMail = reader.readBoolEntry( "htmlMail", false );
- mHtmlLoadExternal = reader.readBoolEntry( "htmlLoadExternal", false );
setHeaderStyleAndStrategy( HeaderStyle::create( reader.readEntry( "header-style", "fancy" ) ),
HeaderStrategy::create( reader.readEntry( "header-set-displayed", "rich" ) ) );
@@ -2496,11 +2496,14 @@ void KMReaderWin::setHtmlOverride(bool override)
//-----------------------------------------------------------------------------
-void KMReaderWin::setHtmlLoadExtOverride(bool override)
+void KMReaderWin::setHtmlLoadExtDefault(bool loadExtDefault)
{
- mHtmlLoadExtOverride = override;
- //if (message())
- // message()->setDecodeHTML(htmlMail());
+ mHtmlLoadExtDefault = loadExtDefault;
+}
+
+void KMReaderWin::setHtmlLoadExtOverride(bool loadExtOverride)
+{
+ mHtmlLoadExtOverride = loadExtOverride;
}
@@ -2525,8 +2528,8 @@ bool KMReaderWin::htmlLoadExternal()
return mHtmlLoadExtOverride;
}
- return ((mHtmlLoadExternal && !mHtmlLoadExtOverride) ||
- (!mHtmlLoadExternal && mHtmlLoadExtOverride));
+ return ((mHtmlLoadExtDefault && !mHtmlLoadExtOverride) ||
+ (!mHtmlLoadExtDefault && mHtmlLoadExtOverride));
}