[Mplayer-cvslog] CVS: main/Gui app.c,1.21,1.22 cfg.c,1.34,1.35 cfg.h,1.13,1.14 interface.c,1.76,1.77

Zoltan Ponekker pontscho at mplayerhq.hu
Sat Feb 1 17:42:32 CET 2003


Update of /cvsroot/mplayer/main/Gui
In directory mail:/var/tmp.root/cvs-serv8400/Gui

Modified Files:
	app.c cfg.c cfg.h interface.c 
Log Message:


- rewrite Jan Spitalnik's patch
- fix some nice 10l


Index: app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- app.c	19 Jan 2003 22:46:39 -0000	1.21
+++ app.c	1 Feb 2003 16:41:39 -0000	1.22
@@ -210,6 +210,9 @@
 {
  int j;
  for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
-   if ( appMPlayer.Items[j].msg == event ) appMPlayer.Items[j].pressed=set;
+   if ( appMPlayer.Items[j].msg == event )
+    { appMPlayer.Items[j].pressed=set; appMPlayer.barItems[j].tmp=0; }
+ for ( j=0;j<appMPlayer.NumberOfBarItems + 1;j++ )
+   if ( appMPlayer.barItems[j].msg == event )
+    { appMPlayer.barItems[j].pressed=set; appMPlayer.barItems[j].tmp=0; } 
 }
-												    
\ No newline at end of file

Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- cfg.c	21 Jan 2003 19:12:45 -0000	1.34
+++ cfg.c	1 Feb 2003 16:41:39 -0000	1.35
@@ -57,6 +57,7 @@
 int    gtkSubDumpSrt = 0;
 
 int    gtkLoadFullscreen = 0;
+int    gtkShowVideoWindow = 1;
 int    gtkEnablePlayBar = 1;
 
 // ---
@@ -133,6 +134,7 @@
 
  { "playbar",&gtkEnablePlayBar,CONF_TYPE_FLAG,0,0,1,NULL }, 
  { "load_fullscreen",&gtkLoadFullscreen,CONF_TYPE_FLAG,0,0,1,NULL },
+ { "show_videowin", &gtkShowVideoWindow,CONF_TYPE_FLAG,0,0,1,NULL },
  { "stopxscreensaver",&stop_xscreensaver,CONF_TYPE_FLAG,0,0,1,NULL },
 
  { "autosync",&gtkAutoSyncOn,CONF_TYPE_FLAG,0,0,1,NULL },

Index: cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- cfg.h	17 Jan 2003 22:39:38 -0000	1.13
+++ cfg.h	1 Feb 2003 16:41:39 -0000	1.14
@@ -39,6 +39,7 @@
 extern char * gtkEquChannel5;
 extern char * gtkEquChannel6;
 extern int    gtkLoadFullscreen;
+extern int    gtkShowVideoWindow;
 extern int    gtkEnablePlayBar;
 
 extern int cfg_read( void );

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- interface.c	25 Jan 2003 10:03:57 -0000	1.76
+++ interface.c	1 Feb 2003 16:41:39 -0000	1.77
@@ -193,10 +193,10 @@
    fprintf( stderr,MSGTR_NEMDB );
    exit( 0 );
   }
-
+ 
  wsCreateWindow( &appMPlayer.subWindow,
   appMPlayer.sub.x,appMPlayer.sub.y,appMPlayer.sub.width,appMPlayer.sub.height,
-  wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"ViDEO" );
+  wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,wsShowFrame|wsHideWindow,"MPlayer - Video" );
 
  wsDestroyImage( &appMPlayer.subWindow );
  wsCreateImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
@@ -249,7 +249,7 @@
  if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
  
  wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
-#if 1
+#if 0
  wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
 
  {
@@ -264,6 +264,38 @@
    mplFullScreen();
    btnModify( evFullScreen,btnPressed );
   }
+#else
+ if ( gtkShowVideoWindow )
+ {
+       wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
+       {
+        XEvent xev;
+        do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID );
+        appMPlayer.subWindow.Mapped=wsMapped;
+   }
+
+       if ( fullscreen )
+       {
+        mplFullScreen();
+        btnModify( evFullScreen,btnPressed );
+       }
+ }
+ else
+ {
+       if ( fullscreen )
+       {
+         wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
+         {
+          XEvent xev;
+          do { XNextEvent( wsDisplay,&xev ); } while ( xev.type != MapNotify || xev.xmap.event != appMPlayer.subWindow.WindowID );
+          appMPlayer.subWindow.Mapped=wsMapped;
+         }
+         wsVisibleWindow( &appMPlayer.subWindow, wsShowWindow );
+
+          mplFullScreen();
+          btnModify( evFullScreen,btnPressed );
+         }
+ }
 #endif
  mplSubRender=1;
 // ---
@@ -442,8 +474,14 @@
    case guiCEvent:
         switch ( (int)arg )
 	 {
-          case guiSetPlay:  guiIntfStruct.Playing=1; break;
-          case guiSetStop:  guiIntfStruct.Playing=0; break;
+	  case guiSetPlay: 
+	       guiIntfStruct.Playing=1;
+	       if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+	       break;
+	  case guiSetStop:
+	       guiIntfStruct.Playing=0;
+	       if ( !gtkShowVideoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+	       break;
           case guiSetPause: guiIntfStruct.Playing=2; break;
 	 }
 	mplState();



More information about the MPlayer-cvslog mailing list