changeset 4465:b013d01d9968

small bugfixes, and kill other warning
author pontscho
date Fri, 01 Feb 2002 16:34:22 +0000
parents 89369725b561
children bc7b7102c147
files Gui/mplayer/menu.h Gui/mplayer/mw.h Gui/mplayer/play.c Gui/mplayer/play.h Gui/mplayer/psignal.c Gui/wm/ws.c Gui/wm/ws.h
diffstat 7 files changed, 35 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/menu.h	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/mplayer/menu.h	Fri Feb 01 16:34:22 2002 +0000
@@ -11,7 +11,7 @@
 {
  unsigned long * buf = NULL;
  unsigned long * drw = NULL;
- unsigned long   x,y,tmp;
+ int             x,y,tmp;
 
  if ( !appMPlayer.menuBase.Bitmap.Image ) return;
  if ( !mplMenuRender && !appMPlayer.menuWindow.Visible ) return;
--- a/Gui/mplayer/mw.h	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/mplayer/mw.h	Fri Feb 01 16:34:22 2002 +0000
@@ -222,8 +222,8 @@
 #endif
    case evPlay:
    case evPlaySwitchToPause:
-        btnModify( evPlaySwitchToPause,btnDisabled );
-        btnModify( evPauseSwitchToPlay,btnReleased );
+//        btnModify( evPlaySwitchToPause,btnDisabled );
+//        btnModify( evPauseSwitchToPlay,btnReleased );
         if ( ( msg == evPlaySwitchToPause )&( mplShMem->Playing == 1 ) ) goto NoPause;
         mplMainRender=1;
 
@@ -241,6 +241,7 @@
 #endif
          }
         mplPlay();
+	mplState();
         break;
    case evSetDVDSubtitle:
 #ifdef USE_DVDREAD
@@ -292,10 +293,11 @@
 
    case evStop:
         IZE("evStop");
-        btnModify( evPlaySwitchToPause,btnReleased );
-        btnModify( evPauseSwitchToPlay,btnDisabled );
+//        btnModify( evPlaySwitchToPause,btnReleased );
+//        btnModify( evPauseSwitchToPlay,btnDisabled );
         mplMainRender=1;
         mplStop();
+	mplState();
         break;
 
    case evLoadPlay:
--- a/Gui/mplayer/play.c	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/mplayer/play.c	Fri Feb 01 16:34:22 2002 +0000
@@ -97,18 +97,33 @@
   {
    case 1: // playing
         mplShMem->Playing=2;
-	btnModify( evPlaySwitchToPause,btnReleased );
-	btnModify( evPauseSwitchToPlay,btnDisabled );
+//	btnModify( evPlaySwitchToPause,btnReleased );
+//	btnModify( evPauseSwitchToPlay,btnDisabled );
 	break;
-    case 2: // paused
+   case 2: // paused
 	mplShMem->Playing=1;
-	btnModify( evPlaySwitchToPause,btnDisabled );
-	btnModify( evPauseSwitchToPlay,btnReleased );
+//	btnModify( evPlaySwitchToPause,btnDisabled );
+//	btnModify( evPauseSwitchToPlay,btnReleased );
 	break;
   }
+ mplState();
  mplSubRender=0;
 }
 
+void mplState( void )
+{
+ if ( ( mplShMem->Playing == 0 )||( mplShMem->Playing == 2 ) )
+  {
+   btnModify( evPlaySwitchToPause,btnReleased );
+   btnModify( evPauseSwitchToPlay,btnDisabled );
+  }
+  else 
+   {
+    btnModify( evPlaySwitchToPause,btnDisabled );
+    btnModify( evPauseSwitchToPlay,btnReleased );
+   }
+}
+
 void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height )
 {
 // printf( "----resize---> %dx%d --- \n",width,height );
--- a/Gui/mplayer/play.h	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/mplayer/play.h	Fri Feb 01 16:34:22 2002 +0000
@@ -103,6 +103,7 @@
 extern void mplFullScreen( void );
 extern void mplPlay( void );
 extern void mplPause( void );
+extern void mplState( void );
 extern void mplResize( unsigned int X,unsigned int Y,unsigned int width,unsigned int height );
 extern void mplResizeToMovieSize( unsigned int width,unsigned int height );
 
--- a/Gui/mplayer/psignal.c	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/mplayer/psignal.c	Fri Feb 01 16:34:22 2002 +0000
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <signal.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #include "widgets.h"
 #include "gtk/menu.h"
--- a/Gui/wm/ws.c	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/wm/ws.c	Fri Feb 01 16:34:22 2002 +0000
@@ -42,8 +42,8 @@
 
 Atom                 wsMotifHints;
 
-unsigned int         wsMaxX         = 0; // Screen width.
-unsigned int         wsMaxY         = 0; // Screen height.
+int                  wsMaxX         = 0; // Screen width.
+int                  wsMaxY         = 0; // Screen height.
 
 Display            * wsDisplay;
 int                  wsScreen;
@@ -103,11 +103,13 @@
 
 void wsWindowDecoration( wsTWindow * win,long d )
 {
+#if 0
  MotifWmHints *hints = &wsMotifWmHints;
  Atom type;
  int format;
  unsigned long nitems;
  unsigned long bytes_after;
+#endif
 
  wsMotifHints=XInternAtom( wsDisplay,"_MOTIF_WM_HINTS",0 );
  if ( wsMotifHints == None ) return;
--- a/Gui/wm/ws.h	Fri Feb 01 13:45:06 2002 +0000
+++ b/Gui/wm/ws.h	Fri Feb 01 16:34:22 2002 +0000
@@ -161,8 +161,8 @@
  XColor               wsColor;
 } wsTWindow;
 
-extern unsigned int         wsMaxX;
-extern unsigned int         wsMaxY;
+extern int                  wsMaxX;
+extern int                  wsMaxY;
 
 extern Display            * wsDisplay;
 extern int                  wsScreen;