Mercurial > mplayer.hg
changeset 36261:ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
This is analogous to the video size menu.
author | ib |
---|---|
date | Sat, 13 Jul 2013 19:42:44 +0000 |
parents | a2750366a255 |
children | 703a51ce08c8 |
files | gui/dialog/menu.c |
diffstat | 1 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/dialog/menu.c Thu Jul 11 22:08:33 2013 +0000 +++ b/gui/dialog/menu.c Sat Jul 13 19:42:44 2013 +0000 @@ -578,13 +578,21 @@ // AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); // AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen + ( True << 16 ) ); -// if ( guiInfo.Playing ) + if ( guiInfo.VideoWindow ) { AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_MENU_AspectRatio ); - AddMenuItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_MENU_Original,evSetAspect + ( 1 << 16 ) ); - AddMenuItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9",evSetAspect + ( 2 << 16 ) ); - AddMenuItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3",evSetAspect + ( 3 << 16 ) ); - AddMenuItem( window1, (const char*)aspect235_xpm, AspectMenu,"2.35",evSetAspect + ( 4 << 16 ) ); + H=AddMenuItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_MENU_Original,evSetAspect + ( 1 << 16 ) ); + N=AddMenuItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9",evSetAspect + ( 2 << 16 ) ); + D=AddMenuItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3",evSetAspect + ( 3 << 16 ) ); + F=AddMenuItem( window1, (const char*)aspect235_xpm, AspectMenu,"2.35",evSetAspect + ( 4 << 16 ) ); + + if ( !guiInfo.Playing ) + { + gtk_widget_set_sensitive( H,FALSE ); + gtk_widget_set_sensitive( N,FALSE ); + gtk_widget_set_sensitive( D,FALSE ); + gtk_widget_set_sensitive( F,FALSE ); + } } if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD )