[MPlayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.36,1.37
Guillaume Poirier CVS
syncmail at mplayerhq.hu
Sun Apr 16 18:58:38 CEST 2006
CVS change done by Guillaume Poirier CVS
Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var2/tmp/cvs-serv15879/Gui/mplayer/gtk
Modified Files:
menu.c
Log Message:
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
Patch by Stanislav Maslovski <stanislav POIS maslovski AH gmail POIS com>
Original thread:
Date: Apr 12, 2006 1:50 PM
Subject: [MPlayer-dev-eng] [PATCH] GUI: add cheap subtitle switching for non-DVD
Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/menu.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- menu.c 15 Dec 2005 20:39:59 -0000 1.36
+++ menu.c 16 Apr 2006 16:58:36 -0000 1.37
@@ -377,6 +377,8 @@
return NULL;
}
+extern int global_sub_size;
+
GtkWidget * DVDSubMenu;
GtkWidget * DVDTitleMenu;
GtkWidget * DVDChapterMenu;
@@ -569,6 +571,20 @@
}
}
}
+
+ /* cheap subtitle switching for non-DVD streams */
+ if ( global_sub_size && guiIntfStruct.StreamType != STREAMTYPE_DVD )
+ {
+ int i;
+ SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles );
+ AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle );
+ for ( i=0;i < global_sub_size;i++ )
+ {
+ char tmp[32];
+ snprintf( tmp, 32, MSGTR_MENU_Track, i );
+ AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle );
+ }
+ }
AddSeparator( Menu );
MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer.muted,evMute );
More information about the MPlayer-cvslog
mailing list