changeset 34479:70c63fd20b4b

Use check items for audio, video and subtitle tracks. This way, the track being selected will be emphasized.
author ib
date Sat, 14 Jan 2012 16:02:37 +0000
parents 8e09f1cb3ecd
children 6c6fb701fa8e
files gui/ui/gtk/menu.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 );
      }
    }