diff --git a/include/settingswindow.h b/include/settingswindow.h index 1679e32..f5385e3 100644 --- a/include/settingswindow.h +++ b/include/settingswindow.h @@ -14,7 +14,7 @@ struct ProfileSettings; class SettingsWindow : public QDialog { public: - SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidget* parent = nullptr); + SettingsWindow(int defaultTab, LauncherWindow& window, LauncherCore& core, QWidget* parent = nullptr); public slots: void reloadControls(); diff --git a/src/launcherwindow.cpp b/src/launcherwindow.cpp index 1044f59..f5b9551 100644 --- a/src/launcherwindow.cpp +++ b/src/launcherwindow.cpp @@ -50,12 +50,22 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo QAction* settingsAction = fileMenu->addAction("Configure Astra..."); settingsAction->setIcon(QIcon::fromTheme("settings")); connect(settingsAction, &QAction::triggered, [=] { - auto window = new SettingsWindow(*this, this->core, this); + auto window = new SettingsWindow(0, *this, this->core, this); + connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls); + window->show(); + }); + + QAction* profilesAction = fileMenu->addAction("Configure Profiles..."); + profilesAction->setIcon(QIcon::fromTheme("settings")); + connect(profilesAction, &QAction::triggered, [=] { + auto window = new SettingsWindow(1, *this, this->core, this); connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls); window->show(); }); #if defined(Q_OS_MAC) || defined(Q_OS_LINUX) + fileMenu->addSeparator(); + QAction* wineCfg = fileMenu->addAction("Configure Wine..."); wineCfg->setIcon(QIcon::fromTheme("settings")); connect(wineCfg, &QAction::triggered, [=] { diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index f7e8285..a676445 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -16,7 +16,7 @@ #include "launcherwindow.h" #include "gamescopesettingswindow.h" -SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidget* parent) : core(core), window(window), QDialog(parent) { +SettingsWindow::SettingsWindow(int defaultTab, LauncherWindow& window, LauncherCore& core, QWidget* parent) : core(core), window(window), QDialog(parent) { setWindowTitle("Settings"); setWindowModality(Qt::WindowModality::ApplicationModal); @@ -377,6 +377,8 @@ SettingsWindow::SettingsWindow(LauncherWindow& window, LauncherCore& core, QWidg dalamudBoxLayout->addRow("Dalamud Asset Version", dalamudAssetVersionLabel); } + tabWidget->setCurrentIndex(defaultTab); + reloadControls(); }