# HG changeset patch # User ib # Date 1326556957 0 # Node ID 70c63fd20b4b706423320cd95ef80cfaf1bbff8f # Parent 8e09f1cb3ecde1fd1fd3fe0fdca9afca26a95582 Use check items for audio, video and subtitle tracks. This way, the track being selected will be emphasized. diff -r 8e09f1cb3ecd -r 70c63fd20b4b gui/ui/gtk/menu.c --- a/gui/ui/gtk/menu.c Sat Jan 14 15:49:54 2012 +0000 +++ b/gui/ui/gtk/menu.c Sat Jan 14 16:02:37 2012 +0000 @@ -598,7 +598,7 @@ int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid; char tmp[32]; snprintf( tmp,32,MSGTR_MENU_Track,aid ); - AddMenuItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,( aid << 16 ) + ivSetAudio ); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,audio_id == aid,( aid << 16 ) + ivSetAudio ); } } @@ -614,7 +614,7 @@ int vid = ((sh_video_t *)demuxer->v_streams[i])->vid; char tmp[32]; snprintf( tmp,32,MSGTR_MENU_Track,vid ); - AddMenuItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,( vid << 16 ) + ivSetVideo ); + AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,video_id == vid,( vid << 16 ) + ivSetVideo ); } } } @@ -628,7 +628,7 @@ { char tmp[32]; snprintf( tmp, 32, MSGTR_MENU_Track, i ); - AddMenuItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,( i << 16 ) + ivSetSubtitle ); + AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,guiInfo.mpcontext->global_sub_pos == i,( i << 16 ) + ivSetSubtitle ); } }