]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
Completely replace all ANSI CP dependend mb_str()
[vlc] / modules / gui / wxwidgets / dialogs / vlm / vlm_panel.cpp
index fa55f0be3b2fa973265f8fc8891515dd8945ba0e..e67304e22b2d38d4ad25c52b5c1adcf80dbe386e 100644 (file)
@@ -33,9 +33,7 @@ enum
 {
     Notebook_Event,
     Timer_Event,
-    Close_Event,
     Load_Event,
-    Save_Event,
 };
 
 BEGIN_EVENT_TABLE( VLMPanel, wxPanel)
@@ -75,10 +73,10 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
 #endif
 
     wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
-    button_sizer->Add( new wxButton( this, wxID_CLOSE ));
+    button_sizer->Add( new wxButton( this, wxID_CLOSE, wxU(_("&Close") ) ) );
     button_sizer->Add( 0, 0, 1 );
     button_sizer->Add( new wxButton( this, Load_Event, wxU(_("Load") ) ), 0, wxRIGHT, 10 );
-    button_sizer->Add( new wxButton( this, wxID_SAVE ));
+    button_sizer->Add( new wxButton( this, wxID_SAVE, wxU(_("&Save") ) ) );
     panel_sizer->Add( button_sizer, 0 , wxEXPAND | wxALL, 5 );
 
     panel_sizer->Layout();
@@ -216,10 +214,10 @@ void VLMPanel::OnLoad( wxCommandEvent &event )
                                       wxT("*"), wxOPEN | wxMULTIPLE );
     if( p_file_dialog == NULL ) return;
 
-    p_file_dialog->SetTitle( wxU(_("Load configuration") ) );
+    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();
 }
@@ -230,10 +228,10 @@ void VLMPanel::OnSave( wxCommandEvent &event )
                                       wxT("*"), wxSAVE | wxOVERWRITE_PROMPT );
     if( p_file_dialog == NULL ) return;
 
-    p_file_dialog->SetTitle( wxU(_("Save configuration") ) );
+    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) );
     }
 }
 
@@ -409,7 +407,8 @@ VLMAddStreamPanel::VLMAddStreamPanel( intf_thread_t *_p_intf,
 
     if( !b_edit )
     {
-        lower_sizer->Add( new wxButton( this, wxID_CLEAR ),
+        lower_sizer->Add( new wxButton( this, wxID_CLEAR,
+                          wxU( _( "&Clear" )  ) ),
                          0 , wxEXPAND | wxALL , 5 );
     }
     lower_sizer->Add( new wxButton( this, Create_Event,
@@ -442,9 +441,9 @@ void VLMAddStreamPanel::Load( VLMStream *p_stream )
 
 void VLMAddStreamPanel::OnCreate( wxCommandEvent &event )
 {
-    char *psz_name = FromLocale( name_text->GetValue().mb_str() );
-    char *psz_input = FromLocale(  input_text->GetValue().mb_str() );
-    char *psz_output = FromLocale( output_text->GetValue().mb_str() );
+    char *psz_name = wxFromLocale( name_text->GetValue() );
+    char *psz_input = wxFromLocale(  input_text->GetValue() );
+    char *psz_output = wxFromLocale( output_text->GetValue() );
     if( b_broadcast && ! b_edit )
     {
         p_vlm->AddBroadcast( psz_name, psz_input, psz_output,
@@ -469,8 +468,8 @@ void VLMAddStreamPanel::OnCreate( wxCommandEvent &event )
                         enabled_checkbox->IsChecked() ? VLC_TRUE: VLC_FALSE,
                         loop_checkbox->IsChecked() ? VLC_TRUE : VLC_FALSE );
     }
-    LocaleFree( psz_name) ; LocaleFree( psz_input ) ;
-    LocaleFree( psz_output);
+    wxLocaleFree( psz_name) ; wxLocaleFree( psz_input ) ;
+    wxLocaleFree( psz_output);
     if( !b_edit )
         OnClear( event );
     if( b_edit )