Commit 90314670 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Save external ref here too

parent c67e7be9
......@@ -220,6 +220,8 @@ void FolderSettings::readConfig()
mFormatMessage = static_cast<MessageViewer::Viewer::DisplayFormatMessage>(configGroup.readEntry("displayFormatOverride",
static_cast<int>(MessageViewer::Viewer::UseGlobalSetting)));
mFolderHtmlLoadExtPreference = configGroup.readEntry("htmlLoadExternalOverride", false);
}
bool FolderSettings::isValid() const
......@@ -287,6 +289,11 @@ void FolderSettings::writeConfig() const
configGroup.writeEntry("displayFormatOverride", static_cast<int>(mFormatMessage));
}
}
if (mFolderHtmlLoadExtPreference) {
configGroup.writeEntry("htmlLoadExternalOverride", mFolderHtmlLoadExtPreference);
} else {
configGroup.deleteEntry("htmlLoadExternalOverride");
}
}
void FolderSettings::setShortcut(const QKeySequence &sc)
......@@ -335,6 +342,16 @@ QString FolderSettings::resource() const
return resource;
}
bool FolderSettings::folderHtmlLoadExtPreference() const
{
return mFolderHtmlLoadExtPreference;
}
void FolderSettings::setFolderHtmlLoadExtPreference(bool folderHtmlLoadExtPreference)
{
mFolderHtmlLoadExtPreference = folderHtmlLoadExtPreference;
}
uint FolderSettings::fallBackIdentity() const
{
int identityId = -1;
......
......@@ -121,6 +121,9 @@ public:
Q_REQUIRED_RESULT MessageViewer::Viewer::DisplayFormatMessage formatMessage() const;
void setFormatMessage(MessageViewer::Viewer::DisplayFormatMessage formatMessage);
Q_REQUIRED_RESULT bool folderHtmlLoadExtPreference() const;
void setFolderHtmlLoadExtPreference(bool folderHtmlLoadExtPreference);
protected Q_SLOTS:
void slotIdentitiesChanged();
......@@ -144,6 +147,8 @@ private:
/** Should this folder be hidden in the folder selection dialog? */
bool mHideInSelectionDialog = false;
bool mFolderHtmlLoadExtPreference = false;
/** shortcut associated with this folder or null, if none is configured. */
QKeySequence mShortcut;
bool mWriteConfig;
......
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