提交 989e7340 编写于 作者: J jp9000

made a few more settings UI tweaks

上级 3b871a00
......@@ -171,10 +171,10 @@ bool OBSApp::InitLocale()
string path;
if (GetDataFilePath(file.str().c_str(), path)) {
if (!text_lookup_add(textLookup, path.c_str()))
blog(LOG_WARNING, "Failed to add '%s' locale file",
blog(LOG_WARNING, "Failed to add locale file '%s'",
path.c_str());
} else {
blog(LOG_WARNING, "Could not find '%s' locale file",
blog(LOG_WARNING, "Could not find locale file '%s'",
file.str().c_str());
}
......
......@@ -112,11 +112,14 @@ void BasicGenData::Apply()
return;
LanguageInfo *info = static_cast<LanguageInfo*>(
window->languageList->GetClientData(sel));
window->languageList->GetClientObject(sel));
config_set_string(GetGlobalConfig(), "General", "Language", info->tag);
config_save(GetGlobalConfig());
window->generalChangedText->Hide();
dataChanged = false;
}
BasicSettingsData *CreateBasicGeneralSettings(OBSBasicSettings *window)
......
......@@ -398,7 +398,9 @@ void BasicVideoData::Apply()
SaveOther();
SaveFPSData();
window->videoChangedText->Hide();
config_save(GetGlobalConfig());
dataChanged = false;
}
BasicSettingsData *CreateBasicVideoSettings(OBSBasicSettings *window)
......
......@@ -81,7 +81,7 @@ void OBSBasicSettings::OnClose(wxCloseEvent &event)
void OBSBasicSettings::OKClicked(wxCommandEvent &event)
{
if (settings)
if (settings && settings->DataChanged())
settings->Apply();
EndModal(0);
......@@ -94,6 +94,6 @@ void OBSBasicSettings::CancelClicked(wxCommandEvent &event)
void OBSBasicSettings::ApplyClicked(wxCommandEvent &event)
{
if (settings)
if (settings && settings->DataChanged())
settings->Apply();
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册