[MPlayer-cvslog] r35605 - in trunk/gui: interface.c win32/interface.c
ib
subversion at mplayerhq.hu
Wed Dec 5 13:00:52 CET 2012
Author: ib
Date: Wed Dec 5 13:00:52 2012
New Revision: 35605
Log:
Cosmetic: Adjust indent.
Modified:
trunk/gui/interface.c
trunk/gui/win32/interface.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Wed Dec 5 12:51:08 2012 (r35604)
+++ trunk/gui/interface.c Wed Dec 5 13:00:52 2012 (r35605)
@@ -866,24 +866,24 @@ int guiPlaylist(int what, play_tree_t *m
// - appending it to gui pl (enqueue=1)
case GUI_PLAYLIST_INIT:
- if (!enqueue)
- listMgr(PLAYLIST_DELETE, 0); // delete playlist before "appending"
+ 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)
- /* add it to end of list */
- if (add_to_gui_playlist(filename, PLAYLIST_ITEM_APPEND))
- added = True;
- }
+ if ((my_pt_iter = pt_iter_create(&my_playtree, config))) {
+ while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+ /* add it to end of list */
+ if (add_to_gui_playlist(filename, PLAYLIST_ITEM_APPEND))
+ added = True;
+ }
- uiCurr(); // update filename
- guiInfo.PlaylistNext = True;
+ uiCurr(); // update filename
+ guiInfo.PlaylistNext = True;
- if (enqueue)
- filename = NULL; // don't start playing
+ if (enqueue)
+ filename = NULL; // don't start playing
- if (added)
- guiInfo.Track = 1;
+ if (added)
+ guiInfo.Track = 1;
break;
@@ -894,26 +894,26 @@ int guiPlaylist(int what, play_tree_t *m
// 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
+ save = (plItem *)listMgr(PLAYLIST_ITEM_GET_CURR, 0); // save current item
- if ((my_pt_iter = pt_iter_create(&my_playtree, config))) {
- while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
- /* insert it into the list and set plCurrent=new item */
- if (add_to_gui_playlist(filename, PLAYLIST_ITEM_INSERT))
- added = True;
+ if ((my_pt_iter = pt_iter_create(&my_playtree, config))) {
+ while ((filename = pt_iter_get_next_file(my_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(&my_pt_iter);
+ }
- if (save)
- listMgr(PLAYLIST_ITEM_SET_CURR, save);
- else
- listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); // go to head, if plList was empty before
+ if (save)
+ listMgr(PLAYLIST_ITEM_SET_CURR, save);
+ else
+ listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0)); // go to head, if plList was empty before
- if (save && added)
- listMgr(PLAYLIST_ITEM_DEL_CURR, 0);
+ if (save && added)
+ listMgr(PLAYLIST_ITEM_DEL_CURR, 0);
- uiCurr(); // update filename
+ uiCurr(); // update filename
break;
}
Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c Wed Dec 5 12:51:08 2012 (r35604)
+++ trunk/gui/win32/interface.c Wed Dec 5 13:00:52 2012 (r35605)
@@ -849,49 +849,49 @@ int guiPlaylist (int what, play_tree_t *
switch (what)
{
-/* This function imports the initial playtree (based on cmd-line files) into the gui playlist
- by either:
- - overwriting gui pl (enqueue=0) */
- case GUI_PLAYLIST_INIT:
+ /* This function imports the initial playtree (based on cmd-line files) into the gui playlist
+ by either:
+ - overwriting gui pl (enqueue=0) */
+ case GUI_PLAYLIST_INIT:
- if(!mygui) guiInit();
+ if(!mygui) guiInit();
- if((my_pt_iter = pt_iter_create(&my_playtree, config)))
- {
- while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
- {
- if (parse_filename(filename, my_playtree, config, 0))
- added = TRUE;
- else if (import_file_into_gui(filename, 0)) /* Add it to end of list */
- added = TRUE;
- }
- }
- guiInfo.PlaylistNext = TRUE;
+ if((my_pt_iter = pt_iter_create(&my_playtree, config)))
+ {
+ while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+ {
+ if (parse_filename(filename, my_playtree, config, 0))
+ added = TRUE;
+ else if (import_file_into_gui(filename, 0)) /* Add it to end of list */
+ added = TRUE;
+ }
+ }
+ guiInfo.PlaylistNext = TRUE;
- if (added)
- {
- mygui->playlist->current = 0;
- uiSetFile(NULL, mygui->playlist->tracks[0]->filename, STREAMTYPE_FILE);
- }
+ if (added)
+ {
+ mygui->playlist->current = 0;
+ uiSetFile(NULL, mygui->playlist->tracks[0]->filename, STREAMTYPE_FILE);
+ }
- if (enqueue) filename = NULL;
+ if (enqueue) filename = NULL;
- break;
+ break;
-/* This function imports and inserts an playtree, that is created "on the fly", for example by
- parsing some MOV-Reference-File; or by loading an playlist with "File Open"
- The file which contained the playlist is thereby replaced with it's contents. */
+ /* This function imports and inserts an playtree, that is created "on the fly", for example by
+ parsing some MOV-Reference-File; or by loading an playlist with "File Open"
+ 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)))
- {
- while ((filename = pt_iter_get_next_file(my_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);
- }
+ if((my_pt_iter = pt_iter_create(&my_playtree, config)))
+ {
+ while ((filename = pt_iter_get_next_file(my_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);
+ }
- break;
+ break;
}
return added;
More information about the MPlayer-cvslog
mailing list