Merge pull request #124 from jp9000/new-locale-handling

Update to new module locale API
This commit is contained in:
Jim
2014-06-25 12:58:05 -07:00
46 changed files with 210 additions and 208 deletions

View File

@@ -210,7 +210,7 @@ static inline bool HasAudioDevices(const char *source_id)
{
const char *output_id = source_id;
obs_properties_t props = obs_get_source_properties(
OBS_SOURCE_TYPE_INPUT, output_id, App()->GetLocale());
OBS_SOURCE_TYPE_INPUT, output_id);
size_t count = 0;
if (!props)
@@ -468,7 +468,7 @@ void OBSBasic::OBSInit()
show();
App()->processEvents();
if (!obs_startup())
if (!obs_startup(App()->GetLocale()))
throw "Failed to initialize libobs";
if (!InitBasicConfig())
throw "Failed to load basic.ini";
@@ -1299,8 +1299,7 @@ void OBSBasic::AddSourcePopupMenu(const QPoint &pos)
QMenu popup;
while (obs_enum_input_types(idx++, &type)) {
const char *name = obs_source_getdisplayname(
OBS_SOURCE_TYPE_INPUT,
type, App()->GetLocale());
OBS_SOURCE_TYPE_INPUT, type);
if (strcmp(type, "scene") == 0)
continue;

View File

@@ -44,8 +44,8 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
obs_data_release(settings);
view = new OBSPropertiesView(settings,
obs_source_properties(source, App()->GetLocale()),
source, (PropertiesUpdateCallback)obs_source_update);
obs_source_properties(source), source,
(PropertiesUpdateCallback)obs_source_update);
layout()->addWidget(view);
layout()->setAlignment(view, Qt::AlignBottom);

View File

@@ -212,8 +212,7 @@ void OBSBasicSettings::LoadServiceTypes()
size_t idx = 0;
while (obs_enum_service_types(idx++, &type)) {
const char *name = obs_service_getdisplayname(type,
App()->GetLocale());
const char *name = obs_service_getdisplayname(type);
QString qName = QT_UTF8(name);
QString qType = QT_UTF8(type);
@@ -229,8 +228,7 @@ void OBSBasicSettings::LoadServiceInfo()
QLayout *layout = ui->streamContainer->layout();
obs_service_t service = main->GetService();
obs_data_t settings = obs_service_get_settings(service);
obs_properties_t properties = obs_service_properties(service,
App()->GetLocale());
obs_properties_t properties = obs_service_properties(service);
delete streamProperties;
streamProperties = new OBSPropertiesView(
@@ -480,9 +478,9 @@ void OBSBasicSettings::LoadAudioDevices()
const char *output_id = App()->OutputAudioSource();
obs_properties_t input_props = obs_get_source_properties(
OBS_SOURCE_TYPE_INPUT, input_id, App()->GetLocale());
OBS_SOURCE_TYPE_INPUT, input_id);
obs_properties_t output_props = obs_get_source_properties(
OBS_SOURCE_TYPE_INPUT, output_id, App()->GetLocale());
OBS_SOURCE_TYPE_INPUT, output_id);
if (input_props) {
obs_property_t inputs = obs_properties_get(input_props,

View File

@@ -169,8 +169,7 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *type_)
ui->setupUi(this);
QString placeHolderText{QT_UTF8(obs_source_getdisplayname(
OBS_SOURCE_TYPE_INPUT,
type_, App()->GetLocale()))};
OBS_SOURCE_TYPE_INPUT, type_))};
QString text{placeHolderText};
int i = 1;