]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwidgets/interface.cpp: Missing FromLocale() for the drag'n
authorChristophe Massiot <massiot@videolan.org>
Mon, 29 Aug 2005 16:25:01 +0000 (16:25 +0000)
committerChristophe Massiot <massiot@videolan.org>
Mon, 29 Aug 2005 16:25:01 +0000 (16:25 +0000)
   drop code.

modules/gui/wxwidgets/interface.cpp

index 54f3f6c459daedc248425600b0c8c86de69d4eaa..a9c9c1584179d14cbe96e6e8f77a314b3bc5eb27 100644 (file)
@@ -1370,10 +1370,13 @@ bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
     }
 
     for( size_t i = 0; i < filenames.GetCount(); i++ )
-        playlist_Add( p_playlist, (const char *)filenames[i].mb_str(),
-                      (const char *)filenames[i].mb_str(),
+    {
+        char *psz_utf8 = FromLocale( filenames[i].mb_str() );
+        playlist_Add( p_playlist, psz_utf8, psz_utf8,
                       PLAYLIST_APPEND | ((i | b_enqueue) ? 0 : PLAYLIST_GO),
                       PLAYLIST_END );
+        LocaleFree( psz_utf8 );
+    }
 
     vlc_object_release( p_playlist );