changeset 34555:da67e2df97be

Emphasize the default audio track in the selection list.
author ib
date Tue, 31 Jan 2012 18:17:17 +0000
parents 8f2e2ea80a3d
children 7e3b96b760ae
files gui/ui/gtk/menu.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/gtk/menu.c	Tue Jan 31 12:11:46 2012 +0000
+++ b/gui/ui/gtk/menu.c	Tue Jan 31 18:17:17 2012 +0000
@@ -596,9 +596,10 @@
        if ( demuxer->a_streams[i] )
         {
          int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
+         int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(mpctx_get_demuxer(guiInfo.mpcontext))));
          char tmp[32];
          snprintf( tmp,32,MSGTR_MENU_Track,aid );
-         AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,audio_id == aid,( aid << 16 ) + ivSetAudio );
+         AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( aid << 16 ) + ivSetAudio );
         }
      }