]> git.sesse.net Git - vlc/commitdiff
Forwardport Unicode wxWidgets fixes - [17434], [17436], [17452]
authorMarian Durkovic <md@videolan.org>
Mon, 6 Nov 2006 12:49:21 +0000 (12:49 +0000)
committerMarian Durkovic <md@videolan.org>
Mon, 6 Nov 2006 12:49:21 +0000 (12:49 +0000)
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
modules/gui/wxwidgets/dialogs/wizard.cpp
modules/gui/wxwidgets/dialogs/wizard.hpp
modules/gui/wxwidgets/wxwidgets.hpp

index 5d67d83d1355eaf234a54c4b7171f37f1bea8838..fb380d9fac7387607400a7690034c942a4d3a5c0 100644 (file)
@@ -441,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,
@@ -468,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 )
index 6cf4dd3ad3dbf66a87bae6d471946ce52cc73a13..25f1d0a336a488cd83bd8ec9ff733c938083152b 100644 (file)
@@ -1297,7 +1297,7 @@ void wizTranscodeExtraPage::OnWizardPageChanging( wxWizardEvent& event )
     }
     if( event.GetDirection() )
     {
-       p_parent->SetTranscodeOut( file_text->GetValue().mb_str());
+       p_parent->SetTranscodeOut( file_text->GetValue() );
     }
 }
 
@@ -1510,11 +1510,11 @@ void WizardDialog::SetStream( char const *method, char const *address )
     this->address = strdup( address );
 }
 
-void WizardDialog::SetTranscodeOut( char const *address )
+void WizardDialog::SetTranscodeOut( wxString address )
 {
-    char *psz_utf8 = FromLocale( address );
+    char *psz_utf8 = wxFromLocale( address );
     this->address = strdup( psz_utf8 );
-    LocaleFree( psz_utf8 );
+    wxLocaleFree( psz_utf8 );
 }
 
 void WizardDialog::SetMux( char const *mux )
index 0725427e21bcc4e7ab64a9e5895f67d56ca3f7f6..845011b13a31645e4cae7ac1fe63e763e05b4828 100644 (file)
@@ -42,7 +42,7 @@ namespace wxvlc
         void SetTTL( int i_ttl );
         void SetPartial( int, int );
         void SetStream( char const *method, char const *address );
-        void SetTranscodeOut( char const *address );
+        void SetTranscodeOut( wxString address );
         void SetAction( int i_action );
         int  GetAction();
         void SetSAP( bool b_enabled, const char *psz_name );
index dfd0d3e08731e3966a526f645339bc7449703463..3fef5ce125e1c08f2518824152c1ca0f863964e9 100644 (file)
@@ -95,10 +95,8 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
  * But heh, that's wxWidgets; you can't really expect it to actually
  * work, let alone work like its documentation says.
  *
- * Did it work, we would be able to catch non-ANSI characters on Windows
- * through wxString::wc_str(); while they are lost when using mb_str().
- * This would be particularly useful to open files whose names contain
- * non-ACP characters.
+ * Unicode needs to be enabled to catch non-ANSI characters on Windows
+ * through wxString::wc_str(); they are lost when using mb_str().
  */
 #if wxUSE_UNICODE
 #   define wxFromLocale(wxstring) FromWide(wxstring.wc_str())
@@ -109,7 +107,7 @@ DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
 #endif
        
 /* From Locale functions to use for File Drop targets ... go figure */
-#ifdef wxUSE_UNICODE
+#if defined( wxUSE_UNICODE ) && !defined( WIN32 )
 static inline char *wxDnDFromLocale( const wxChar *stupid )
 {
     /*