|
26 | 26 | #include "interface/fragment/StatusFragment.h" |
27 | 27 | #include "interface/QMessageOverlay.h" |
28 | 28 | #include "interface/TrayIcon.h" |
| 29 | +#include "utils/AutoStartManager.h" |
29 | 30 | #include "utils/Common.h" |
30 | 31 | #include "utils/dbus/ClientProxy.h" |
31 | 32 | #include "utils/dbus/IpcHandler.h" |
@@ -96,11 +97,12 @@ MainWindow::MainWindow(bool statupInTray, |
96 | 97 | _eelEditor = new EELEditor(this); |
97 | 98 | _trayIcon = new TrayIcon(this); |
98 | 99 | _ipcHandler = new IpcHandler(_audioService, this); |
| 100 | + _autostart = new AutostartManager(this); |
99 | 101 |
|
100 | 102 | _appMgrFragment = new FragmentHost<AppManagerFragment*>(new AppManagerFragment(_audioService->appManager(), this), WAF::BottomSide, this); |
101 | 103 | _statusFragment = new FragmentHost<StatusFragment*>(new StatusFragment(this), WAF::BottomSide, this); |
102 | 104 | _presetFragment = new FragmentHost<PresetFragment*>(new PresetFragment(_audioService, this), WAF::LeftSide, this); |
103 | | - _settingsFragment = new FragmentHost<SettingsFragment*>(new SettingsFragment(_trayIcon, _audioService, this), WAF::BottomSide, this); |
| 105 | + _settingsFragment = new FragmentHost<SettingsFragment*>(new SettingsFragment(_trayIcon, _audioService, _autostart, this), WAF::BottomSide, this); |
104 | 106 | } |
105 | 107 |
|
106 | 108 | // Prepare base UI |
@@ -322,6 +324,7 @@ MainWindow::MainWindow(bool statupInTray, |
322 | 324 | if (AppConfig::instance().get<bool>(AppConfig::LiveprogAutoExtract)) |
323 | 325 | { |
324 | 326 | AssetManager::instance().extractAll(); |
| 327 | + |
325 | 328 | } |
326 | 329 | } |
327 | 330 |
|
@@ -358,6 +361,7 @@ MainWindow::MainWindow(bool statupInTray, |
358 | 361 |
|
359 | 362 | // Liveprog |
360 | 363 | ui->liveprog->coupleIDE(_eelEditor); |
| 364 | + ui->liveprog->updateList(); |
361 | 365 | connect(ui->liveprog, &LiveprogSelectionWidget::liveprogReloadRequested, _audioService, &IAudioService::reloadLiveprog); |
362 | 366 | connect(ui->liveprog, &LiveprogSelectionWidget::unitLabelUpdateRequested, ui->info, qOverload<const QString&>(&FadingLabel::setAnimatedText)); |
363 | 367 | } |
@@ -432,6 +436,16 @@ MainWindow::~MainWindow() |
432 | 436 | } |
433 | 437 |
|
434 | 438 | // Overrides |
| 439 | +void MainWindow::showEvent(QShowEvent *event) |
| 440 | +{ |
| 441 | + if(_firstShowEvent) { |
| 442 | + _firstShowEvent = false; |
| 443 | + // Deferred auto-start setup re-check |
| 444 | + _autostart->setup(); |
| 445 | + } |
| 446 | + QMainWindow::showEvent(event); |
| 447 | +} |
| 448 | + |
435 | 449 | void MainWindow::closeEvent(QCloseEvent *event) |
436 | 450 | { |
437 | 451 | AppConfig::instance().setBytes(AppConfig::LastWindowGeometry, saveGeometry()); |
@@ -667,7 +681,7 @@ void MainWindow::loadConfig() |
667 | 681 | ui->eqfiltertype->setCurrentIndex(DspConfig::instance().get<int>(DspConfig::tone_filtertype)); |
668 | 682 |
|
669 | 683 | // Parse EQ String to QMap |
670 | | - QString rawEqString = chopFirstLastChar(DspConfig::instance().get<QString>(DspConfig::tone_eq)); |
| 684 | + QString rawEqString = chopDoubleQuotes(DspConfig::instance().get<QString>(DspConfig::tone_eq)); |
671 | 685 | bool isOldFormat = rawEqString.split(";").count() == 15; |
672 | 686 |
|
673 | 687 | if (isOldFormat) |
@@ -1266,7 +1280,7 @@ void MainWindow::launchFirstRunSetup() |
1266 | 1280 | { |
1267 | 1281 | QHBoxLayout *lbLayout = new QHBoxLayout; |
1268 | 1282 | QMessageOverlay *lightBox = new QMessageOverlay(this); |
1269 | | - FirstLaunchWizard *wiz = new FirstLaunchWizard(lightBox); |
| 1283 | + FirstLaunchWizard *wiz = new FirstLaunchWizard(_autostart, lightBox); |
1270 | 1284 | QGraphicsOpacityEffect *eff = new QGraphicsOpacityEffect(lightBox); |
1271 | 1285 | QPropertyAnimation *a = new QPropertyAnimation(eff, "opacity"); |
1272 | 1286 |
|
|
0 commit comments