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