# HG changeset patch # User ib # Date 1390525235 0 # Node ID b9dc795036a296c96291658ba6ad82005005fd62 # Parent 983bda573c610f4fc9fd577ccd06348357a93c72 Group video and audio related entries in context menu together. This makes the menu more consistent and will give the user better orientation. diff -r 983bda573c61 -r b9dc795036a2 gui/dialog/menu.c --- a/gui/dialog/menu.c Fri Jan 24 00:28:04 2014 +0000 +++ b/gui/dialog/menu.c Fri Jan 24 01:00:35 2014 +0000 @@ -589,7 +589,7 @@ if ( guiInfo.VideoWindow ) { int a11 = False, a169 = False, a43 = False, a235 = False; - + AddSeparator( Menu ); if (movie_aspect == -1.0f) a11 = True; else { @@ -613,6 +613,35 @@ } } + if ( guiInfo.VideoWindow ) + { + int b1 = False, b2 = False, b_half = False; + + if ( !guiApp.videoWindow.isFullScreen && guiInfo.Playing ) + { + if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth * 2 )&& + ( guiApp.videoWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=True; + else if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth / 2 ) && + ( guiApp.videoWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=True; + else b1=( guiApp.videoWindow.Width == guiInfo.VideoWidth && guiApp.videoWindow.Height == guiInfo.VideoHeight ); + } else b1=!guiApp.videoWindow.isFullScreen; + F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) ); + D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); + N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); + H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize ); + 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 ); + } + } + + AddSeparator( Menu ); + MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); + if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE ); + if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD ) { int i,c = 0; @@ -666,34 +695,7 @@ } } - if ( guiInfo.VideoWindow ) - { - int b1 = False, b2 = False, b_half = False; - AddSeparator( Menu ); - if ( !guiApp.videoWindow.isFullScreen && guiInfo.Playing ) - { - if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth * 2 )&& - ( guiApp.videoWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=True; - else if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth / 2 ) && - ( guiApp.videoWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=True; - else b1=( guiApp.videoWindow.Width == guiInfo.VideoWidth && guiApp.videoWindow.Height == guiInfo.VideoHeight ); - } else b1=!guiApp.videoWindow.isFullScreen; - F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) ); - D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); - N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); - H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize ); - 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 ); - } - } - AddSeparator( Menu ); - MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute ); - if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE ); AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_Equalizer, evEqualizer ); AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_MENU_PlayList, evPlaylist ); AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser );