From 11b55ec7a89c8605401e40b6a4c56ca8971350da Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 14 Feb 2010 10:53:20 +0000 Subject: Fix exit_player() usage throughout the codebase. exit_player() was declared with differing parameter types in mplayer.c and mplayer.h. Make the declaration in the .h file match the one in the .c file and adjust all usages of exit_player() throughout the codebase. Also move the exit_player() declaration into mp_core.h next to exit_player_with_rc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30558 b3059339-0415-0410-9bf9-f77b7e298cf2 --- gui/interface.c | 3 ++- gui/mplayer/mw.c | 5 +++-- gui/mplayer/sw.c | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'gui') diff --git a/gui/interface.c b/gui/interface.c index 3351656d87..c78c2eafe2 100644 --- a/gui/interface.c +++ b/gui/interface.c @@ -37,6 +37,7 @@ #include "cfg.h" #include "help_mp.h" #include "get_path.h" +#include "mp_core.h" #include "libvo/x11_common.h" #include "libvo/video_out.h" #include "libvo/font_load.h" @@ -781,7 +782,7 @@ int guiGetEvent( int type,char * arg ) } } - if ( !video_driver_list && !video_driver_list[0] ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_IDFGCVD ); exit_player( "gui init" ); } + if ( !video_driver_list && !video_driver_list[0] ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_IDFGCVD ); exit_player(EXIT_ERROR); } { int i = 0; diff --git a/gui/mplayer/mw.c b/gui/mplayer/mw.c index 4e64af3a51..1445afe379 100644 --- a/gui/mplayer/mw.c +++ b/gui/mplayer/mw.c @@ -47,6 +47,7 @@ #include "codec-cfg.h" #include "m_option.h" #include "m_property.h" +#include "mp_core.h" #define GUI_REDRAW_WAIT 375 @@ -72,7 +73,7 @@ int i,pot = 0; void mplMainDraw( void ) { - if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); + if ( appMPlayer.mainWindow.State == wsWindowClosed ) exit_player( EXIT_QUIT ); if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible || !mainVisible ) return; @@ -102,7 +103,7 @@ void mplEventHandling( int msg,float param ) { // --- user events case evExit: - exit_player( "Exit" ); + exit_player( EXIT_QUIT ); break; case evPlayNetwork: diff --git a/gui/mplayer/sw.c b/gui/mplayer/sw.c index 349847b5b8..652fbaf761 100644 --- a/gui/mplayer/sw.c +++ b/gui/mplayer/sw.c @@ -24,6 +24,7 @@ #include "config.h" #include "libvo/x11_common.h" #include "help_mp.h" +#include "mp_core.h" #include "gmplayer.h" #include "gui/app.h" @@ -39,7 +40,7 @@ extern int i,pot; void mplSubDraw( void ) { - if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); + if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( EXIT_QUIT ); if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; if ( appMPlayer.subWindow.State == wsWindowFocusOut && metacity_hack != 3 ) SubVisible--; -- cgit v1.2.3