changeset 34859:203d0d5cac1f

Add playlist support to the GUI.
author ib
date Mon, 21 May 2012 18:46:25 +0000
parents f1b2304e0157
children 4a7962b0f3d4
files gui/interface.c gui/ui/gtk/fileselect.c gui/ui/main.c
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;
 
--- 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;
--- 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;