Remove 'locale' from properties
Having the value stored here is somewhat pointless, so this is one step in fixing the locale handling. Locale should be handled by the modules themselves with their own loaded locale lookup information.
This commit is contained in:
@@ -90,7 +90,6 @@ struct obs_property {
|
||||
};
|
||||
|
||||
struct obs_properties {
|
||||
const char *locale;
|
||||
void *param;
|
||||
void (*destroy)(void *param);
|
||||
|
||||
@@ -98,12 +97,11 @@ struct obs_properties {
|
||||
struct obs_property **last;
|
||||
};
|
||||
|
||||
obs_properties_t obs_properties_create(const char *locale)
|
||||
obs_properties_t obs_properties_create(void)
|
||||
{
|
||||
struct obs_properties *props;
|
||||
props = bzalloc(sizeof(struct obs_properties));
|
||||
props->locale = locale;
|
||||
props->last = &props->first_property;
|
||||
props->last = &props->first_property;
|
||||
return props;
|
||||
}
|
||||
|
||||
@@ -125,10 +123,10 @@ void *obs_properties_get_param(obs_properties_t props)
|
||||
return props ? props->param : NULL;
|
||||
}
|
||||
|
||||
obs_properties_t obs_properties_create_param(const char *locale,
|
||||
void *param, void (*destroy)(void *param))
|
||||
obs_properties_t obs_properties_create_param(void *param,
|
||||
void (*destroy)(void *param))
|
||||
{
|
||||
struct obs_properties *props = obs_properties_create(locale);
|
||||
struct obs_properties *props = obs_properties_create();
|
||||
obs_properties_set_param(props, param, destroy);
|
||||
return props;
|
||||
}
|
||||
@@ -161,11 +159,6 @@ void obs_properties_destroy(obs_properties_t props)
|
||||
}
|
||||
}
|
||||
|
||||
const char *obs_properties_locale(obs_properties_t props)
|
||||
{
|
||||
return props ? props->locale : NULL;
|
||||
}
|
||||
|
||||
obs_property_t obs_properties_first(obs_properties_t props)
|
||||
{
|
||||
return (props != NULL) ? props->first_property : NULL;
|
||||
|
@@ -61,17 +61,15 @@ typedef struct obs_property *obs_property_t;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
EXPORT obs_properties_t obs_properties_create(const char *locale);
|
||||
EXPORT obs_properties_t obs_properties_create_param(const char *locale,
|
||||
void *param, void (*destroy)(void *param));
|
||||
EXPORT obs_properties_t obs_properties_create(void);
|
||||
EXPORT obs_properties_t obs_properties_create_param(void *param,
|
||||
void (*destroy)(void *param));
|
||||
EXPORT void obs_properties_destroy(obs_properties_t props);
|
||||
|
||||
EXPORT void obs_properties_set_param(obs_properties_t props,
|
||||
void *param, void (*destroy)(void *param));
|
||||
EXPORT void *obs_properties_get_param(obs_properties_t props);
|
||||
|
||||
EXPORT const char *obs_properties_locale(obs_properties_t props);
|
||||
|
||||
EXPORT obs_property_t obs_properties_first(obs_properties_t props);
|
||||
|
||||
EXPORT obs_property_t obs_properties_get(obs_properties_t props,
|
||||
|
Reference in New Issue
Block a user