]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/playlist.cpp
Merge author/artist
[vlc] / modules / gui / wxwidgets / dialogs / playlist.cpp
index e67411711e75c8bba3204bb2509c0ca16d06cce2..81565fa3ef2bc36ef4123507636092cb50b33344 100644 (file)
@@ -219,7 +219,6 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
     i_items_to_append = 0;
     p_playlist = (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
                                                 FIND_ANYWHERE );
-    msg_Err(p_intf, "p_playlist= 0x%x", p_playlist);
     if( p_playlist == NULL ) return;
 
     SetIcon( *p_intf->p_sys->p_icon );
@@ -340,9 +339,9 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
     toolbar->Realize();
 
     /* Create teh source selector */
-    source_sel = new wxListCtrl( playlist_panel, Source_Event,
-                                wxDefaultPosition, wxDefaultSize,
-                                wxLC_AUTOARRANGE|wxLC_SINGLE_SEL );
+    source_sel = new wxListView( playlist_panel, Source_Event,
+                                 wxDefaultPosition, wxDefaultSize,
+                                 wxLC_AUTOARRANGE|wxLC_SINGLE_SEL );
 
     /* Create the tree */
     treectrl = new wxTreeCtrl( playlist_panel, TreeCtrl_Event,
@@ -516,15 +515,15 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
     wxString msg;
     wxString duration = wxU( "" );
 
-    char *psz_author;
+    char *psz_artist;
     if( p_item->p_input->p_meta )
     {
-        psz_author= p_item->p_input->p_meta->psz_artist ?
+        psz_artist= p_item->p_input->p_meta->psz_artist ?
                         strdup( p_item->p_input->p_meta->psz_artist ) :
                         strdup("");
     }
     else
-        psz_author = strdup( "" );
+        psz_artist = strdup( "" );
 
     char psz_duration[MSTRTIME_MAX_SIZE];
     mtime_t dur = p_item->p_input->i_duration;
@@ -536,16 +535,16 @@ void Playlist::UpdateTreeItem( wxTreeItemId item )
                          wxU( " )" ) );
     }
 
-    if( !strcmp( psz_author, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE )
+    if( !strcmp( psz_artist, "" ) || p_item->p_input->b_fixed_name == VLC_TRUE )
     {
         msg = wxString( wxU( p_item->p_input->psz_name ) ) + duration;
     }
     else
     {
-        msg = wxString(wxU( psz_author )) + wxT(" - ") +
+        msg = wxString(wxU( psz_artist )) + wxT(" - ") +
               wxString(wxU(p_item->p_input->psz_name)) + duration;
     }
-    free( psz_author );
+    free( psz_artist );
     treectrl->SetItemText( item , msg );
     treectrl->SetItemImage( item, p_item->p_input->i_type );
 
@@ -1305,7 +1304,7 @@ bool PlaylistFileDropTarget::OnDropFiles( wxCoord x, wxCoord y,
     /* Put the items in the playlist node */
     for( size_t i = 0; i < filenames.GetCount(); i++ )
     {
-        const char *psz_utf8 = wxDnDFromLocale( filenames[i] );
+        char *psz_utf8 = wxDnDFromLocale( filenames[i] );
         input_item_t *p_input = input_ItemNew( p->p_playlist,
                                               psz_utf8, psz_utf8 );
         playlist_NodeAddInput( p->p_playlist, p_input,
@@ -1655,16 +1654,12 @@ void Playlist::OnPlaylistEvent( wxCommandEvent& event )
     switch( event.GetId() )
     {
         case UpdateItem_Event:
-            fprintf( stderr,"Update input item id %i\n", event.GetInt() );
             UpdateItem( event.GetInt() );
             break;
         case AppendItem_Event:
-            fprintf( stderr,"Append item id %i\n",
-                         ((playlist_add_t*)event.GetClientData())->i_item );
             AppendItem( event );
             break;
         case RemoveItem_Event:
-            fprintf( stderr,"Remove item id %i\n", event.GetInt() );
             RemoveItem( event.GetInt() );
             break;
     }