# HG changeset patch # User ib # Date 1353589935 0 # Node ID 3aba69339390fa459d927ecbd16594c6474642f7 # Parent 11408d97de7af6979896597c07144a75d530cd47 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. diff -r 11408d97de7a -r 3aba69339390 gui/ui/gtk/fileselect.c --- a/gui/ui/gtk/fileselect.c Thu Nov 22 13:10:46 2012 +0000 +++ b/gui/ui/gtk/fileselect.c Thu Nov 22 13:12:15 2012 +0000 @@ -487,6 +487,7 @@ GList * item; int i = 1, l; struct stat fs; + gchar * selected; stat( fsSelectedFile,&fs ); if( S_ISDIR(fs.st_mode ) ) @@ -506,6 +507,12 @@ 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;