Mercurial > mplayer.hg
diff gui/ui/main.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 | 4ff933a89818 |
children | 697aaedfe59e |
line wrap: on
line diff
--- a/gui/ui/main.c Mon Feb 20 17:41:47 2012 +0000 +++ b/gui/ui/main.c Tue Feb 21 18:55:14 2012 +0000 @@ -111,7 +111,7 @@ nfree(guiInfo.Filename); nfree(guiInfo.SubtitleFilename); nfree(guiInfo.AudioFilename); - listMgr(gtkDelPl, NULL); + listMgr(PLAYLIST_DELETE, 0); } if (what & CLEAR_VCD) guiInfo.Tracks = 0; @@ -208,9 +208,9 @@ if ( ( msg == evPlaySwitchToPause )&&( guiInfo.Playing == GUI_PAUSE ) ) goto NoPause; - if ( listMgr( gtkGetCurrPlItem,NULL ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) + if ( listMgr( PLAYLIST_ITEM_GET_CURR,0 ) &&( guiInfo.StreamType == STREAMTYPE_FILE ) ) { - plItem * next = listMgr( gtkGetCurrPlItem,NULL ); + plItem * next = listMgr( PLAYLIST_ITEM_GET_CURR,0 ); plLastPlayed=next; uiSetFileName( next->path,next->name,SAME_STREAMTYPE ); } @@ -271,7 +271,7 @@ uiMainAutoPlay=1; // guiInfo.StreamType=STREAMTYPE_FILE; case evLoad: - listMgr( gtkDelPl,NULL ); + listMgr( PLAYLIST_DELETE,0 ); gtkShow( evLoad,NULL ); break; case evLoadSubtitle: gtkShow( evLoadSubtitle,NULL ); break; @@ -643,7 +643,7 @@ /* clear playlist */ if (filename == NULL) { filename = files[f]; - listMgr(gtkDelPl,NULL); + listMgr(PLAYLIST_DELETE,0); } item = calloc(1,sizeof(plItem)); @@ -658,7 +658,7 @@ item->name = strdup(str); item->path = strdup(""); } - listMgr(gtkAddPlItem,item); + listMgr(PLAYLIST_ITEM_ADD,item); } else { mp_msg( MSGT_GPLAYER,MSGL_WARN,MSGTR_NotAFile,str ); }