# HG changeset patch # User ib # Date 1337625985 0 # Node ID 203d0d5cac1f5e6e2a1fa53a5ca1c9aa9ad43bae # Parent f1b2304e015760a5f8b9303e8b1b6a5e429e8aab Add playlist support to the GUI. diff -r f1b2304e0157 -r 203d0d5cac1f gui/interface.c --- a/gui/interface.c Mon May 21 15:31:03 2012 +0000 +++ b/gui/interface.c Mon May 21 18:46:25 2012 +0000 @@ -595,6 +595,9 @@ case GUI_SET_STREAM: + if (guiInfo.StreamType == STREAMTYPE_PLAYLIST) + guiInfo.mpcontext->file_format = DEMUXER_TYPE_PLAYLIST; + stream = data; guiInfo.StreamType = stream->type; diff -r f1b2304e0157 -r 203d0d5cac1f gui/ui/gtk/fileselect.c --- a/gui/ui/gtk/fileselect.c Mon May 21 15:31:03 2012 +0000 +++ b/gui/ui/gtk/fileselect.c Mon May 21 18:46:25 2012 +0000 @@ -485,7 +485,7 @@ static void fs_Ok_released( GtkButton * button, gpointer user_data ) { GList * item; - int i = 1; + int i = 1, l; struct stat fs; stat( fsSelectedFile,&fs ); @@ -503,7 +503,9 @@ switch ( fsType ) { case fsVideoSelector: - uiSetFileName( fsSelectedDirectory,fsSelectedFile,STREAMTYPE_FILE ); + for (l = 0; fsVideoFilterNames[l][0]; l++) + if (strcmp(fsVideoFilterNames[l][0], MSGTR_Filter_Playlists) == 0) break; + uiSetFileName( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE ); guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0; fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history break; diff -r f1b2304e0157 -r 203d0d5cac1f gui/ui/main.c --- a/gui/ui/main.c Mon May 21 15:31:03 2012 +0000 +++ b/gui/ui/main.c Mon May 21 18:46:25 2012 +0000 @@ -218,6 +218,7 @@ { case STREAMTYPE_FILE: case STREAMTYPE_STREAM: + case STREAMTYPE_PLAYLIST: guiInfoMediumClear( CLEAR_ALL - CLEAR_FILE ); if ( !guiInfo.Track ) guiInfo.Track=1;