UI: Make service settings use OK/Apply/Cancel

Currently service settings are updated in real time via the properties
view, which means that OK/Cancel/Apply have no effect.  This fixes that
by using the new type of properties view that operates only on settings
data, not an object.
This commit is contained in:
jp9000
2015-02-07 08:11:46 -08:00
parent 2ba5782fff
commit 69c6714090
4 changed files with 96 additions and 39 deletions
+12 -3
View File
@@ -326,6 +326,11 @@ bool OBSBasic::LoadService()
{
const char *type;
if (service) {
obs_service_destroy(service);
service = nullptr;
}
char serviceJsonPath[512];
int ret = os_get_config_path(serviceJsonPath, sizeof(serviceJsonPath),
SERVICE_PATH);
@@ -658,7 +663,6 @@ void OBSBasic::SaveProject()
if (ret <= 0)
return;
SaveService();
Save(savePath);
}
@@ -1330,6 +1334,13 @@ void OBSBasic::SetService(obs_service_t *newService)
}
}
bool OBSBasic::StreamingActive()
{
if (!outputHandler)
return false;
return outputHandler->StreamingActive();
}
#ifdef _WIN32
#define IS_WIN32 1
#else
@@ -2237,8 +2248,6 @@ void OBSBasic::on_streamButton_clicked()
if (outputHandler->StreamingActive()) {
outputHandler->StopStreaming();
} else {
SaveService();
if (outputHandler->StartStreaming(service)) {
ui->streamButton->setEnabled(false);
ui->streamButton->setText(