aboutsummaryrefslogtreecommitdiffhomepage
path: root/Gui
diff options
context:
space:
mode:
authorGravatar gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-20 18:52:55 +0000
committerGravatar gpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-08-20 18:52:55 +0000
commit18f18eb2dc52be942b133927cb76c0e17ef742e8 (patch)
treec9b7b5daf252d846e6f99e404a2c591cbe7da26b /Gui
parentc940e28bfb0cb186887c69587c7be9cb8a82c448 (diff)
Fix audio stream selection in Gtk GUI
Patch by Rich % rincebrain A gmail P com % Original Thred: Date: Aug 19, 2006 11:33 AM Subject: [MPlayer-dev-eng] [PATCH] Fix audio stream selection in Gtk GUI git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19467 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/mplayer/gtk/menu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c
index caf23f9c0c..42ae7db7e2 100644
--- a/Gui/mplayer/gtk/menu.c
+++ b/Gui/mplayer/gtk/menu.c
@@ -546,13 +546,20 @@ GtkWidget * create_PopUpMenu( void )
if ( c > 1 )
{
+ int basedec = 0;
+ int setdec = 0;
SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack );
for ( i=0;i < MAX_A_STREAMS;i++ )
if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] )
{
char tmp[32];
- snprintf( tmp,32,MSGTR_MENU_Track,i );
- AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( i << 16 ) + evSetAudio );
+ if (!(setdec) )
+ {
+ basedec = (i > 1 ? i : 1);
+ setdec = 1;
+ }
+ snprintf( tmp,32,MSGTR_MENU_Track,(i-(basedec-1)) );
+ AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( (i-basedec) << 16 ) + evSetAudio );
}
}