Commit 97c839d1 authored by Marian Durkovic's avatar Marian Durkovic

Backport [17985]

parent 7d6f7e19
......@@ -392,7 +392,7 @@ void DialogsProvider::OnOpenFileGeneric( wxCommandEvent& event )
sizeof(char *) );
for( size_t i = 0; i < paths.GetCount(); i++ )
{
p_arg->psz_results[i] = strdup( paths[i].mb_str() );
p_arg->psz_results[i] = strdup( paths[i].mb_str(wxConvUTF8) );
}
}
......
......@@ -120,9 +120,9 @@ void BookmarkEditDialog::OnOK( wxCommandEvent &event )
{
if( p_seekpoint->psz_name ) free( p_seekpoint->psz_name );
p_seekpoint->psz_name = strdup( name_text->GetValue().mb_str(wxConvUTF8) );
p_seekpoint->i_byte_offset = atoi( bytes_text->GetValue().mb_str() );
p_seekpoint->i_byte_offset = atoi( bytes_text->GetValue().mb_str(wxConvUTF8) );
p_seekpoint->i_time_offset = 1000000 *
atoll( time_text->GetValue().mb_str() ) ;
atoll( time_text->GetValue().mb_str(wxConvUTF8) ) ;
EndModal( wxID_OK );
}
......
......@@ -146,12 +146,12 @@ void MetaDataPanel::Update( input_item_t *p_item )
char* MetaDataPanel::GetURI( )
{
return strdup( uri_text->GetLineText(0).mb_str() );
return strdup( uri_text->GetLineText(0).mb_str(wxConvUTF8) );
}
char* MetaDataPanel::GetName( )
{
return strdup( name_text->GetLineText(0).mb_str() );
return strdup( name_text->GetLineText(0).mb_str(wxConvUTF8) );
}
void MetaDataPanel::Clear()
......
......@@ -270,7 +270,7 @@ void InteractionDialog::Finish( int i_ret )
while ( it < input_widgets.end() )
{
if( (*it).i_type == WIDGET_INPUT_TEXT )
(*it).val->psz_string = strdup( (*it).control->GetValue().mb_str());
(*it).val->psz_string = strdup( (*it).control->GetValue().mb_str(wxConvUTF8));
it++;
}
Hide();
......
......@@ -1128,7 +1128,7 @@ void OpenDialog::UpdateMRL( int i_access_method )
}
else
{
int i_value = config_GetInt( p_intf, caching_name.mb_str() );
int i_value = config_GetInt( p_intf, caching_name.mb_str(wxConvUTF8) );
caching_value->SetValue( i_value );
}
}
......
......@@ -1069,20 +1069,20 @@ void PrefsPanel::ApplyChanges()
case CONFIG_ITEM_MODULE_CAT:
case CONFIG_ITEM_MODULE_LIST:
case CONFIG_ITEM_MODULE_LIST_CAT:
config_PutPsz( p_intf, control->GetName().mb_str(),
config_PutPsz( p_intf, control->GetName().mb_str(wxConvUTF8),
control->GetPszValue().mb_str(wxConvUTF8) );
break;
case CONFIG_ITEM_KEY:
/* So you don't need to restart to have the changes take effect */
val.i_int = control->GetIntValue();
var_Set( p_intf->p_vlc, control->GetName().mb_str(), val );
var_Set( p_intf->p_vlc, control->GetName().mb_str(wxConvUTF8), val );
case CONFIG_ITEM_INTEGER:
case CONFIG_ITEM_BOOL:
config_PutInt( p_intf, control->GetName().mb_str(),
config_PutInt( p_intf, control->GetName().mb_str(wxConvUTF8),
control->GetIntValue() );
break;
case CONFIG_ITEM_FLOAT:
config_PutFloat( p_intf, control->GetName().mb_str(),
config_PutFloat( p_intf, control->GetName().mb_str(wxConvUTF8),
control->GetFloatValue() );
break;
}
......
......@@ -634,15 +634,15 @@ void StringListConfigControl::OnAction( wxCommandEvent& event )
{
int i_action = event.GetId() - wxID_HIGHEST;
module_config_t *p_item = config_FindConfig( p_this, GetName().mb_str() );
module_config_t *p_item = config_FindConfig( p_this, GetName().mb_str(wxConvUTF8) );
if( !p_item ) return;
if( i_action < 0 || i_action >= p_item->i_action ) return;
vlc_value_t val;
wxString value = GetPszValue();
*((const char **)&val.psz_string) = value.mb_str();
p_item->ppf_action[i_action]( p_this, GetName().mb_str(), val, val, 0 );
*((const char **)&val.psz_string) = value.mb_str(wxConvUTF8);
p_item->ppf_action[i_action]( p_this, GetName().mb_str(wxConvUTF8), val, val, 0 );
if( p_item->b_dirty )
{
......@@ -851,14 +851,14 @@ void IntegerListConfigControl::OnAction( wxCommandEvent& event )
int i_action = event.GetId() - wxID_HIGHEST;
module_config_t *p_item;
p_item = config_FindConfig( p_this, GetName().mb_str() );
p_item = config_FindConfig( p_this, GetName().mb_str(wxConvUTF8) );
if( !p_item ) return;
if( i_action < 0 || i_action >= p_item->i_action ) return;
vlc_value_t val;
val.i_int = GetIntValue();
p_item->ppf_action[i_action]( p_this, GetName().mb_str(), val, val, 0 );
p_item->ppf_action[i_action]( p_this, GetName().mb_str(wxConvUTF8), val, val, 0 );
if( p_item->b_dirty )
{
......
......@@ -200,7 +200,7 @@ void UpdateVLC::OnChooseItem( wxListEvent& event )
wxSAVE | wxOVERWRITE_PROMPT );
if( filedialog->ShowModal() == wxID_OK )
{
update_download( p_uit, filedialog->GetPath().mb_str() );
update_download( p_uit, filedialog->GetPath().mb_str(wxConvUTF8) );
}
update_iterator_Delete( p_uit );
delete filedialog;
......
......@@ -747,8 +747,8 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event)
}
if( enable_checkbox->IsChecked() )
{
int i_from = atoi( from_text->GetValue().mb_str() );
int i_to = atoi( to_text->GetValue().mb_str() );
int i_from = atoi( from_text->GetValue().mb_str(wxConvUTF8) );
int i_to = atoi( to_text->GetValue().mb_str(wxConvUTF8) );
p_parent->SetPartial( i_from, i_to );
}
return;
......@@ -992,12 +992,12 @@ void wizTranscodeCodecPage::OnWizardPageChanging(wxWizardEvent& event)
audio_combo->GetSelection() : i_audio_codec ));
acodec = strdup(c->psz_codec);
int vb = atoi(vb_combo->GetValue().mb_str() );
int vb = atoi(vb_combo->GetValue().mb_str(wxConvUTF8) );
if( vb == 0 )
{
vb = 1024;
}
int ab = atoi(ab_combo->GetValue().mb_str() );
int ab = atoi(ab_combo->GetValue().mb_str(wxConvUTF8) );
if( ab == 0)
{
ab = 192;
......@@ -1091,7 +1091,7 @@ void wizStreamingMethodPage::OnWizardPageChanging(wxWizardEvent& event)
/* Check valid address */
if( i_method == 1
&& !net_AddressIsMulticast( (vlc_object_t *)p_intf,
address_txtctrl->GetValue().mb_str()) )
address_txtctrl->GetValue().mb_str(wxConvUTF8)) )
{
wxMessageBox( wxU( INVALID_MCAST_ADDRESS ) , wxU( ERROR_MSG ),
wxICON_WARNING | wxOK, this->p_parent );
......@@ -1116,7 +1116,7 @@ void wizStreamingMethodPage::OnWizardPageChanging(wxWizardEvent& event)
}
}
p_parent->SetStream( methods_array[i_method].psz_access ,
address_txtctrl->GetValue().mb_str() );
address_txtctrl->GetValue().mb_str(wxConvUTF8) );
/* Set the action for the muxer page */
((wizEncapPage*)GetNext())->SetAction( p_parent->GetAction() );
......
......@@ -980,7 +980,7 @@ void ExtraPanel::OnAdjustUpdate( wxScrollEvent &event)
/* FIXME */
void ExtraPanel::OnRatio( wxCommandEvent& event )
{
config_PutPsz( p_intf, "aspect-ratio", ratio_combo->GetValue().mb_str() );
config_PutPsz( p_intf, "aspect-ratio", ratio_combo->GetValue().mb_str(wxConvUTF8) );
}
......
......@@ -593,7 +593,7 @@ WindowSettings::~WindowSettings( )
size[i].x, size[i].y );
}
config_PutPsz( p_intf, "wx-config-last", sCfg.mb_str() );
config_PutPsz( p_intf, "wx-config-last", sCfg.mb_str(wxConvUTF8) );
}
void WindowSettings::SetScreen( int i_screen_w, int i_screen_h )
......
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