# HG changeset patch # User ib # Date 1354709292 0 # Node ID ce2cda8acb4e1738bacf0c06da3dd6ab5e51adec # Parent 6616645f91ead009ff56927838c056ae56383466 Cosmetic: Change variable names. diff -r 6616645f91ea -r ce2cda8acb4e gui/interface.c --- a/gui/interface.c Wed Dec 05 12:00:52 2012 +0000 +++ b/gui/interface.c Wed Dec 05 12:08:12 2012 +0000 @@ -853,11 +853,11 @@ return True; } -int guiPlaylist(int what, play_tree_t *my_playtree, m_config_t *config, int enqueue) +int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue) { - play_tree_iter_t *my_pt_iter = NULL; + play_tree_iter_t *pt_iter = NULL; int added = False; - plItem *save; + plItem *curr; switch (what) { // This function imports the initial playtree (based on cmd-line files) @@ -869,8 +869,8 @@ if (!enqueue) listMgr(PLAYLIST_DELETE, 0); // delete playlist before "appending" - if ((my_pt_iter = pt_iter_create(&my_playtree, config))) { - while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + if ((pt_iter = pt_iter_create(&playtree, config))) { + while ((filename = pt_iter_get_next_file(pt_iter)) != NULL) /* add it to end of list */ if (add_to_gui_playlist(filename, PLAYLIST_ITEM_APPEND)) added = True; @@ -894,23 +894,23 @@ // The file which contained the playlist is thereby replaced with it's contents. case GUI_PLAYLIST_ADD: - save = (plItem *)listMgr(PLAYLIST_ITEM_GET_CURR, 0); // save current item + curr = (plItem *)listMgr(PLAYLIST_ITEM_GET_CURR, 0); - if ((my_pt_iter = pt_iter_create(&my_playtree, config))) { - while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + if ((pt_iter = pt_iter_create(&playtree, config))) { + while ((filename = pt_iter_get_next_file(pt_iter)) != NULL) /* insert it into the list and set plCurrent=new item */ if (add_to_gui_playlist(filename, PLAYLIST_ITEM_INSERT)) added = True; - pt_iter_destroy(&my_pt_iter); + pt_iter_destroy(&pt_iter); } - if (save) - listMgr(PLAYLIST_ITEM_SET_CURR, save); + if (curr) + listMgr(PLAYLIST_ITEM_SET_CURR, curr); else listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); // go to head, if plList was empty before - if (save && added) + if (curr && added) listMgr(PLAYLIST_ITEM_DEL_CURR, 0); uiCurr(); // update filename diff -r 6616645f91ea -r ce2cda8acb4e gui/interface.h --- a/gui/interface.h Wed Dec 05 12:00:52 2012 +0000 +++ b/gui/interface.h Wed Dec 05 12:08:12 2012 +0000 @@ -146,7 +146,7 @@ int gui(int what, void *data); void guiDone(void); void guiInit(void); -int guiPlaylist(int what, play_tree_t *my_playtree, m_config_t *config, int enqueue); +int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue); //@} /// @name GUI -> MPlayer diff -r 6616645f91ea -r ce2cda8acb4e gui/win32/interface.c --- a/gui/win32/interface.c Wed Dec 05 12:00:52 2012 +0000 +++ b/gui/win32/interface.c Wed Dec 05 12:08:12 2012 +0000 @@ -842,9 +842,9 @@ return 0; } -int guiPlaylist (int what, play_tree_t *my_playtree, m_config_t *config, int enqueue) +int guiPlaylist (int what, play_tree_t *playtree, m_config_t *config, int enqueue) { - play_tree_iter_t *my_pt_iter = NULL; + play_tree_iter_t *pt_iter = NULL; int added = FALSE; switch (what) @@ -856,11 +856,11 @@ if(!mygui) guiInit(); - if((my_pt_iter = pt_iter_create(&my_playtree, config))) + if((pt_iter = pt_iter_create(&playtree, config))) { - while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + while ((filename = pt_iter_get_next_file(pt_iter)) != NULL) { - if (parse_filename(filename, my_playtree, config, 0)) + if (parse_filename(filename, playtree, config, 0)) added = TRUE; else if (import_file_into_gui(filename, 0)) /* Add it to end of list */ added = TRUE; @@ -883,12 +883,12 @@ The file which contained the playlist is thereby replaced with it's contents. */ case GUI_PLAYLIST_ADD: - if((my_pt_iter = pt_iter_create(&my_playtree, config))) + if((pt_iter = pt_iter_create(&playtree, config))) { - while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL) + while ((filename = pt_iter_get_next_file(pt_iter)) != NULL) if (import_file_into_gui(filename, 1)) /* insert it into the list and set plCurrent = new item */ added = TRUE; - pt_iter_destroy(&my_pt_iter); + pt_iter_destroy(&pt_iter); } break;