summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-06 18:44:10 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-10 10:26:11 +0100
commit76796796bec37a1670cfc4e0b1e42e7b1096b237 (patch)
tree81dc3079596160b36ef5c2709c6a00dd9eaf2345 /src
parent80e44a9e3ade61695b4807a3a900d2866138ecac (diff)
Re-organize settings. Add setting to remember filters when restarting MO.
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt3
-rw-r--r--src/filterlist.cpp5
-rw-r--r--src/settings.cpp10
-rw-r--r--src/settings.h5
-rw-r--r--src/settingsdialog.cpp2
-rw-r--r--src/settingsdialog.ui785
-rw-r--r--src/settingsdialoggeneral.cpp27
-rw-r--r--src/settingsdialoggeneral.h1
-rw-r--r--src/settingsdialoguserinterface.cpp53
-rw-r--r--src/settingsdialoguserinterface.h15
-rw-r--r--src/settingsdialogworkarounds.cpp2
11 files changed, 488 insertions, 420 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4b74137e..a068f1a8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -103,7 +103,6 @@ add_filter(NAME src/mainwindow GROUPS
filetree
filetreeitem
filetreemodel
- filterlist
mainwindow
savestab
statusbar
@@ -145,6 +144,7 @@ add_filter(NAME src/modlist GROUPS
)
add_filter(NAME src/modlist/view GROUPS
+ filterlist
modlistview
modlistviewactions
modlistcontextmenu
@@ -202,6 +202,7 @@ add_filter(NAME src/settingsdialog GROUPS
settingsdialogplugins
settingsdialogsteam
settingsdialogworkarounds
+ settingsdialoguserinterface
disableproxyplugindialog
)
diff --git a/src/filterlist.cpp b/src/filterlist.cpp
index 4c1c6fff..b594bcc6 100644
--- a/src/filterlist.cpp
+++ b/src/filterlist.cpp
@@ -234,7 +234,10 @@ void FilterList::restoreState(const Settings& s)
s.widgets().restoreIndex(ui->filtersSeparators);
s.widgets().restoreChecked(ui->filtersAnd);
s.widgets().restoreChecked(ui->filtersOr);
- s.widgets().restoreTreeCheckState(ui->filters, CriteriaItem::StateRole);
+
+ if (m_core.settings().interface().saveFilters()) {
+ s.widgets().restoreTreeCheckState(ui->filters, CriteriaItem::StateRole);
+ }
checkCriteria();
}
diff --git a/src/settings.cpp b/src/settings.cpp
index e04cd0c1..7f943904 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -2195,6 +2195,16 @@ void InterfaceSettings::setCollapsibleSeparatorsConflicts(bool b)
set(m_Settings, "Settings", "collapsible_separators_conflicts", b);
}
+bool InterfaceSettings::saveFilters() const
+{
+ return get<bool>(m_Settings, "Settings", "save_filters", false);
+}
+
+void InterfaceSettings::setSaveFilters(bool b)
+{
+ set(m_Settings, "Settings", "save_filters", b);
+}
+
bool InterfaceSettings::compactDownloads() const
{
return get<bool>(m_Settings, "Settings", "compact_downloads", false);
diff --git a/src/settings.h b/src/settings.h
index 043b22a4..d61f3c20 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -631,6 +631,11 @@ public:
bool collapsibleSeparatorsConflicts() const;
void setCollapsibleSeparatorsConflicts(bool b);
+ // whether to save/restore filter states between runs
+ //
+ bool saveFilters() const;
+ void setSaveFilters(bool b);
+
// whether to show compact downloads
//
bool compactDownloads() const;
diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp
index c4a53fcd..d6b7ceec 100644
--- a/src/settingsdialog.cpp
+++ b/src/settingsdialog.cpp
@@ -25,6 +25,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "settingsdialogpaths.h"
#include "settingsdialogplugins.h"
#include "settingsdialogsteam.h"
+#include "settingsdialoguserinterface.h"
#include "settingsdialogworkarounds.h"
using namespace MOBase;
@@ -39,6 +40,7 @@ SettingsDialog::SettingsDialog(PluginContainer *pluginContainer, Settings& setti
ui->setupUi(this);
m_tabs.push_back(std::unique_ptr<SettingsTab>(new GeneralSettingsTab(settings, *this)));
+ m_tabs.push_back(std::unique_ptr<SettingsTab>(new UserInterfaceSettingsTab(settings, *this)));
m_tabs.push_back(std::unique_ptr<SettingsTab>(new PathsSettingsTab(settings, *this)));
m_tabs.push_back(std::unique_ptr<SettingsTab>(new DiagnosticsSettingsTab(settings, *this)));
m_tabs.push_back(std::unique_ptr<SettingsTab>(new NexusSettingsTab(settings, *this)));
diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui
index ae4f4f34..a22beacd 100644
--- a/src/settingsdialog.ui
+++ b/src/settingsdialog.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>820</width>
- <height>652</height>
+ <height>651</height>
</rect>
</property>
<property name="windowTitle">
@@ -23,434 +23,473 @@
<attribute name="title">
<string>General</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,1,0">
- <item row="6" column="0" colspan="2">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
+ <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0,0">
+ <item row="5" column="0">
+ <widget class="QPushButton" name="resetDialogsButton">
+ <property name="maximumSize">
<size>
- <width>0</width>
- <height>0</height>
+ <width>16777215</width>
+ <height>16777215</height>
</size>
</property>
- </spacer>
+ <property name="toolTip">
+ <string>Reset all choices made in dialogs.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Reset all choices made in dialogs.</string>
+ </property>
+ <property name="text">
+ <string>Reset Dialog Choices</string>
+ </property>
+ </widget>
</item>
- <item row="2" column="1">
- <widget class="QGroupBox" name="groupBox_6">
- <property name="title">
- <string>Updates</string>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="changeGameConfirmation">
+ <property name="text">
+ <string>Show confirmation when changing instance</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QCheckBox" name="checkForUpdates">
- <property name="toolTip">
- <string>Check for Mod Organizer updates on Github on startup.</string>
- </property>
- <property name="whatsThis">
- <string>Check for Mod Organizer updates on Github on startup.</string>
- </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QWidget" name="widget_6" native="true">
+ <layout class="QGridLayout" name="gridLayout_5" columnstretch="0,1,0">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
<property name="text">
- <string>Check for updates</string>
+ <string>Language</string>
</property>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="usePrereleaseBox">
- <property name="toolTip">
- <string>Update to non-stable releases.</string>
- </property>
- <property name="whatsThis">
- <string>Update to non-stable releases.</string>
- </property>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_10">
<property name="text">
- <string>Install Pre-releases (Betas)</string>
+ <string>Style</string>
</property>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer_9">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="0" rowspan="3">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>User Interface</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_14">
- <item>
- <widget class="QWidget" name="widget_6" native="true">
- <layout class="QGridLayout" name="gridLayout_5" columnstretch="0,1,0">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Language</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Style</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QComboBox" name="styleBox">
- <property name="toolTip">
- <string>Visual theme of the user interface.</string>
- </property>
- <property name="whatsThis">
- <string>Visual theme of the user interface.</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="exploreStyles">
- <property name="text">
- <string>Explore...</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="2">
- <widget class="QComboBox" name="languageBox">
- <property name="toolTip">
- <string>The language of the user interface.</string>
- </property>
- <property name="whatsThis">
- <string>The language of the user interface.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="2">
- <widget class="LinkLabel" name="label_33">
- <property name="toolTip">
- <string>https://www.transifex.com/mod-organizer-2-team/mod-organizer-2/</string>
- </property>
- <property name="text">
- <string>&lt;a href=&quot;https://www.transifex.com/mod-organizer-2-team/mod-organizer-2/&quot;&gt;Help translate Mod Organizer&lt;/a&gt;</string>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="centerDialogs">
+ <item row="2" column="1">
+ <widget class="QComboBox" name="styleBox">
<property name="toolTip">
- <string>Dialogs will always be centered on the main window, but will remember their size.</string>
+ <string>Visual theme of the user interface.</string>
</property>
<property name="whatsThis">
- <string>Dialogs will always be centered on the main window, but will remember their size.</string>
- </property>
- <property name="text">
- <string>Always center dialogs</string>
+ <string>Visual theme of the user interface.</string>
</property>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="changeGameConfirmation">
+ <item row="2" column="2">
+ <widget class="QPushButton" name="exploreStyles">
<property name="text">
- <string>Show confirmation when changing instance</string>
+ <string>Explore...</string>
</property>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="doubleClickPreviews">
+ <item row="0" column="1" colspan="2">
+ <widget class="QComboBox" name="languageBox">
<property name="toolTip">
- <string>Whether double-clicking on a file opens the preview window or launches the program associated with it. This applies to the Data tab as well as the Conflicts and Filetree tabs in the mod info window.</string>
- </property>
- <property name="text">
- <string>Open previews on double-click</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="resetDialogsButton">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="toolTip">
- <string>Reset all choices made in dialogs.</string>
+ <string>The language of the user interface.</string>
</property>
<property name="whatsThis">
- <string>Reset all choices made in dialogs.</string>
- </property>
- <property name="text">
- <string>Reset Dialog Choices</string>
+ <string>The language of the user interface.</string>
</property>
</widget>
</item>
- <item>
- <widget class="QPushButton" name="categoriesBtn">
+ <item row="1" column="1" colspan="2">
+ <widget class="LinkLabel" name="label_33">
<property name="toolTip">
- <string>Modify the categories available to arrange your mods.</string>
- </property>
- <property name="whatsThis">
- <string>Modify the categories available to arrange your mods.</string>
+ <string>https://www.transifex.com/mod-organizer-2-team/mod-organizer-2/</string>
</property>
<property name="text">
- <string>Configure Mod Categories</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_11">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <string>&lt;a href=&quot;https://www.transifex.com/mod-organizer-2-team/mod-organizer-2/&quot;&gt;Help translate Mod Organizer&lt;/a&gt;</string>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
+ <property name="openExternalLinks">
+ <bool>true</bool>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QGroupBox" name="groupBox_5">
+ <item row="6" column="0">
+ <widget class="QPushButton" name="categoriesBtn">
+ <property name="toolTip">
+ <string>Modify the categories available to arrange your mods.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Modify the categories available to arrange your mods.</string>
+ </property>
+ <property name="text">
+ <string>Configure Mod Categories</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="centerDialogs">
+ <property name="toolTip">
+ <string>Dialogs will always be centered on the main window, but will remember their size.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Dialogs will always be centered on the main window, but will remember their size.</string>
+ </property>
+ <property name="text">
+ <string>Always center dialogs</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0" colspan="2">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="doubleClickPreviews">
+ <property name="toolTip">
+ <string>Whether double-clicking on a file opens the preview window or launches the program associated with it. This applies to the Data tab as well as the Conflicts and Filetree tabs in the mod info window.</string>
+ </property>
+ <property name="text">
+ <string>Open previews on double-click</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox_6">
<property name="title">
- <string>Download List</string>
+ <string>Updates</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QCheckBox" name="showMetaBox">
+ <widget class="QCheckBox" name="checkForUpdates">
<property name="toolTip">
- <string>Show meta information instead of file names in the download list.</string>
+ <string>Check for Mod Organizer updates on Github on startup.</string>
</property>
<property name="whatsThis">
- <string>Show meta information instead of file names in the download list.</string>
+ <string>Check for Mod Organizer updates on Github on startup.</string>
</property>
<property name="text">
- <string>Show Meta Information</string>
+ <string>Check for updates</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="compactBox">
+ <widget class="QCheckBox" name="usePrereleaseBox">
<property name="toolTip">
- <string>Make the download list more compact.</string>
+ <string>Update to non-stable releases.</string>
</property>
<property name="whatsThis">
- <string>Make the download list more compact.</string>
+ <string>Update to non-stable releases.</string>
</property>
<property name="text">
- <string>Compact List</string>
+ <string>Install Pre-releases (Betas)</string>
</property>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer_5">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</widget>
</item>
- <item row="4" column="0" colspan="2">
- <widget class="QGroupBox" name="ModlistGroupBox">
- <property name="title">
- <string>Colors</string>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="uiTab">
+ <property name="accessibleName">
+ <string/>
+ </property>
+ <attribute name="title">
+ <string>User Interface</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_19">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <property name="bottomMargin">
+ <number>0</number>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_13">
- <item>
- <widget class="ColorTable" name="colorTable">
- <property name="editTriggers">
- <set>QAbstractItemView::NoEditTriggers</set>
- </property>
- <property name="selectionMode">
- <enum>QAbstractItemView::SingleSelection</enum>
- </property>
- <property name="selectionBehavior">
- <enum>QAbstractItemView::SelectRows</enum>
- </property>
- <property name="verticalScrollMode">
- <enum>QAbstractItemView::ScrollPerPixel</enum>
- </property>
- <property name="cornerButtonEnabled">
- <bool>false</bool>
- </property>
- <attribute name="horizontalHeaderVisible">
- <bool>false</bool>
- </attribute>
- <attribute name="horizontalHeaderHighlightSections">
- <bool>false</bool>
- </attribute>
- <attribute name="horizontalHeaderStretchLastSection">
- <bool>true</bool>
- </attribute>
- <attribute name="verticalHeaderVisible">
- <bool>false</bool>
- </attribute>
- </widget>
- </item>
- <item>
- <widget class="QWidget" name="widget_5" native="true">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QCheckBox" name="colorSeparatorsBox">
- <property name="toolTip">
- <string>Colors set on separators will also be shown in the mod list scrollbar at the location of the separator. This can be useful for quickly navigating to a specific separator.</string>
- </property>
- <property name="whatsThis">
- <string>Colors set on separators will also be shown in the mod list scrollbar at the location of the separator. This can be useful for quickly navigating to a specific separator.</string>
- </property>
- <property name="text">
- <string>Show mod list separator colors on the scrollbar</string>
- </property>
- <property name="checked">
- <bool>true</bool>
+ <item>
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Mod List</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_17">
+ <item>
+ <widget class="QCheckBox" name="colorSeparatorsBox">
+ <property name="toolTip">
+ <string>Colors set on separators will also be shown in the mod list scrollbar at the location of the separator. This can be useful for quickly navigating to a specific separator.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Colors set on separators will also be shown in the mod list scrollbar at the location of the separator. This can be useful for quickly navigating to a specific separator.</string>
+ </property>
+ <property name="text">
+ <string>Show mod list separator colors on the scrollbar</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="displayForeignBox">
+ <property name="toolTip">
+ <string>Disable this to no longer display mods installed outside MO in the mod list (left pane). Assets from those mods will then be treated as having lowest mod priority together with the original game content.</string>
+ </property>
+ <property name="whatsThis">
+ <string>By default Mod Organizer will display esp+bsa bundles installed with foreign tools as mods (left pane). This allows you to control their priority in relation to other mods. This is particularly useful if you also use Steam Workshop to install mods.
+However, if you installed loose file mods outside MO which conflict with BSAs also installed outside MO those conflicts can't be resolved correctly.
+
+If you disable this feature, MO will only display official DLCs this way. Please note that plugins (esps, esms, and esls) displayed in the right pane are completely unaffected by this feature.</string>
+ </property>
+ <property name="text">
+ <string>Display mods installed outside MO</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="saveFiltersBox">
+ <property name="toolTip">
+ <string>Save the current filters when closing MO2 and restore them on startup.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Save the current filters when closing MO2 and restore them on startup.</string>
+ </property>
+ <property name="text">
+ <string>Remembers selected filters after restarting MO</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_9">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="collapsibleSeparatorsBox">
+ <property name="title">
+ <string>Collapsible Separators</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_20">
+ <property name="leftMargin">
+ <number>7</number>
</property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <property name="rightMargin">
+ <number>7</number>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ <item>
+ <widget class="QCheckBox" name="collapsibleSeparatorsConflictsBox">
+ <property name="toolTip">
+ <string>Display mod conflicts on separator when collapsed.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Display mod conflicts on separator when collapsed.</string>
+ </property>
+ <property name="text">
+ <string>Show conflicts on separators</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_12">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_5">
+ <property name="title">
+ <string>Download List</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="showMetaBox">
+ <property name="toolTip">
+ <string>Show meta information instead of file names in the download list.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Show meta information instead of file names in the download list.</string>
+ </property>
+ <property name="text">
+ <string>Show Meta Information</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="compactBox">
+ <property name="toolTip">
+ <string>Make the download list more compact.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Make the download list more compact.</string>
+ </property>
+ <property name="text">
+ <string>Compact List</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_18">
+ <item>
+ <widget class="QGroupBox" name="ModlistGroupBox">
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_13">
+ <item>
+ <widget class="ColorTable" name="colorTable">
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="selectionMode">
+ <enum>QAbstractItemView::SingleSelection</enum>
+ </property>
+ <property name="selectionBehavior">
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ <property name="verticalScrollMode">
+ <enum>QAbstractItemView::ScrollPerPixel</enum>
+ </property>
+ <property name="cornerButtonEnabled">
+ <bool>false</bool>
+ </property>
+ <attribute name="horizontalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="horizontalHeaderStretchLastSection">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget_5" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <property name="leftMargin">
+ <number>0</number>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="resetColorsBtn">
- <property name="toolTip">
- <string>Reset all colors to their default value.</string>
+ <property name="topMargin">
+ <number>0</number>
</property>
- <property name="whatsThis">
- <string>Reset all colors to their default value.</string>
+ <property name="rightMargin">
+ <number>0</number>
</property>
- <property name="text">
- <string>Reset Colors</string>
+ <property name="bottomMargin">
+ <number>0</number>
</property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
+ <item>
+ <widget class="QPushButton" name="resetColorsBtn">
+ <property name="toolTip">
+ <string>Reset all colors to their default value.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Reset all colors to their default value.</string>
+ </property>
+ <property name="text">
+ <string>Reset Colors</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="1" column="1">
- <widget class="QGroupBox" name="groupBox_4">
- <property name="minimumSize">
+ <item>
+ <spacer name="verticalSpacer_13">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>0</width>
- <height>0</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
- <property name="title">
- <string>Mod List</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_17">
- <item>
- <widget class="QCheckBox" name="collapsibleSeparatorsBox">
- <property name="toolTip">
- <string>Allow collapsing separators when sorting by ascending priority.</string>
- </property>
- <property name="text">
- <string>Use collapsible separators</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="tristate">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="collapsibleSeparatorsConflictsBox">
- <property name="toolTip">
- <string>Display mod conflicts on separator when collapsed.</string>
- </property>
- <property name="whatsThis">
- <string>Display mod conflicts on separator when collapsed.</string>
- </property>
- <property name="text">
- <string>Show conflicts on separators</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_12">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
+ </spacer>
</item>
</layout>
</widget>
@@ -1520,25 +1559,6 @@ I don't yet know what the circumstances are, but user reports imply it is in som
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="displayForeignBox">
- <property name="toolTip">
- <string>Disable this to no longer display mods installed outside MO in the mod list (left pane). Assets from those mods will then be treated as having lowest mod priority together with the original game content.</string>
- </property>
- <property name="whatsThis">
- <string>By default Mod Organizer will display esp+bsa bundles installed with foreign tools as mods (left pane). This allows you to control their priority in relation to other mods. This is particularly useful if you also use Steam Workshop to install mods.
-However, if you installed loose file mods outside MO which conflict with BSAs also installed outside MO those conflicts can't be resolved correctly.
-
-If you disable this feature, MO will only display official DLCs this way. Please note that plugins (esps, esms, and esls) displayed in the right pane are completely unaffected by this feature.</string>
- </property>
- <property name="text">
- <string>Display mods installed outside MO</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QCheckBox" name="forceEnableBox">
<property name="toolTip">
@@ -1572,7 +1592,7 @@ Uncheck this if you want to use Mod Organizer with total conversions (like Nehri
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="2" column="1">
<widget class="QCheckBox" name="enableArchiveParsingBox">
<property name="toolTip">
<string>Enable parsing of Archives. This is an Experimental Feature. Has negative effects on performance and known incorrectness.</string>
@@ -1824,16 +1844,7 @@ programs you are intentionally running.</string>
<tabstop>tabWidget</tabstop>
<tabstop>languageBox</tabstop>
<tabstop>styleBox</tabstop>
- <tabstop>centerDialogs</tabstop>
- <tabstop>resetDialogsButton</tabstop>
- <tabstop>categoriesBtn</tabstop>
- <tabstop>showMetaBox</tabstop>
- <tabstop>compactBox</tabstop>
- <tabstop>checkForUpdates</tabstop>
<tabstop>usePrereleaseBox</tabstop>
- <tabstop>colorTable</tabstop>
- <tabstop>colorSeparatorsBox</tabstop>
- <tabstop>resetColorsBtn</tabstop>
<tabstop>baseDirEdit</tabstop>
<tabstop>browseBaseDirBtn</tabstop>
<tabstop>downloadDirEdit</tabstop>
@@ -1869,8 +1880,6 @@ programs you are intentionally running.</string>
<tabstop>hideUncheckedBox</tabstop>
<tabstop>forceEnableBox</tabstop>
<tabstop>lockGUIBox</tabstop>
- <tabstop>displayForeignBox</tabstop>
- <tabstop>enableArchiveParsingBox</tabstop>
<tabstop>bsaDateBtn</tabstop>
<tabstop>execBlacklistBtn</tabstop>
<tabstop>resetGeometryBtn</tabstop>
diff --git a/src/settingsdialoggeneral.cpp b/src/settingsdialoggeneral.cpp
index 7b854260..11294d2a 100644
--- a/src/settingsdialoggeneral.cpp
+++ b/src/settingsdialoggeneral.cpp
@@ -17,23 +17,11 @@ GeneralSettingsTab::GeneralSettingsTab(Settings& s, SettingsDialog& d)
addStyles();
selectStyle();
- ui->colorTable->load(s);
-
- // connect before setting to trigger
- QObject::connect(ui->collapsibleSeparatorsBox, &QCheckBox::stateChanged, [=](auto&& state) {
- ui->collapsibleSeparatorsConflictsBox->setEnabled(state == Qt::Checked);
- });
-
ui->centerDialogs->setChecked(settings().geometry().centerDialogs());
ui->changeGameConfirmation->setChecked(settings().interface().showChangeGameConfirmation());
ui->doubleClickPreviews->setChecked(settings().interface().doubleClicksOpenPreviews());
- ui->compactBox->setChecked(settings().interface().compactDownloads());
- ui->showMetaBox->setChecked(settings().interface().metaDownloads());
ui->checkForUpdates->setChecked(settings().checkForUpdates());
ui->usePrereleaseBox->setChecked(settings().usePrereleases());
- ui->colorSeparatorsBox->setChecked(settings().colors().colorSeparatorScrollbar());
- ui->collapsibleSeparatorsConflictsBox->setChecked(settings().interface().collapsibleSeparatorsConflicts());
- ui->collapsibleSeparatorsBox->setChecked(settings().interface().collapsibleSeparators());
QObject::connect(ui->exploreStyles, &QPushButton::clicked, [&]{ onExploreStyles(); });
@@ -41,9 +29,6 @@ GeneralSettingsTab::GeneralSettingsTab(Settings& s, SettingsDialog& d)
ui->categoriesBtn, &QPushButton::clicked, [&]{ onEditCategories(); });
QObject::connect(
- ui->resetColorsBtn, &QPushButton::clicked, [&]{ onResetColors(); });
-
- QObject::connect(
ui->resetDialogsButton, &QPushButton::clicked, [&]{ onResetDialogs(); });
}
@@ -67,18 +52,11 @@ void GeneralSettingsTab::update()
emit settings().styleChanged(newStyle);
}
- ui->colorTable->commitColors();
-
settings().geometry().setCenterDialogs(ui->centerDialogs->isChecked());
settings().interface().setShowChangeGameConfirmation(ui->changeGameConfirmation->isChecked());
settings().interface().setDoubleClicksOpenPreviews(ui->doubleClickPreviews->isChecked());
- settings().interface().setCompactDownloads(ui->compactBox->isChecked());
- settings().interface().setMetaDownloads(ui->showMetaBox->isChecked());
settings().setCheckForUpdates(ui->checkForUpdates->isChecked());
settings().setUsePrereleases(ui->usePrereleaseBox->isChecked());
- settings().colors().setColorSeparatorScrollbar(ui->colorSeparatorsBox->isChecked());
- settings().interface().setCollapsibleSeparators(ui->collapsibleSeparatorsBox->isChecked());
- settings().interface().setCollapsibleSeparatorsConflicts(ui->collapsibleSeparatorsConflictsBox->isChecked());
}
void GeneralSettingsTab::addLanguages()
@@ -204,11 +182,6 @@ void GeneralSettingsTab::onEditCategories()
}
}
-void GeneralSettingsTab::onResetColors()
-{
- ui->colorTable->resetColors();
-}
-
void GeneralSettingsTab::onResetDialogs()
{
const auto r = QMessageBox::question(
diff --git a/src/settingsdialoggeneral.h b/src/settingsdialoggeneral.h
index 455edcaf..51e0dc72 100644
--- a/src/settingsdialoggeneral.h
+++ b/src/settingsdialoggeneral.h
@@ -22,7 +22,6 @@ private:
void onExploreStyles();
void onEditCategories();
- void onResetColors();
void onResetDialogs();
};
diff --git a/src/settingsdialoguserinterface.cpp b/src/settingsdialoguserinterface.cpp
new file mode 100644
index 00000000..550b4ddd
--- /dev/null
+++ b/src/settingsdialoguserinterface.cpp
@@ -0,0 +1,53 @@
+#include "settingsdialoguserinterface.h"
+#include "ui_settingsdialog.h"
+#include "shared/appconfig.h"
+#include "categoriesdialog.h"
+#include "colortable.h"
+#include <utility.h>
+#include <questionboxmemory.h>
+
+using namespace MOBase;
+
+UserInterfaceSettingsTab::UserInterfaceSettingsTab(Settings& s, SettingsDialog& d)
+ : SettingsTab(s, d)
+{
+
+ // connect before setting to trigger
+ QObject::connect(ui->collapsibleSeparatorsBox, &QGroupBox::toggled, [=](auto&& on) {
+ ui->collapsibleSeparatorsConflictsBox->setEnabled(on);
+ });
+
+ // mod list
+ ui->displayForeignBox->setChecked(settings().interface().displayForeign());
+ ui->colorSeparatorsBox->setChecked(settings().colors().colorSeparatorScrollbar());
+ ui->collapsibleSeparatorsConflictsBox->setChecked(settings().interface().collapsibleSeparatorsConflicts());
+ ui->collapsibleSeparatorsBox->setChecked(settings().interface().collapsibleSeparators());
+ ui->saveFiltersBox->setChecked(settings().interface().saveFilters());
+
+ // download list
+ ui->compactBox->setChecked(settings().interface().compactDownloads());
+ ui->showMetaBox->setChecked(settings().interface().metaDownloads());
+
+ // colors
+ ui->colorTable->load(s);
+
+ QObject::connect(ui->resetColorsBtn, &QPushButton::clicked, [&] { ui->colorTable->resetColors(); });
+
+}
+
+void UserInterfaceSettingsTab::update()
+{
+ // mod list
+ settings().colors().setColorSeparatorScrollbar(ui->colorSeparatorsBox->isChecked());
+ settings().interface().setDisplayForeign(ui->displayForeignBox->isChecked());
+ settings().interface().setCollapsibleSeparators(ui->collapsibleSeparatorsBox->isChecked());
+ settings().interface().setCollapsibleSeparatorsConflicts(ui->collapsibleSeparatorsConflictsBox->isChecked());
+ settings().interface().setSaveFilters(ui->saveFiltersBox->isChecked());
+
+ // download list
+ settings().interface().setCompactDownloads(ui->compactBox->isChecked());
+ settings().interface().setMetaDownloads(ui->showMetaBox->isChecked());
+
+ // colors
+ ui->colorTable->commitColors();
+}
diff --git a/src/settingsdialoguserinterface.h b/src/settingsdialoguserinterface.h
new file mode 100644
index 00000000..8b4d48fa
--- /dev/null
+++ b/src/settingsdialoguserinterface.h
@@ -0,0 +1,15 @@
+#ifndef SETTINGSDIALOGUSERINTERFACE_H
+#define SETTINGSDIALOGUSERINTERFACE_H
+
+#include "settingsdialog.h"
+#include "settings.h"
+
+class UserInterfaceSettingsTab : public SettingsTab
+{
+public:
+ UserInterfaceSettingsTab(Settings& settings, SettingsDialog& dialog);
+
+ void update() override;
+};
+
+#endif // SETTINGSDIALOGGENERAL_H
diff --git a/src/settingsdialogworkarounds.cpp b/src/settingsdialogworkarounds.cpp
index 1c5fbe26..c050c722 100644
--- a/src/settingsdialogworkarounds.cpp
+++ b/src/settingsdialogworkarounds.cpp
@@ -24,7 +24,6 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d)
ui->hideUncheckedBox->setChecked(settings().game().hideUncheckedPlugins());
ui->forceEnableBox->setChecked(settings().game().forceEnableCoreFiles());
- ui->displayForeignBox->setChecked(settings().interface().displayForeign());
ui->lockGUIBox->setChecked(settings().interface().lockGUI());
ui->enableArchiveParsingBox->setChecked(settings().archiveParsing());
@@ -48,7 +47,6 @@ void WorkaroundsSettingsTab::update()
settings().game().setHideUncheckedPlugins(ui->hideUncheckedBox->isChecked());
settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked());
- settings().interface().setDisplayForeign(ui->displayForeignBox->isChecked());
settings().interface().setLockGUI(ui->lockGUIBox->isChecked());
settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked());
settings().setExecutablesBlacklist(m_ExecutableBlacklist);