]> git.sesse.net Git - vlc/commitdiff
Completely replace all ANSI CP dependend mb_str()
authorMarian Durkovic <md@videolan.org>
Thu, 23 Nov 2006 09:21:16 +0000 (09:21 +0000)
committerMarian Durkovic <md@videolan.org>
Thu, 23 Nov 2006 09:21:16 +0000 (09:21 +0000)
with mb_str(wxConvUTF8)

13 files changed:
modules/gui/wxwidgets/dialogs.cpp
modules/gui/wxwidgets/dialogs/bookmarks.cpp
modules/gui/wxwidgets/dialogs/infopanels.cpp
modules/gui/wxwidgets/dialogs/interaction.cpp
modules/gui/wxwidgets/dialogs/open.cpp
modules/gui/wxwidgets/dialogs/playlist.cpp
modules/gui/wxwidgets/dialogs/preferences.cpp
modules/gui/wxwidgets/dialogs/preferences_widgets.cpp
modules/gui/wxwidgets/dialogs/updatevlc.cpp
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
modules/gui/wxwidgets/dialogs/wizard.cpp
modules/gui/wxwidgets/extrapanel.cpp
modules/gui/wxwidgets/wxwidgets.cpp

index d18e8bb7ad6d7c6fe5ac17c9df16a7db990123b8..edaca78d712d6cbaec05ed4e4aef01c9aca4778c 100644 (file)
@@ -396,7 +396,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) );
         }
     }
 
index f91fcfe6b4f540c0692c61b1065434f8b4749a8f..6733f6da2a45d868f130741caa3ce5d8260a3de3 100644 (file)
@@ -119,10 +119,10 @@ BookmarkEditDialog::~BookmarkEditDialog()
 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() );
-    p_seekpoint->i_byte_offset = atoi( bytes_text->GetValue().mb_str() );
+    p_seekpoint->psz_name = strdup( name_text->GetValue().mb_str(wxConvUTF8) );
+    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 );
 }
 
index 7260265d773f385494b6d7567e677d7271b49388..4797640b69903aafd327c97ca81108531a851efb 100644 (file)
@@ -147,12 +147,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()
index 0e29263a9d996a27b6c41a260e46caddfaa9156f..50975d99dece8fd0790cb73471188f003b272e05 100644 (file)
@@ -261,7 +261,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();
index b2e39b83f4b23ca82e5d90f37fe8e15dcf363720..10203ea2f30e1af979b52c483f324cdfa7c1676f 100644 (file)
@@ -1129,7 +1129,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 );
         }
     }
@@ -1172,7 +1172,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
 
         /* Insert options */
         while( i + 1 < (int)mrl.GetCount() &&
-               ((const char *)mrl[i + 1].mb_str())[0] == ':' )
+               ((const char *)mrl[i + 1].mb_str(wxConvUTF8))[0] == ':' )
         {
             psz_utf8 = wxFromLocale( mrl[i + 1] );
             input_ItemAddOption( p_input, psz_utf8 );
index 6ce94cf7c5c72e88d3f5af6b402fc94edf8c3e90..dfc82e72929582feac2adab320776e781fa68e1c 100644 (file)
@@ -957,12 +957,12 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
 
     if( dialog.ShowModal() == wxID_OK )
     {
-        if( dialog.GetPath().mb_str() )
+        if( dialog.GetPath().mb_str(wxConvUTF8) )
         {
             /* what root should we export? */
             if( p_playlist->p_root_category->i_children > 0 )
             {
-                playlist_Export( p_playlist, dialog.GetPath().mb_str(),
+                playlist_Export( p_playlist, dialog.GetPath().mb_str(wxConvUTF8),
                                  p_playlist->p_root_category->pp_children[0],
                                  formats[dialog.GetFilterIndex()].psz_module );
             }
@@ -978,7 +978,7 @@ void Playlist::OnOpen( wxCommandEvent& WXUNUSED(event) )
 
     if( dialog.ShowModal() == wxID_OK )
     {
-        playlist_Import( p_playlist, dialog.GetPath().mb_str() );
+        playlist_Import( p_playlist, dialog.GetPath().mb_str(wxConvUTF8) );
     }
 }
 
index cb99743f0c275b5dff70d354e61026594460502a..25d8381b91f046ee8e6841c48f79dc11d5b01b7c 100644 (file)
@@ -1074,20 +1074,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(),
-                           control->GetPszValue().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_libvlc, control->GetName().mb_str(), val );
+            var_Set( p_intf->p_libvlc, 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;
         }
index 6a8330b9d830781be1fd227410291c5f2c22c588..4570a8e8f0c3260621775ae8e353bc7139c24084 100644 (file)
@@ -637,15 +637,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 )
     {
@@ -854,14 +854,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 )
     {
index 0c56162e64203b185bfd1103c56abddaec681d71..aca62991270d47b1314c2635278ab96384437987 100644 (file)
@@ -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;
index fb380d9fac7387607400a7690034c942a4d3a5c0..e67304e22b2d38d4ad25c52b5c1adcf80dbe386e 100644 (file)
@@ -217,7 +217,7 @@ void VLMPanel::OnLoad( wxCommandEvent &event )
     p_file_dialog->SetTitle( wxU(_("Load Configuration") ) );
     if( p_file_dialog->ShowModal() == wxID_OK )
     {
-        vlm_Load( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str() );
+        vlm_Load( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str(wxConvUTF8) );
     }
     Update();
 }
@@ -231,7 +231,7 @@ void VLMPanel::OnSave( wxCommandEvent &event )
     p_file_dialog->SetTitle( wxU(_("Save Configuration") ) );
     if( p_file_dialog->ShowModal() == wxID_OK )
     {
-        vlm_Save( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str() );
+        vlm_Save( p_vlm->GetVLM(), p_file_dialog->GetPath().mb_str(wxConvUTF8) );
     }
 }
 
index 19171b1ef144ed5a4d69726fa7d399cf0389c014..1b039224a5a77605c70572c6dc6417812d312e2b 100644 (file)
@@ -707,7 +707,7 @@ void wizInputPage::OnWizardPageChanging(wxWizardEvent& event)
         }
         else
         {
-            p_parent->SetMrl( (const char *)mrl_text->GetValue().mb_str() );
+            p_parent->SetMrl( (const char *)mrl_text->GetValue().mb_str(wxConvUTF8) );
         }
     }
     else
@@ -735,8 +735,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;
@@ -980,12 +980,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;
@@ -1079,7 +1079,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 );
@@ -1104,7 +1104,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() );
@@ -1279,7 +1279,7 @@ void wizTranscodeExtraPage::OnSelectFile( wxCommandEvent &event)
 
     if( file_dialog && file_dialog->ShowModal() == wxID_OK )
     {
-        if( file_dialog->GetFilename().mb_str() )
+        if( file_dialog->GetFilename().mb_str(wxConvUTF8) )
         {
             file_text->SetValue( file_dialog->GetPath() );
         }
@@ -1363,7 +1363,7 @@ void wizStreamingExtraPage::OnWizardPageChanging(wxWizardEvent& event)
         else
         {
             p_parent->SetSAP( true,
-                             (const char *)sap_text->GetValue().mb_str() );
+                             (const char *)sap_text->GetValue().mb_str(wxConvUTF8) );
         }
     }
     else
index 505e2e71107b815d4e47105e2470bbb9d2360adf..ed3dd5aaca6b4abafc87a6568ccba7cd49455b33 100644 (file)
@@ -981,7 +981,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) );
 }
 
 
index 400365f7d17870a7c527e5faf33183e8f6582df3..62c45e225b53b8a3a40fd97202c49e384acb0ba7 100644 (file)
@@ -592,7 +592,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 )