[MPlayer-cvslog] CVS: main/Gui/mplayer/gtk menu.c,1.33,1.34

Diego Biurrun CVS syncmail at mplayerhq.hu
Tue Jan 25 13:44:40 CET 2005


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var2/tmp/cvs-serv2433/Gui/mplayer/gtk

Modified Files:
	menu.c 
Log Message:
Add half size entry to the GMPlayer menu.
patch by Pierre Marc Dumuid <pierre dot dumuid at adelaide dot edu dot au>
approved by Pontscho


Index: menu.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/menu.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- menu.c	15 Nov 2004 10:00:58 -0000	1.33
+++ menu.c	25 Jan 2005 12:44:38 -0000	1.34
@@ -18,6 +18,7 @@
 #include "../../../libmpdemux/demuxer.h"
 
 #include "../pixmaps/ab.xpm"
+#include "../pixmaps/half.xpm"
 #include "../pixmaps/normal.xpm"
 #include "../pixmaps/double.xpm"
 #include "../pixmaps/fs.xpm"
@@ -391,7 +392,7 @@
  GtkWidget * Menu = NULL;
  GtkWidget * SubMenu = NULL;
  GtkWidget * MenuItem = NULL;
- GtkWidget * N, * D, * F;
+ GtkWidget * H, * N, * D, * F;
 
  Menu=gtk_menu_new();
  gtk_widget_realize (Menu);
@@ -579,14 +580,17 @@
 
   if ( guiIntfStruct.NoWindow == False )
    {
-    int b1 = 0, b2 = 0;
+    int b1 = 0, b2 = 0, b_half = 0;
     AddSeparator( Menu );
     if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing )
      {
       if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&& 
            ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1;
-	   else b1=1;
+      else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) && 
+                ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1;
+      else b1=1;
      } else b1=!appMPlayer.subWindow.isFullScreen;
+    H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
     N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize"      ",b1,evNormalSize );
     D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
     F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen );
@@ -594,6 +598,7 @@
 
   if ( !gtkShowVideoWindow && !guiIntfStruct.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 );




More information about the MPlayer-cvslog mailing list