Mercurial > mplayer.hg
comparison gui/dialog/menu.c @ 36458:4634a3085efc
Add mpctx_get_global_sub_pos().
This avoids direct context access.
author | ib |
---|---|
date | Tue, 17 Dec 2013 22:31:30 +0000 |
parents | 28ea255e40ce |
children | 426713eff5fd |
comparison
equal
deleted
inserted
replaced
36457:31120561a9da | 36458:4634a3085efc |
---|---|
652 } | 652 } |
653 | 653 |
654 /* cheap subtitle switching for non-DVD streams */ | 654 /* cheap subtitle switching for non-DVD streams */ |
655 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD ) | 655 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD ) |
656 { | 656 { |
657 int i; | 657 int pos, i; |
658 pos = mpctx_get_global_sub_pos(guiInfo.mpcontext); | |
658 SubMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu, MSGTR_MENU_Subtitles ); | 659 SubMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu, MSGTR_MENU_Subtitles ); |
659 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu, MSGTR_MENU_None, guiInfo.mpcontext->global_sub_pos == -1, (-1 << 16) + ivSetSubtitle ); | 660 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu, MSGTR_MENU_None, pos == -1, (-1 << 16) + ivSetSubtitle ); |
660 for ( i=0;i < global_sub_size;i++ ) | 661 for ( i=0;i < global_sub_size;i++ ) |
661 { | 662 { |
662 char tmp[32]; | 663 char tmp[32]; |
663 snprintf( tmp, 32, MSGTR_MENU_Track, i ); | 664 snprintf( tmp, 32, MSGTR_MENU_Track, i ); |
664 AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,guiInfo.mpcontext->global_sub_pos == i,( i << 16 ) + ivSetSubtitle ); | 665 AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,pos == i,( i << 16 ) + ivSetSubtitle ); |
665 } | 666 } |
666 } | 667 } |
667 | 668 |
668 AddSeparator( Menu ); | 669 AddSeparator( Menu ); |
669 MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); | 670 MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); |