UI: Do one time reset of dock lock state for v23

In order to make for a better user experience with service integration,
do a one-time reset of the docks locked state, and set the default lock
state to off.
This commit is contained in:
jp9000 2019-02-09 00:43:05 -08:00
parent 8fb36700b2
commit 5d05ab6df6

View file

@ -1688,8 +1688,19 @@ void OBSBasic::OBSInit()
on_resetUI_triggered();
}
config_set_default_bool(App()->GlobalConfig(), "BasicWindow",
"DocksLocked", false);
bool pre23Defaults = config_get_bool(App()->GlobalConfig(),
"General", "Pre23Defaults");
if (pre23Defaults) {
bool resetDockLock23 = config_get_bool(App()->GlobalConfig(),
"General", "ResetDockLock23");
if (!resetDockLock23) {
config_set_bool(App()->GlobalConfig(),
"General", "ResetDockLock23", true);
config_remove_value(App()->GlobalConfig(),
"BasicWindow", "DocksLocked");
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
}
}
bool docksLocked = config_get_bool(App()->GlobalConfig(),
"BasicWindow", "DocksLocked");