Display message on first boot

This commit is contained in:
WarmUpTill
2022-01-05 01:24:40 +01:00
committed by WarmUpTill
parent 82c20b871b
commit 2d61189655
6 changed files with 14 additions and 0 deletions

View File

@@ -677,6 +677,8 @@ AdvSceneSwitcher.status.inactive="Inactive"
AdvSceneSwitcher.running="Plugin running"
AdvSceneSwitcher.stopped="Plugin stopped"
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>This seems to be the first time the Advanced Scene Switcher was installed.<br>Please have a look at the <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> for a list of guides and examples.<br>Do not hesitate to ask questions in the plugin's <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">thread</span></a> on the OBS forums!</p></body></html>"
AdvSceneSwitcher.unit.milliseconds="milliseconds"
AdvSceneSwitcher.unit.secends="seconds"
AdvSceneSwitcher.unit.minutes="minutes"

View File

@@ -87,6 +87,7 @@ void AdvSceneSwitcher::loadUI()
setTabOrder();
restoreWindowGeo();
checkFirstTimeSetup();
loading = false;
}

View File

@@ -444,6 +444,14 @@ void AdvSceneSwitcher::restoreWindowGeo()
}
}
void AdvSceneSwitcher::checkFirstTimeSetup()
{
if (switcher->firstBoot && !switcher->disableHints) {
DisplayMessage(
obs_module_text("AdvSceneSwitcher.firstBootMessage"));
}
}
void AdvSceneSwitcher::on_tabMoved(int from, int to)
{
if (loading) {

View File

@@ -83,6 +83,7 @@ public:
void setupMacroTab();
void setTabOrder();
void restoreWindowGeo();
void checkFirstTimeSetup();
signals:
void MacroAdded(const QString &name);

View File

@@ -77,6 +77,7 @@ struct SwitcherData {
SwitcherThread *th = nullptr;
bool settingsWindowOpened = false;
bool firstBoot = true;
std::condition_variable cv;
std::mutex m;

View File

@@ -123,6 +123,7 @@ bool SwitcherData::versionChanged(obs_data_t *obj, std::string currentVersion)
if (!obs_data_has_user_value(obj, "version")) {
return false;
}
switcher->firstBoot = false;
std::string previousVersion = obs_data_get_string(obj, "version");
return previousVersion != currentVersion;
}