diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-20 16:56:40 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-06-09 22:08:03 +0200 |
| commit | af723f42979f715a9c44a35114f6f1990208cde0 (patch) | |
| tree | 2fc65437dee50b365099687bc5a157bb216dfd3f /src/mainwindow.cpp | |
| parent | da66cb4917c31d574ab3f6c37d21644c1b6bf78f (diff) | |
Hide plugins and archives tabs when features are missing.
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9777091a..0d2597c7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -184,6 +184,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <sstream> #include <utility> +#include "gameplugins.h" + #ifdef TEST_MODELS #include "modeltest.h" #endif // TEST_MODELS @@ -363,6 +365,15 @@ MainWindow::MainWindow(Settings &settings m_DataTab.get(), &DataTab::displayModInformation, [&](auto&& m, auto&& i, auto&& tab){ displayModInformation(m, i, tab); }); + // Hide stuff we do not need: + IPluginGame const* game = m_OrganizerCore.managedGame(); + if (!game->feature<GamePlugins>()) { + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->espTab)); + } + if (!game->feature<DataArchives>()) { + ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->bsaTab)); + } + settings.geometry().restoreState(ui->downloadView->header()); ui->splitter->setStretchFactor(0, 3); @@ -526,6 +537,7 @@ MainWindow::MainWindow(Settings &settings updatePluginCount(); updateModCount(); processUpdates(); + ui->statusBar->updateNormalMessage(m_OrganizerCore); } |
