[Mplayer-cvslog] CVS: main/Gui/mplayer psignal.h,1.1,1.2 psignal.c,1.3,1.4

Zoltan Ponekker pontscho at mplayer.dev.hu
Wed Aug 29 15:44:21 CEST 2001


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

Modified Files:
	psignal.h psignal.c 
Log Message:
fix sinal handling

Index: psignal.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- psignal.h	25 Aug 2001 21:04:28 -0000	1.1
+++ psignal.h	29 Aug 2001 13:44:12 -0000	1.2
@@ -46,8 +46,7 @@
 extern pid_t mplMPlayerPID;
 extern pid_t mplParentPID;
 
-extern pid_t gtkChildPID;
-extern pid_t gtkParentPID;
+extern pid_t gtkPID;
 
 extern void gtkSigHandler( int s );
 extern void mplPlayerSigHandler( int s );

Index: psignal.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- psignal.c	27 Aug 2001 23:56:43 -0000	1.3
+++ psignal.c	29 Aug 2001 13:44:12 -0000	1.4
@@ -28,8 +28,7 @@
 pid_t mplMPlayerPID = 0;
 pid_t mplParentPID = 0;
 
-pid_t gtkChildPID = 0;
-pid_t gtkParentPID = 0;
+pid_t gtkPID = 0;
 
 int mplCriticalError = 0;
 int gtkIsOk = 0;
@@ -46,9 +45,9 @@
  va_end( ap );
  mplCriticalError=critical;
  gtkMessageBox( p );
-// message( False,p );
 }
 
+/*
 void mplPlayerSigHandler( int s )
 {
  #ifdef DEBUG
@@ -91,6 +90,7 @@
   }
  mplShMem->message=0;
 }
+*/
 
 void gtkSigHandler( int s )
 {
@@ -137,6 +137,12 @@
         gtkVisibleFileSelect=1;
         gtkShow( evPlay );
         break;
+   case evFirstLoad:
+        if ( gtkVisibleFileSelect ) gtk_widget_hide( FileSelect );
+        gtk_widget_show( FileSelect );
+        gtkVisibleFileSelect=1;
+        gtkShow( evFirstLoad );
+        break;
    case evMessageBox:
         gtk_label_set_text( gtkMessageBoxText,(char *)gtkShMem->mb.str );
         gtk_widget_set_usize( MessageBox,gtkShMem->mb.sx,gtkShMem->mb.sy );
@@ -161,18 +167,18 @@
 
 void mplMainSigHandler( int s )
 {
+ if ( s != SIGTYPE ) return;
+
  #ifdef DEBUG
   if ( gtkShMem->message ) dbprintf( 5,"[psignal] main sig handler gtk msg: %d\n",gtkShMem->message );
-  if ( mplShMem->message ) dbprintf( 5,"[psignal] main sig handler mpl msg: %d\n",mplShMem->message );
+//  if ( mplShMem->message ) dbprintf( 5,"[psignal] main sig handler mpl msg: %d\n",mplShMem->message );
  #endif
 
- if ( s != SIGTYPE ) return;
-
  switch ( gtkShMem->message )
   {
    case evGtkIsOk:
         #ifdef DEBUG
-         dbprintf( 1,"[psignal] gtk is ok.\n" );
+         dbprintf( 5,"[psignal] gtk is ok.\n" );
         #endif
         gtkIsOk=True;
         break;
@@ -276,15 +282,15 @@
 //  {
 //  }
  gtkShMem->message=0;
- mplShMem->message=0;
+// mplShMem->message=0;
 }
 
 void mplSendMessage( int msg )
 {
  if ( !mplShMem->Playing ) return;
  mplShMem->message=msg;
- kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
- kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
+// kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
+// kill( mplMPlayerPID,SIGTYPE ); usleep( 10 );
  kill( mplMPlayerPID,SIGTYPE );
 }
 
@@ -292,5 +298,5 @@
 {
  if ( !gtkIsOk ) return;
  gtkShMem->message=msg;
- kill( gtkChildPID,SIGTYPE );
+ kill( gtkPID,SIGTYPE );
 }




More information about the MPlayer-cvslog mailing list