UI: Add Help menu action to show What's New dialog

This commit is contained in:
derrod 2023-03-14 21:35:48 +01:00 • committed by Jim
commit 09b6786f1a
4 changed files with 32 additions and 0 deletions

View file

@ -2176,6 +2176,11 @@ void OBSBasic::OBSInit()
}
#endif
#ifndef WHATSNEW_ENABLED
delete ui->actionShowWhatsNew;
ui->actionShowWhatsNew = nullptr;
#endif
UpdatePreviewProgramIndicators();
OnFirstLoad();
@ -7964,6 +7969,25 @@ void OBSBasic::on_actionDiscord_triggered()
QDesktopServices::openUrl(url);
}
void OBSBasic::on_actionShowWhatsNew_triggered()
{
#ifdef WHATSNEW_ENABLED
if (introCheckThread && introCheckThread->isRunning())
return;
if (!cef)
return;
config_set_int(App()->GlobalConfig(), "General", "InfoIncrement", -1);
WhatsNewInfoThread *wnit = new WhatsNewInfoThread();
connect(wnit, &WhatsNewInfoThread::Result, this,
&OBSBasic::ReceivedIntroJson, Qt::QueuedConnection);
introCheckThread.reset(wnit);
introCheckThread->start();
#endif
}
void OBSBasic::on_actionShowSettingsFolder_triggered()
{
char path[512];