Mercurial > mplayer.hg
changeset 1700:a0f28ba7c34a
gtk exit cleanup
author | arpi |
---|---|
date | Sun, 26 Aug 2001 00:28:56 +0000 |
parents | 7ddc63b84f1f |
children | 7955814db4c7 |
files | Gui/mplayer/psignal.c Gui/mplayer/widgets.c Gui/mplayer/widgets.h |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/mplayer/psignal.c Sat Aug 25 23:18:17 2001 +0000 +++ b/Gui/mplayer/psignal.c Sun Aug 26 00:28:56 2001 +0000 @@ -147,7 +147,7 @@ gtkVisibleAboutBox=1; break; case evExit: - gtkExit(); + gtk_main_quit(); break; } gtkShMem->message=0;
--- a/Gui/mplayer/widgets.c Sat Aug 25 23:18:17 2001 +0000 +++ b/Gui/mplayer/widgets.c Sun Aug 26 00:28:56 2001 +0000 @@ -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(); }
--- a/Gui/mplayer/widgets.h Sat Aug 25 23:18:17 2001 +0000 +++ b/Gui/mplayer/widgets.h Sun Aug 26 00:28:56 2001 +0000 @@ -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 \ No newline at end of file