Mercurial > mplayer.hg
diff gui/ui/gtk/playlist.c @ 34664:4df4d842d5fb
Remove global variable pointing to current playlist item.
Instead, use the listMgr command to get it.
author | ib |
---|---|
date | Tue, 21 Feb 2012 19:44:21 +0000 |
parents | 73a5ecb53ee2 |
children | a5c69b91ff2c |
line wrap: on
line diff
--- a/gui/ui/gtk/playlist.c Tue Feb 21 18:55:14 2012 +0000 +++ b/gui/ui/gtk/playlist.c Tue Feb 21 19:44:21 2012 +0000 @@ -191,10 +191,10 @@ case 1: // ok { int i; + plItem * item; if ( plList ) listMgr( PLAYLIST_DELETE,0 ); for ( i=0;i<NrOfSelected;i++ ) { - plItem * item; char * text[3]; item=calloc( 1,sizeof( plItem ) ); gtk_clist_get_text( GTK_CLIST( CLSelected ),i,0,&text[0] ); @@ -205,10 +205,11 @@ if ( !item->path ) item->path = strdup( text[1] ); listMgr( PLAYLIST_ITEM_ADD,item ); } - if ( plCurrent ) + item = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); + if ( item ) { - uiSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE ); -// setddup( &guiInfo.Filename,plCurrent->path,plCurrent->name ); + uiSetFileName( item->path,item->name,STREAMTYPE_FILE ); +// setddup( &guiInfo.Filename,item->path,item->name ); // guiInfo.NewPlay=GUI_FILE_NEW; // guiInfo.StreamType=STREAMTYPE_FILE; }