[MPlayer-cvslog] r33111 - in trunk/gui: interface.c mplayer/pb.c
ib
subversion at mplayerhq.hu
Fri Mar 25 12:28:26 CET 2011
Author: ib
Date: Fri Mar 25 12:28:25 2011
New Revision: 33111
Log:
Show GUI message when GUI must exit.
Besides, change exit() to exit_player().
Modified:
trunk/gui/interface.c
trunk/gui/mplayer/pb.c
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Fri Mar 25 11:33:48 2011 (r33110)
+++ trunk/gui/interface.c Fri Mar 25 12:28:25 2011 (r33111)
@@ -219,12 +219,12 @@ void guiInit(void)
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 @@ void guiInit(void)
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 @@ int guiGetEvent(int type, void *arg)
}
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);
}
Modified: trunk/gui/mplayer/pb.c
==============================================================================
--- trunk/gui/mplayer/pb.c Fri Mar 25 11:33:48 2011 (r33110)
+++ trunk/gui/mplayer/pb.c Fri Mar 25 12:28:25 2011 (r33111)
@@ -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 @@ void mplPBInit( void )
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;
More information about the MPlayer-cvslog
mailing list