Changeset 61a056a7eb4b1190384432f31ba63d102e8d0230

Show
Ignore:
Timestamp:
03/20/08 21:20:36 (6 months ago)
Author:
André Weber <atmo@videolan.org>
git-committer:
André Weber <atmo@videolan.org> 1206044436 +0100
git-parent:

[bd2b3483d842cb04398d19a5d9b31ceca0e5c26e]

git-author:
André Weber <atmo@videolan.org> 1206044268 +0100
Message:

Fix the handling of string variable - store them as UTF-8 into the config variables, also convert the StringList? values to an UTF8 string before putting them into a QVariant - which seems not to work if created from a "char *" - because later converterd QVariant->toString() isn't UTF8 like expected.
waveout.c forgott to convert string to UTF8 before storing in choice list

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/audio_output/waveout.c

    reb6f43e r61a056a  
    11941194           == MMSYSERR_NOERROR) 
    11951195        { 
    1196           sprintf(sz_dev_name,psz_device_name_fmt,caps.szPname, 
     1196          sprintf( sz_dev_name, psz_device_name_fmt, caps.szPname, 
    11971197                                               caps.wMid, 
    11981198                                               caps.wPid 
    11991199                                              ); 
    1200           p_item->ppsz_list[j] = strdup( sz_dev_name ); 
     1200          p_item->ppsz_list[j] = FromLocaleDup( sz_dev_name ); 
    12011201          p_item->ppsz_list_text[j] = FromLocaleDup( sz_dev_name ); 
    12021202          p_item->i_list++; 
     
    12331233           == MMSYSERR_NOERROR) 
    12341234        { 
    1235             sprintf(sz_dev_name,psz_device_name_fmt,caps.szPname, 
     1235            sprintf(sz_dev_name, psz_device_name_fmt, caps.szPname, 
    12361236                                               caps.wMid, 
    12371237                                               caps.wPid 
    12381238                                              ); 
    1239             if(!stricmp(sz_dev_name,psz_device_name)) 
    1240                return i; 
     1239            char *psz_temp = FromLocaleDup(sz_dev_name); 
     1240 
     1241            if( !stricmp(psz_temp, psz_device_name) ) 
     1242            { 
     1243                LocaleFree( psz_temp ); 
     1244                return i; 
     1245            } 
     1246            LocaleFree( psz_temp ); 
    12411247        } 
    12421248    } 
  • modules/gui/qt4/components/preferences_widgets.cpp

    r3b4b75a r61a056a  
    185185                            qobject_cast<VStringConfigControl *>(this); 
    186186            assert( vscc ); 
    187             config_PutPsz( p_intf, vscc->getName(), qta( vscc->getValue() ) ); 
     187            config_PutPsz( p_intf, vscc->getName(), qtu( vscc->getValue() ) ); 
    188188            break; 
    189189        } 
     
    382382       p_module_config->pf_update_list(p_this, p_item->psz_name, val, val, NULL); 
    383383 
    384        // assume in a×y case that dirty was set to VLC_TRUE 
     384       // assume in any case that dirty was set to VLC_TRUE 
    385385       // because lazy programmes will use the same callback for 
    386386       // this, like the one behind the refresh push button? 
     
    467467                            p_module_config->ppsz_list_text[i_index] : 
    468468                            p_module_config->ppsz_list[i_index] ), 
    469                         QVariant( p_module_config->ppsz_list[i_index] ) ); 
     469                   QVariant( qfu(p_module_config->ppsz_list[i_index] )) ); 
    470470        if( p_item->value.psz && !strcmp( p_module_config->value.psz, 
    471471                                          p_module_config->ppsz_list[i_index] ) )