comparison gui/ui/gtk/fileselect.c @ 35350:ee265b18d653

Rename import_file_into_gui() add_to_gui_playlist(). This seems to be a more appropriate name. Additionally, use self-explanatory enum constants instead of numeric ones, change the parameter names and a declaration to const, check the parameters and print the debug message only if the item will really be added. (For the sake of consistency, adjust the Win32 code as well.)
author ib
date Thu, 22 Nov 2012 13:57:40 +0000
parents 3aba69339390
children 96cda43fe250
comparison
equal deleted inserted replaced
35349:60930e7347c6 35350:ee265b18d653
30 #include "gui/ui/pixmaps/dir.xpm" 30 #include "gui/ui/pixmaps/dir.xpm"
31 #include "gui/ui/pixmaps/file.xpm" 31 #include "gui/ui/pixmaps/file.xpm"
32 32
33 #include "gui/app.h" 33 #include "gui/app.h"
34 #include "gui/interface.h" 34 #include "gui/interface.h"
35 #include "gui/util/list.h"
35 #include "gui/util/mem.h" 36 #include "gui/util/mem.h"
36 #include "gui/util/string.h" 37 #include "gui/util/string.h"
37 #include "help_mp.h" 38 #include "help_mp.h"
38 #include "mpcommon.h" 39 #include "mpcommon.h"
39 #include "stream/stream.h" 40 #include "stream/stream.h"
508 if (strcmp(fsVideoFilterNames[l][0], MSGTR_Filter_Playlists) == 0) break; 509 if (strcmp(fsVideoFilterNames[l][0], MSGTR_Filter_Playlists) == 0) break;
509 uiSetFileName( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE ); 510 uiSetFileName( fsSelectedDirectory,fsSelectedFile, fsLastVideoFilterSelected == l ? STREAMTYPE_PLAYLIST : STREAMTYPE_FILE );
510 selected = g_strconcat(fsSelectedDirectory, "/", fsSelectedFile, NULL); 511 selected = g_strconcat(fsSelectedDirectory, "/", fsSelectedFile, NULL);
511 if (selected) 512 if (selected)
512 { 513 {
513 import_file_into_gui(selected, 0); 514 add_to_gui_playlist(selected, PLAYLIST_ITEM_APPEND);
514 g_free(selected); 515 g_free(selected);
515 } 516 }
516 guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0; 517 guiInfo.NewPlay=GUI_FILE_NEW; sub_fps=0;
517 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history 518 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history
518 break; 519 break;