]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/interface.cpp
* wxwidgets: fix a memory leak (patch by Brian Robb)
[vlc] / modules / gui / wxwidgets / interface.cpp
index b9fe9fa84cc9e9486219e6b16b6ec07a111a1083..be87604472aebbf27228c75f3663a634c1f9b8ca 100644 (file)
@@ -341,6 +341,8 @@ Interface::~Interface()
                          GetPosition(), GetSize() );
     }
 
+       PopEventHandler(true);
+
     if( video_window ) delete video_window;
 
 #ifdef wxHAS_TASK_BAR_ICON
@@ -863,6 +865,10 @@ void Interface::OnAbout( wxCommandEvent& WXUNUSED(event) )
     msg.Printf( wxString(wxT("VLC media player " PACKAGE_VERSION)) +
         wxU(_(" (wxWidgets interface)\n\n")) +
         wxU(_("(c) 1996-2005 - the VideoLAN Team\n\n")) +
+       wxU(_("Compiled by "))+ wxU(VLC_CompileBy())+ wxU("@") +
+       wxU(VLC_CompileHost())+ wxT(".")+ wxU(VLC_CompileDomain())+ wxT(".\n") +
+       wxU(_("Compiler: "))+ wxU(VLC_Compiler())+wxT( ".\n") +
+       wxU(_("Based on SVN revision: "))+wxU(VLC_Changeset())+wxT(".\n\n") +
 #ifdef __WXMSW__
         wxU( vlc_wraptext(INTF_ABOUT_MSG,WRAPCOUNT,VLC_TRUE) ) + wxT("\n\n") +
 #else
@@ -1366,10 +1372,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 );
 
@@ -1417,8 +1426,8 @@ void wxVolCtrl::OnChange( wxMouseEvent& event )
 {
     if( !event.LeftDown() && !event.LeftIsDown() ) return;
 
-    int i_volume = event.GetX() * 400 / GetClientSize().GetWidth();
-    aout_VolumeSet( p_intf, i_volume * AOUT_VOLUME_MAX / 400 / 2 );
+    int i_volume = event.GetX() * 200 / GetClientSize().GetWidth();
+    aout_VolumeSet( p_intf, i_volume * AOUT_VOLUME_MAX / 200 / 2 );
     UpdateVolume();
 }
 
@@ -1427,7 +1436,7 @@ void wxVolCtrl::UpdateVolume()
     audio_volume_t i_volume;
     aout_VolumeGet( p_intf, &i_volume );
 
-    int i_gauge_volume = i_volume * 400 * 2 / AOUT_VOLUME_MAX;
+    int i_gauge_volume = i_volume * 200 * 2 / AOUT_VOLUME_MAX;
     if( i_gauge_volume == GetValue() ) return;
 
     SetValue( i_gauge_volume );