[MPlayer-cvslog] r35442 - trunk/gui/ui/gtk/fileselect.c

ib subversion at mplayerhq.hu
Thu Nov 22 14:12:15 CET 2012


Author: ib
Date: Thu Nov 22 14:12:15 2012
New Revision: 35442

Log:
Add a file loaded by the GUI to its playlist.

The GUI operates on its playlist, so the file may not be missing there.

This fixes a blocking when trying to replay a file loaded by the GUI
(evLoad/evLoadPlay) instead of having been given as a command line
argument, as well as a segmentation fault when loading a file after a
playlist has been created.

Reported by Hans-Dieter Kosch, hdkosch kabelbw de.

Modified:
   trunk/gui/ui/gtk/fileselect.c

Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c	Thu Nov 22 14:10:46 2012	(r35441)
+++ trunk/gui/ui/gtk/fileselect.c	Thu Nov 22 14:12:15 2012	(r35442)
@@ -487,6 +487,7 @@ static void fs_Ok_released( GtkButton * 
  GList         * item;
  int             i = 1, l;
  struct stat     fs;
+ gchar         * selected;
 
  stat( fsSelectedFile,&fs );
  if(  S_ISDIR(fs.st_mode ) )
@@ -506,6 +507,12 @@ static void fs_Ok_released( GtkButton * 
           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 );
+          selected = g_strconcat(fsSelectedDirectory, "/", fsSelectedFile, NULL);
+          if (selected)
+          {
+            import_file_into_gui(selected, 0);
+            g_free(selected);
+          }
           guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0;
           fs_PersistantHistory( get_current_dir_name_utf8() );      //totem, write into history
           break;


More information about the MPlayer-cvslog mailing list