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

Arpi of Ize arpi at mplayer.dev.hu
Sun Aug 26 02:28:58 CEST 2001


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

Modified Files:
	widgets.c psignal.c widgets.h 
Log Message:
gtk exit cleanup

Index: widgets.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- widgets.c	25 Aug 2001 23:17:13 -0000	1.2
+++ widgets.c	26 Aug 2001 00:28:56 -0000	1.3
@@ -4,6 +4,7 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/wait.h>
 #include <unistd.h>
 #include <string.h>
 #include <signal.h>
@@ -80,7 +81,7 @@
  gtkSendMessage( evGtkIsOk );
 
  gtk_main();
- dbprintf( 6,"[gtk] exit.\n" );
+ printf( "[gtk] exit.\n" );
  exit( 0 );
 }
 
@@ -93,10 +94,12 @@
  if ( ( gtkChildPID = fork() ) == 0 ) gtkThreadProc( argc,argv );
 }
 
-void gtkDone( void )
-{
+void gtkDone( void ){
+ int status;
+ gtkSendMessage(evExit);
+ usleep(50000); // 50ms should be enough!
+ printf("gtk killed...\n");
  kill( gtkChildPID,SIGKILL );
- usleep( 1000 );
 }
 
 void gtkMessageBox( gchar * str )
@@ -135,5 +138,3 @@
  if ( ( i=gtkFindCList( list,item ) ) > -1 ) gtk_clist_select_row( GTK_CLIST( list ),i,0 );
 }
 
-void gtkExit( void )
-{ gtk_main_quit(); }

Index: psignal.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/psignal.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- psignal.c	25 Aug 2001 21:04:28 -0000	1.1
+++ psignal.c	26 Aug 2001 00:28:56 -0000	1.2
@@ -147,7 +147,7 @@
         gtkVisibleAboutBox=1;
         break;
    case evExit:
-        gtkExit();
+	gtk_main_quit();
         break;
   }
  gtkShMem->message=0;

Index: widgets.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/widgets.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- widgets.h	25 Aug 2001 21:04:28 -0000	1.1
+++ widgets.h	26 Aug 2001 00:28:56 -0000	1.2
@@ -80,6 +80,5 @@
 extern void gtkClearList( GtkWidget * list );
 extern void gtkSetDefaultToCList( GtkWidget * list,char * item );
 extern int  gtkFindCList( GtkWidget * list,char * item );
-extern void gtkExit( void );
 
 #endif




More information about the MPlayer-cvslog mailing list