@@ -145,14 +145,16 @@ SettingsDlg::SettingsDlg(MainWindow* mainwin,QWidget *parent) :
145145 auto autostart_update = [this ,mainwin,autostart_path]{
146146 if (ui->systray_minOnBoot ->isChecked ()){
147147 AutostartManager::saveDesktopFile (autostart_path,mainwin->GetExecutablePath (),
148- ui->systray_autostartViper ->isChecked ());
148+ ui->systray_autostartViper ->isChecked (),
149+ ui->systray_delay ->isChecked ());
149150 }
150151 else QFile (autostart_path).remove ();
151152 ui->systray_autostartViper ->setEnabled (ui->systray_minOnBoot ->isChecked ());
153+ ui->systray_delay ->setEnabled (ui->systray_minOnBoot ->isChecked ());
152154 };
153155 connect (ui->systray_minOnBoot ,&QPushButton::clicked,this ,autostart_update);
154156 connect (ui->systray_autostartViper ,&QPushButton::clicked,this ,autostart_update);
155-
157+ connect (ui-> systray_delay ,&QPushButton::clicked, this ,autostart_update);
156158
157159 auto change_theme_mode = [this ]{
158160 if (lockslot)return ;
@@ -425,10 +427,13 @@ void SettingsDlg::refreshAll(){
425427
426428 bool autostart_enabled = AutostartManager::inspectDesktopFile (autostart_path,AutostartManager::Exists);
427429 bool autostartviper_enabled = AutostartManager::inspectDesktopFile (autostart_path,AutostartManager::UsesViperAutostart);
430+ bool autostart_delayed = AutostartManager::inspectDesktopFile (autostart_path,AutostartManager::Delayed);
428431
429432 ui->systray_minOnBoot ->setChecked (autostart_enabled);
430433 ui->systray_autostartViper ->setEnabled (autostart_enabled);
431434 ui->systray_autostartViper ->setChecked (autostartviper_enabled);
435+ ui->systray_delay ->setEnabled (autostart_enabled);
436+ ui->systray_delay ->setChecked (autostart_delayed);
432437
433438 ui->deftab_favorite ->setChecked (!appconf->getConv_DefTab ());
434439 ui->deftab_filesys ->setChecked (appconf->getConv_DefTab ());
0 commit comments