Mercurial > mplayer.hg
comparison gui/interface.c @ 35519:7f1be403a640
Don't unnecessarily use global MPlayer variable filename.
Use a local variable instead.
author | ib |
---|---|
date | Wed, 05 Dec 2012 22:55:02 +0000 |
parents | 7d695302b856 |
children | 1857fa5cbfcb |
comparison
equal
deleted
inserted
replaced
35518:7d695302b856 | 35519:7f1be403a640 |
---|---|
866 * @return #True (ok) or #False (error) | 866 * @return #True (ok) or #False (error) |
867 */ | 867 */ |
868 int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue) | 868 int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue) |
869 { | 869 { |
870 play_tree_iter_t *pt_iter; | 870 play_tree_iter_t *pt_iter; |
871 const char *file; | |
871 int added = False; | 872 int added = False; |
872 plItem *curr; | 873 plItem *curr; |
873 | 874 |
874 pt_iter = pt_iter_create(&playtree, config); | 875 pt_iter = pt_iter_create(&playtree, config); |
875 | 876 |
880 case GUI_PLAYLIST_INIT: | 881 case GUI_PLAYLIST_INIT: |
881 | 882 |
882 if (!enqueue) | 883 if (!enqueue) |
883 listMgr(PLAYLIST_DELETE, 0); | 884 listMgr(PLAYLIST_DELETE, 0); |
884 | 885 |
885 while ((filename = pt_iter_get_next_file(pt_iter))) | 886 while ((file = pt_iter_get_next_file(pt_iter))) |
886 if (add_to_gui_playlist(filename, PLAYLIST_ITEM_APPEND)) | 887 if (add_to_gui_playlist(file, PLAYLIST_ITEM_APPEND)) |
887 added = True; | 888 added = True; |
888 | 889 |
889 uiCurr(); // update filename | 890 uiCurr(); // update filename |
890 guiInfo.PlaylistNext = True; | 891 guiInfo.PlaylistNext = True; |
891 | 892 |
899 | 900 |
900 case GUI_PLAYLIST_ADD: | 901 case GUI_PLAYLIST_ADD: |
901 | 902 |
902 curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); | 903 curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0); |
903 | 904 |
904 while ((filename = pt_iter_get_next_file(pt_iter))) | 905 while ((file = pt_iter_get_next_file(pt_iter))) |
905 if (add_to_gui_playlist(filename, PLAYLIST_ITEM_INSERT)) | 906 if (add_to_gui_playlist(file, PLAYLIST_ITEM_INSERT)) |
906 added = True; | 907 added = True; |
907 | 908 |
908 if (curr) | 909 if (curr) |
909 listMgr(PLAYLIST_ITEM_SET_CURR, curr); | 910 listMgr(PLAYLIST_ITEM_SET_CURR, curr); |
910 else | 911 else |