Mercurial > mplayer.hg
diff gui/interface.c @ 34663:73a5ecb53ee2
Replace symbolic constants by enums.
There is no relation to gtk whatsoever, use self-explanatory names
instead and add a doxygen comment.
For optical reasons, change parameter data from NULL to 0 where it
isn't used to pass anything.
| author | ib |
|---|---|
| date | Tue, 21 Feb 2012 18:55:14 +0000 |
| parents | 82d1cef6bcee |
| children | 4df4d842d5fb |
line wrap: on
line diff
--- a/gui/interface.c Mon Feb 20 17:41:47 2012 +0000 +++ b/gui/interface.c Tue Feb 21 18:55:14 2012 +0000 @@ -268,8 +268,8 @@ } appFreeStruct(); - listMgr(gtkDelPl, NULL); - listMgr(gtkDelURL, NULL); + listMgr(PLAYLIST_DELETE, 0); + listMgr(URLLIST_DELETE, 0); free(guiIcon.collection); if (gui_conf) { @@ -769,7 +769,7 @@ break; } - if (guiInfo.Playing && (next = listMgr(gtkGetNextPlItem, NULL)) && (plLastPlayed != next)) { + if (guiInfo.Playing && (next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0)) && (plLastPlayed != next)) { plLastPlayed = next; uiSetFileName(next->path, next->name, STREAMTYPE_FILE); guiInfo.NewPlay = GUI_FILE_NEW; @@ -850,9 +850,9 @@ item->path = pathname; if (insert) - listMgr(gtkInsertPlItem, item); // inserts the item after current, and makes current=item + listMgr(PLAYLIST_ITEM_INSERT, item); // inserts the item after current, and makes current=item else - listMgr(gtkAddPlItem, item); + listMgr(PLAYLIST_ITEM_ADD, item); return 1; } @@ -867,7 +867,7 @@ int result = 0; if (!enqueue) - listMgr(gtkDelPl, NULL); // delete playlist before "appending" + 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) @@ -896,7 +896,7 @@ int result = 0; plItem *save; - save = (plItem *)listMgr(gtkGetCurrPlItem, NULL); // 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) @@ -908,12 +908,12 @@ } if (save) - listMgr(gtkSetCurrPlItem, save); + listMgr(PLAYLIST_ITEM_SET_CURR, save); else - listMgr(gtkSetCurrPlItem, plList); // go to head, if plList was empty before + listMgr(PLAYLIST_ITEM_SET_CURR, plList); // go to head, if plList was empty before if (save && result) - listMgr(gtkDelCurrPlItem, NULL); + listMgr(PLAYLIST_ITEM_DEL_CURR, 0); uiCurr(); // update filename
