From 20acd250c5c5b787e7a7226759752c5905eef13d Mon Sep 17 00:00:00 2001 From: albeu Date: Tue, 12 Nov 2002 12:39:05 +0000 Subject: Fix the Gui with NEW_CONFIG git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8169 b3059339-0415-0410-9bf9-f77b7e298cf2 --- m_option.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'm_option.c') diff --git a/m_option.c b/m_option.c index a5824895ee..dda0cfba37 100644 --- a/m_option.c +++ b/m_option.c @@ -315,7 +315,7 @@ static int parse_str(m_option_t* opt,char *name, char *param, void* dst, int src } static char* print_str(m_option_t* opt, void* val) { - return (val && VAL(val) && strlen(VAL(val)) > 0) ? strdup(VAL(val)) : strdup("(empty)"); + return (val && VAL(val) && strlen(VAL(val)) > 0) ? strdup(VAL(val)) : NULL; } static void copy_str(m_option_t* opt,void* dst, void* src) { @@ -559,7 +559,23 @@ static void copy_str_list(m_option_t* opt,void* dst, void* src) { } static char* print_str_list(m_option_t* opt, void* src) { - return strdup("TODO ;)"); + char **lst = NULL; + char *ret = NULL,*last = NULL; + int i; + + if(!(src && VAL(src))) return NULL; + lst = VAL(src); + + for(i = 0 ; lst[i] ; i++) { + if(last) { + ret = dup_printf("%s,%s",last,lst[i]); + free(last); + } else + ret = strdup(lst[i]); + last = ret; + } + if(last && last != ret) free(last); + return ret; } m_option_type_t m_option_type_string_list = { -- cgit v1.2.3