Commit 05f7d6b6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

config: remove useless config_GetPszChoices() parameter

parent 75781357
......@@ -243,7 +243,7 @@ VLC_API ssize_t config_GetIntChoices(const char *, int64_t **values,
* descriptions and on both tables.
* In case of error, both pointers are set to NULL.
*/
VLC_API ssize_t config_GetPszChoices(vlc_object_t *, const char *,
VLC_API ssize_t config_GetPszChoices(const char *,
char ***, char ***) VLC_USED;
VLC_API int config_SaveConfigFile( vlc_object_t * );
......
......@@ -194,8 +194,7 @@ libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
libvlc_audio_output_device_t *list = NULL, **pp = &list;
char **values, **texts;
ssize_t count = config_GetPszChoices( VLC_OBJECT(p_instance->p_libvlc_int),
varname, &values, &texts );
ssize_t count = config_GetPszChoices( varname, &values, &texts );
for( ssize_t i = 0; i < count; i++ )
{
libvlc_audio_output_device_t *item = malloc( sizeof(*item) );
......
......@@ -416,8 +416,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
assert(p_item);
char **values, **texts;
ssize_t count = config_GetPszChoices(VLC_OBJECT(getIntf()), name,
&values, &texts);
ssize_t count = config_GetPszChoices(name, &values, &texts);
if (count < 0) {
msg_Err(p_intf, "Cannot get choices for %s", name);
return;
......
......@@ -1058,7 +1058,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
char *psz_value = config_GetPsz(self.p_item->psz_name);
char **values, **texts;
ssize_t count = config_GetPszChoices(VLC_OBJECT(getIntf()), self.p_item->psz_name,
ssize_t count = config_GetPszChoices(self.p_item->psz_name,
&values, &texts);
for (ssize_t i = 0; i < count && texts; i++) {
if (texts[i] == NULL || values[i] == NULL)
......
......@@ -411,8 +411,7 @@ void ExtVideo::initComboBoxItems( QObject *widget )
{
char **values;
char **texts;
ssize_t count = config_GetPszChoices( VLC_OBJECT( p_intf ),
qtu( option ), &values, &texts );
ssize_t count = config_GetPszChoices( qtu( option ), &values, &texts );
for( ssize_t i = 0; i < count; i++ )
{
combobox->addItem( qtr( texts[i] ), qfu(values[i]) );
......
......@@ -434,8 +434,7 @@ void StringListConfigControl::finish(module_config_t *p_module_config )
if(!p_module_config) return;
char **values, **texts;
ssize_t count = config_GetPszChoices( p_this, p_item->psz_name,
&values, &texts );
ssize_t count = config_GetPszChoices( p_item->psz_name, &values, &texts );
for( ssize_t i = 0; i < count && texts; i++ )
{
if( texts[i] == NULL || values[i] == NULL )
......@@ -476,8 +475,7 @@ void setfillVLCConfigCombo( const char *configname, intf_thread_t *p_intf,
if( (p_config->i_type & 0xF0) == CONFIG_ITEM_STRING )
{
char **values, **texts;
ssize_t count = config_GetPszChoices(VLC_OBJECT(p_intf),
configname, &values, &texts);
ssize_t count = config_GetPszChoices(configname, &values, &texts);
for( ssize_t i = 0; i < count; i++ )
{
combo->addItem( qtr(texts[i]), QVariant(qfu(values[i])) );
......
......@@ -284,8 +284,8 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values,
return n + 2;
}
ssize_t config_GetPszChoices (vlc_object_t *obj, const char *name,
char ***restrict values, char ***restrict texts)
ssize_t config_GetPszChoices(const char *name,
char ***restrict values, char ***restrict texts)
{
*values = *texts = NULL;
......@@ -312,7 +312,7 @@ ssize_t config_GetPszChoices (vlc_object_t *obj, const char *name,
size_t count = cfg->list_count;
if (count == 0)
{
if (module_Map(obj, cfg->owner))
if (module_Map(NULL, cfg->owner))
{
errno = EIO;
return -1;
......
......@@ -345,7 +345,7 @@ static int vlc_swidth(const char *str)
}
}
static void print_item(const vlc_object_t *p_this, const module_t *m, const module_config_t *item,
static void print_item(const module_t *m, const module_config_t *item,
const module_config_t **section, bool color, bool desc)
{
#ifndef _WIN32
......@@ -384,7 +384,7 @@ static void print_item(const vlc_object_t *p_this, const module_t *m, const modu
char **ppsz_values, **ppsz_texts;
ssize_t i_count = config_GetPszChoices(VLC_OBJECT(p_this), item->psz_name, &ppsz_values, &ppsz_texts);
ssize_t i_count = config_GetPszChoices(item->psz_name, &ppsz_values, &ppsz_texts);
if (i_count > 0)
{
......@@ -642,7 +642,7 @@ static void Usage (vlc_object_t *p_this, char const *psz_search)
b_has_advanced = true;
continue;
}
print_item(p_this, m, item, &section, color, desc);
print_item(m, item, &section, color, desc);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment