# HG changeset patch # User ib # Date 1301052505 0 # Node ID 21e0de9c355f3ce0d4fd47d14137c978a4ccd811 # Parent ba432e34dc7e5e575e8ef27a0605eb981b39a01e Show GUI message when GUI must exit. Besides, change exit() to exit_player(). diff -r ba432e34dc7e -r 21e0de9c355f gui/interface.c --- a/gui/interface.c Fri Mar 25 10:33:48 2011 +0000 +++ b/gui/interface.c Fri Mar 25 11:28:25 2011 +0000 @@ -219,12 +219,12 @@ switch (i) { case -1: - mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName); - exit(0); + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinNotFound, skinName); + exit_player(EXIT_ERROR); case -2: - mp_msg(MSGT_GPLAYER, MSGL_ERR, MSGTR_SKIN_SKINCFG_SkinCfgReadError, skinName); - exit(0); + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_SKIN_SKINCFG_SkinCfgReadError, skinName); + exit_player(EXIT_ERROR); } // initialize windows @@ -232,8 +232,8 @@ mplDrawBuffer = malloc(appMPlayer.main.Bitmap.ImageSize); if (!mplDrawBuffer) { - fprintf(stderr, MSGTR_NEMDB); // NOTE TO MYSELF: (g)mp_msg this - exit(0); + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); + exit_player(EXIT_ERROR); } if (gui_save_pos) { @@ -887,7 +887,7 @@ } if (!video_driver_list && !video_driver_list[0]) { - gtkMessageBox(GTK_MB_FATAL, MSGTR_IDFGCVD); + gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_IDFGCVD); exit_player(EXIT_ERROR); } diff -r ba432e34dc7e -r 21e0de9c355f gui/mplayer/pb.c --- a/gui/mplayer/pb.c Fri Mar 25 10:33:48 2011 +0000 +++ b/gui/mplayer/pb.c Fri Mar 25 11:28:25 2011 +0000 @@ -32,6 +32,7 @@ #include "gui/wm/ws.h" #include "help_mp.h" +#include "mp_core.h" #include "libvo/x11_common.h" #include "libvo/fastmemcpy.h" @@ -243,8 +244,8 @@ if ( ( mplPBDrawBuffer = malloc( appMPlayer.bar.Bitmap.ImageSize ) ) == NULL ) { - mp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB ); - exit( 0 ); + gmp_msg( MSGT_GPLAYER,MSGL_FATAL,MSGTR_NEMDB ); + exit_player( EXIT_ERROR ); } appMPlayer.barWindow.Parent=appMPlayer.subWindow.WindowID;