changeset 36622:b9dc795036a2

Group video and audio related entries in context menu together. This makes the menu more consistent and will give the user better orientation.
author ib
date Fri, 24 Jan 2014 01:00:35 +0000
parents 983bda573c61
children e0572501d2cd
files gui/dialog/menu.c
diffstat 1 files changed, 30 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- 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 );