From 3b31fa5717f26ac8de703ed2681c9e42ac181e60 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 30 Jul 2008 13:44:59 +0000 Subject: Rename two GUI-related preprocessor directives: HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27375 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-mplayer.h | 2 +- codec-cfg.c | 2 +- command.c | 8 ++++---- configure | 18 +++++++++--------- gui/mplayer/gtk/about.c | 8 ++++---- gui/mplayer/gtk/opts.c | 2 +- gui/mplayer/widgets.c | 2 +- help/help_mp-bg.h | 2 +- help/help_mp-cs.h | 2 +- help/help_mp-dk.h | 2 +- help/help_mp-el.h | 2 +- help/help_mp-es.h | 2 +- help/help_mp-fr.h | 2 +- help/help_mp-it.h | 2 +- help/help_mp-ja.h | 2 +- help/help_mp-ko.h | 2 +- help/help_mp-mk.h | 2 +- help/help_mp-nb.h | 2 +- help/help_mp-nl.h | 2 +- help/help_mp-pl.h | 2 +- help/help_mp-pt_BR.h | 2 +- help/help_mp-ro.h | 2 +- help/help_mp-ru.h | 2 +- help/help_mp-sk.h | 2 +- help/help_mp-sv.h | 2 +- help/help_mp-tr.h | 2 +- help/help_mp-uk.h | 2 +- help/help_mp-zh_TW.h | 2 +- input/input.c | 6 +++--- libvo/mga_common.c | 2 +- libvo/vo_directx.c | 4 ++-- libvo/vo_dxr3.c | 12 ++++++------ libvo/vo_gl.c | 4 ++-- libvo/vo_gl2.c | 6 +++--- libvo/vo_x11.c | 4 ++-- libvo/vo_xmga.c | 4 ++-- libvo/vo_xover.c | 6 +++--- libvo/vo_xv.c | 4 ++-- libvo/vo_xvidix.c | 6 +++--- libvo/vo_xvmc.c | 4 ++-- libvo/x11_common.c | 16 ++++++++-------- mp_msg.c | 6 +++--- mpcommon.c | 12 ++++++------ mplayer.c | 50 ++++++++++++++++++++++++------------------------- stream/cache2.c | 2 +- 45 files changed, 116 insertions(+), 116 deletions(-) diff --git a/cfg-mplayer.h b/cfg-mplayer.h index b6ab021ea7..246c8892d9 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -307,7 +307,7 @@ const m_option_t mplayer_opts[]={ {"gui", "The -gui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, {"nogui", "The -nogui option will only work as the first command line argument.\n", CONF_TYPE_PRINT, 0, 0, 0, (void *)1}, -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI {"skin", &skinName, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, {"enqueue", &enqueue, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noenqueue", &enqueue, CONF_TYPE_FLAG, 0, 1, 0, NULL}, diff --git a/codec-cfg.c b/codec-cfg.c index e293fb85dc..221c88dd18 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -883,7 +883,7 @@ void list_codecs(int audioflag){ /* * Fake out GUI references when building the codecs2html utility. */ -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI void gtkMessageBox( int type,char * str ) { return; } int use_gui = 0; #endif diff --git a/command.c b/command.c index 61de8e68dc..2aba3dd474 100644 --- a/command.c +++ b/command.c @@ -54,7 +54,7 @@ #include "m_struct.h" #include "libmenu/menu.h" #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -970,7 +970,7 @@ static int mp_property_fullscreen(m_option_t * prop, int action, void *arg, return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiIEvent, (char *) MP_CMD_GUI_FULLSCREEN); else @@ -2484,7 +2484,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) int n = cmd->args[0].v.i == 0 ? 1 : cmd->args[0].v.i; int force = cmd->args[1].v.i; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { int i = 0; if (n > 0) @@ -3160,7 +3160,7 @@ int run_command(MPContext * mpctx, mp_cmd_t * cmd) #endif default: -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ((use_gui) && (cmd->id > MP_CMD_GUI_EVENTS)) guiGetEvent(guiIEvent, (char *) cmd->id); else diff --git a/configure b/configure index bacca08721..f24e58c361 100755 --- a/configure +++ b/configure @@ -7410,8 +7410,8 @@ if test "$_gtk1" = no ; then _libs_mplayer="$_libs_mplayer `$_pkg_config glib-2.0 --libs 2>/dev/null`" echores "$_glib" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#define HAVE_GTK2_GUI 1' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#define CONFIG_GTK2 1' else _gtk1=yes echo "GLIB-2 devel packages were not found, trying GTK 1.2" @@ -7454,20 +7454,20 @@ if test "$_gtk1" = yes ; then _libs_mplayer="$_libs_mplayer `$_glibconfig --libs 2>&1`" echores "$_glib (using $_glibconfig)" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#undef CONFIG_GTK2' fi else #if ! win32 _gui_win32=yes _libs_mplayer="$_libs_mplayer -lcomdlg32 -lcomctl32 -lshell32 -lkernel32" - _def_gui='#define HAVE_NEW_GUI 1' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#define CONFIG_GUI 1' + _def_gtk2='#undef CONFIG_GTK2' fi #if ! win32 else #if test "$_gui" - _def_gui='#undef HAVE_NEW_GUI' - _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _def_gui='#undef CONFIG_GUI' + _def_gtk2='#undef CONFIG_GTK2' fi #if test "$_gui" # --------------- GUI specific tests end ------------------- @@ -8345,7 +8345,7 @@ $_def_unrar_exec /* gui support, please do not edit this option */ $_def_gui -$_def_gtk2_gui +$_def_gtk2 /* Audio output drivers */ $_def_ossaudio diff --git a/gui/mplayer/gtk/about.c b/gui/mplayer/gtk/about.c index ccb04ff8ad..d14d449e5f 100644 --- a/gui/mplayer/gtk/about.c +++ b/gui/mplayer/gtk/about.c @@ -45,10 +45,10 @@ GtkWidget * create_About( void ) GtkWidget * AboutText; GtkWidget * Ok; -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 GtkTextBuffer * AboutTextBuffer; GtkTextIter iter; -#endif //HAVE_GTK2_GUI +#endif /* CONFIG_GTK2 */ GtkStyle * pixmapstyle; GdkPixmap * pixmapwid; @@ -89,7 +89,7 @@ GtkWidget * create_About( void ) gtk_box_pack_start( GTK_BOX( vbox ),scrolledwindow1,TRUE,TRUE,0 ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 AboutText = gtk_text_view_new(); gtk_text_view_set_editable(GTK_TEXT_VIEW(AboutText), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(AboutText), FALSE); @@ -102,7 +102,7 @@ GtkWidget * create_About( void ) gtk_widget_set_name( AboutText,"AboutText" ); gtk_widget_show( AboutText ); gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 gtk_text_buffer_insert (AboutTextBuffer, &iter, #else gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c index feb189171b..8e78dcb53d 100644 --- a/gui/mplayer/gtk/opts.c +++ b/gui/mplayer/gtk/opts.c @@ -782,7 +782,7 @@ static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,g !strncmp( ao_driver[0],"esd",3 ) || !strncmp( ao_driver[0],"sdl",3 ) ) gtk_widget_set_sensitive( AConfig,TRUE ); -#ifndef HAVE_GTK2_GUI +#ifndef CONFIG_GTK2 if ( !strncmp( ao_driver[0],"arts",4 ) ) gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken); #endif diff --git a/gui/mplayer/widgets.c b/gui/mplayer/widgets.c index bf3dd61989..0cf3c1fbd9 100644 --- a/gui/mplayer/widgets.c +++ b/gui/mplayer/widgets.c @@ -76,7 +76,7 @@ Pixmap guiIconMask; void gtkInit( void ) { mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[widget] init GTK ...\n" ); -#ifdef HAVE_GTK2_GUI +#ifdef CONFIG_GTK2 gtk_disable_setlocale(); #endif gtk_init( 0,NULL ); diff --git a/help/help_mp-bg.h b/help/help_mp-bg.h index 5cadb0b45e..47e393b1be 100644 --- a/help/help_mp-bg.h +++ b/help/help_mp-bg.h @@ -565,7 +565,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Информация" diff --git a/help/help_mp-cs.h b/help/help_mp-cs.h index c6772f6a49..635173d71a 100644 --- a/help/help_mp-cs.h +++ b/help/help_mp-cs.h @@ -705,7 +705,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O aplikaci" diff --git a/help/help_mp-dk.h b/help/help_mp-dk.h index fae973d53c..a3b5472153 100644 --- a/help/help_mp-dk.h +++ b/help/help_mp-dk.h @@ -332,7 +332,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-el.h b/help/help_mp-el.h index b3f05b8a20..e7a3a3fcb2 100644 --- a/help/help_mp-el.h +++ b/help/help_mp-el.h @@ -342,7 +342,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Περί" diff --git a/help/help_mp-es.h b/help/help_mp-es.h index d4cb70fd81..f0303fa3a5 100644 --- a/help/help_mp-es.h +++ b/help/help_mp-es.h @@ -711,7 +711,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Acerca de" diff --git a/help/help_mp-fr.h b/help/help_mp-fr.h index fd0369bf18..7389a82b7d 100644 --- a/help/help_mp-fr.h +++ b/help/help_mp-fr.h @@ -709,7 +709,7 @@ static char help_text[]= // ====================== messages/boutons GUI ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "À propos..." diff --git a/help/help_mp-it.h b/help/help_mp-it.h index dda7a009b8..9bdd4195f2 100644 --- a/help/help_mp-it.h +++ b/help/help_mp-it.h @@ -717,7 +717,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Informazioni su" diff --git a/help/help_mp-ja.h b/help/help_mp-ja.h index 7c9cfd3aee..f7355685a3 100644 --- a/help/help_mp-ja.h +++ b/help/help_mp-ja.h @@ -273,7 +273,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "アバウト" diff --git a/help/help_mp-ko.h b/help/help_mp-ko.h index 878c985f68..0fb904e0a8 100644 --- a/help/help_mp-ko.h +++ b/help/help_mp-ko.h @@ -336,7 +336,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "정보" diff --git a/help/help_mp-mk.h b/help/help_mp-mk.h index 7913d64090..8d590ec552 100644 --- a/help/help_mp-mk.h +++ b/help/help_mp-mk.h @@ -333,7 +333,7 @@ static char help_text[]= // ====================== GUI пораки/копчиња ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- лабели --- #define MSGTR_About "За" diff --git a/help/help_mp-nb.h b/help/help_mp-nb.h index 0c9d866865..9e6c860c12 100644 --- a/help/help_mp-nb.h +++ b/help/help_mp-nb.h @@ -164,7 +164,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-nl.h b/help/help_mp-nl.h index 7c40863786..003b0fb65e 100644 --- a/help/help_mp-nl.h +++ b/help/help_mp-nl.h @@ -550,7 +550,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Info over" diff --git a/help/help_mp-pl.h b/help/help_mp-pl.h index 16938f2789..2c1f9ef2b3 100644 --- a/help/help_mp-pl.h +++ b/help/help_mp-pl.h @@ -673,7 +673,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O programie" diff --git a/help/help_mp-pt_BR.h b/help/help_mp-pt_BR.h index a133e6cd69..9d3481c16a 100644 --- a/help/help_mp-pt_BR.h +++ b/help/help_mp-pt_BR.h @@ -337,7 +337,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Sobre" diff --git a/help/help_mp-ro.h b/help/help_mp-ro.h index 1912c0525b..61641ebf9e 100644 --- a/help/help_mp-ro.h +++ b/help/help_mp-ro.h @@ -291,7 +291,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Despre MPlayer" diff --git a/help/help_mp-ru.h b/help/help_mp-ru.h index c91dd9294e..ff6f6f960f 100644 --- a/help/help_mp-ru.h +++ b/help/help_mp-ru.h @@ -715,7 +715,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "О себе" diff --git a/help/help_mp-sk.h b/help/help_mp-sk.h index 46e9f4be0c..64b0bd8e81 100644 --- a/help/help_mp-sk.h +++ b/help/help_mp-sk.h @@ -656,7 +656,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "O aplikácii" diff --git a/help/help_mp-sv.h b/help/help_mp-sv.h index 8ea80bacae..94d1f192c2 100644 --- a/help/help_mp-sv.h +++ b/help/help_mp-sv.h @@ -563,7 +563,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Om" diff --git a/help/help_mp-tr.h b/help/help_mp-tr.h index 9bf05d4ef8..22a58bcd66 100644 --- a/help/help_mp-tr.h +++ b/help/help_mp-tr.h @@ -719,7 +719,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Hakkında" diff --git a/help/help_mp-uk.h b/help/help_mp-uk.h index 837668806a..9481918d12 100644 --- a/help/help_mp-uk.h +++ b/help/help_mp-uk.h @@ -323,7 +323,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "Про програму" diff --git a/help/help_mp-zh_TW.h b/help/help_mp-zh_TW.h index 59fabaa60b..a1050cf5fa 100644 --- a/help/help_mp-zh_TW.h +++ b/help/help_mp-zh_TW.h @@ -692,7 +692,7 @@ static char help_text[]= // ====================== GUI messages/buttons ======================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // --- labels --- #define MSGTR_About "關于" diff --git a/input/input.c b/input/input.c index 75e355b851..2e26c2b7b0 100644 --- a/input/input.c +++ b/input/input.c @@ -159,7 +159,7 @@ static const mp_cmd_t mp_cmds[] = { { MP_CMD_TV_TELETEXT_GO_LINK, "teletext_go_link", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } }, #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI { MP_CMD_GUI_LOADFILE, "gui_loadfile", 0, { {-1,{0}} } }, { MP_CMD_GUI_LOADSUBTITLE, "gui_loadsubtitle", 0, { {-1,{0}} } }, { MP_CMD_GUI_ABOUT, "gui_about", 0, { {-1,{0}} } }, @@ -480,7 +480,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = { }; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI static const mp_cmd_bind_t gui_def_cmd_binds[] = { { { 'l', 0 }, "gui_loadfile" }, @@ -1705,7 +1705,7 @@ void mp_input_init(int use_gui) { char* file; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) mp_input_add_binds(gui_def_cmd_binds); #endif diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 0ffaafc9e8..5d45434a30 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -317,7 +317,7 @@ static int control(uint32_t request, void *data, ...) return VO_TRUE; #endif -#if defined( VO_XMGA ) && defined( HAVE_NEW_GUI ) +#if defined(VO_XMGA) && defined(CONFIG_GUI) case VOCTRL_GUISUPPORT: return VO_TRUE; #endif diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index 87c9d5a645..b87c811b76 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -38,7 +38,7 @@ #include "geometry.h" #include "mp_fifo.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -1294,7 +1294,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin if(format != primary_image_format)nooverlay = 0; window_aspect= (float)d_image_width / (float)d_image_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiGetEvent(guiSetShVideo, 0); } diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 288a7a7e20..f2b3fd2a2d 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -32,7 +32,7 @@ #include "aspect.h" #include "spuenc.h" #include "sub.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #ifdef HAVE_X11 @@ -487,7 +487,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ vo_dy = (vo_screenheight - d_height) / 2; vo_dwidth = d_width; vo_dheight = d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiGetEvent(guiSetShVideo, 0); XSetWindowBackground(mDisplay, vo_window, KEY_COLOR); @@ -704,12 +704,12 @@ static void uninit(void) overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF); overlay_release(overlay_data); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (!use_gui) { #endif vo_x11_uninit(); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif } @@ -886,14 +886,14 @@ static int preinit(const char *arg) /* Initialize overlay and X11 */ overlay_data = overlay_init(fd_control); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (!use_gui) { #endif if (!vo_init()) { mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToInitX11); return -1; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif } diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index dfe52707b3..f52d7b60d3 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -13,7 +13,7 @@ #include "gl_common.h" #include "aspect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #include "fastmemcpy.h" @@ -459,7 +459,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin int_pause = 0; vo_flipped = !!(flags & VOFLAG_FLIPPING); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { // GUI creates and manages window for us guiGetEvent(guiSetShVideo, 0); diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 89af47751f..5a81213b6f 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -17,7 +17,7 @@ #include "gl_common.h" #include "aspect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -542,7 +542,7 @@ static int config_glx(uint32_t width, uint32_t height, uint32_t d_width, uint32_ } #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI static int config_glx_gui(uint32_t d_width, uint32_t d_height) { guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window return 0; @@ -616,7 +616,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin int_pause = 0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (config_glx_gui(d_width, d_height) == -1) return -1; diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 78c66f9269..85a975944a 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -44,7 +44,7 @@ int XShmGetEventBase(Display *); #include "mp_msg.h" #include "help_mp.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #include "mplayer.h" #endif @@ -369,7 +369,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, aspect = ((1 << 16) * d_width + d_height / 2) / d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 175bda9533..1e1edd91aa 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -43,7 +43,7 @@ static unsigned int timer = 0; static unsigned int timerd = 0; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -171,7 +171,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, initialized = 1; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else diff --git a/libvo/vo_xover.c b/libvo/vo_xover.c index 98566689d6..3383eab2d3 100644 --- a/libvo/vo_xover.c +++ b/libvo/vo_xover.c @@ -32,7 +32,7 @@ #include "aspect.h" #include "mp_msg.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -258,7 +258,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, vo_dy += xinerama_y; vo_dwidth=d_width; vo_dheight=d_height; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiGetEvent( guiSetShVideo,0 ); // the GUI will set up / resize the window else { @@ -308,7 +308,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc ); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index b4e20f59d8..2ccbc41f03 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -41,7 +41,7 @@ Buffer allocation: #include "input/input.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -224,7 +224,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, return -1; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // let the GUI to setup/resize our window else diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index c56e52d4cf..fab2752e4e 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -33,7 +33,7 @@ #include "vosub_vidix.h" #include "vidix/vidix.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -273,7 +273,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetShVideo, 0); // the GUI will set up / resize the window else @@ -341,7 +341,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, if (vo_gc != None) XFreeGC(mDisplay, vo_gc); vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI } #endif diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index 1471f5956a..55ebec49fc 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -31,7 +31,7 @@ #include "subopt-helper.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -645,7 +645,7 @@ skip_surface_allocation: if( flags&VOFLAG_MODESWITCHING ) vm = 1; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiGetEvent( guiSetShVideo,0 ); // let the GUI to setup/resize our window else diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 4a78b25b04..97cc1e4a0b 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -56,7 +56,7 @@ #include "input/input.h" #include "input/mouse.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #include "mplayer.h" #endif @@ -956,7 +956,7 @@ GC vo_gc = NULL; GC f_gc = NULL; XSizeHints vo_hint; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI void vo_setwindow(Window w, GC g) { vo_window = w; @@ -975,7 +975,7 @@ void vo_x11_uninit(void) XFreeGC(mDisplay, f_gc); f_gc = NULL; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI /* destroy window only if it's not controlled by the GUI */ if (!use_gui) #endif @@ -1031,7 +1031,7 @@ int vo_x11_check_events(Display * mydisplay) while (XPending(mydisplay)) { XNextEvent(mydisplay, &Event); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiGetEvent(0, (char *) &Event); @@ -1075,7 +1075,7 @@ int vo_x11_check_events(Display * mydisplay) { int key; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { break; } #endif @@ -1113,7 +1113,7 @@ int vo_x11_check_events(Display * mydisplay) mouse_waiting_hide = 1; mouse_timer = GetTimerMS(); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // Ignore mouse button 1-3 under GUI. if (use_gui && (Event.xbutton.button >= 1) && (Event.xbutton.button <= 3)) @@ -1129,7 +1129,7 @@ int vo_x11_check_events(Display * mydisplay) mouse_waiting_hide = 1; mouse_timer = GetTimerMS(); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // Ignore mouse button 1-3 under GUI. if (use_gui && (Event.xbutton.button >= 1) && (Event.xbutton.button <= 3)) @@ -1807,7 +1807,7 @@ void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width, void vo_vm_close(Display * dpy) { -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (vidmodes != NULL && vo_window != None) #else if (vidmodes != NULL) diff --git a/mp_msg.c b/mp_msg.c index 9eb63e4894..2f9f32c098 100644 --- a/mp_msg.c +++ b/mp_msg.c @@ -12,11 +12,11 @@ extern char* get_term_charset(void); #endif #if defined(FOR_MENCODER) -#undef HAVE_NEW_GUI +#undef CONFIG_GUI int use_gui; #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif #include "mp_msg.h" @@ -179,7 +179,7 @@ void mp_msg(int mod, int lev, const char *format, ... ){ tmp[MSGSIZE_MAX-2] = '\n'; tmp[MSGSIZE_MAX-1] = 0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiMessageBox(lev, tmp); #endif diff --git a/mpcommon.c b/mpcommon.c index 5150e4f5d1..135dd540bd 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -210,26 +210,26 @@ int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang) /* Parse -noconfig common to both programs */ int disable_system_conf=0; int disable_user_conf=0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI int disable_gui_conf=0; -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ /* Disable all configuration files */ static void noconfig_all(void) { disable_system_conf = 1; disable_user_conf = 1; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI disable_gui_conf = 1; -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ } const m_option_t noconfig_opts[] = { {"all", noconfig_all, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, {"system", &disable_system_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, {"user", &disable_user_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI {"gui", &disable_gui_conf, CONF_TYPE_FLAG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 1, NULL}, -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ {NULL, NULL, 0, 0, 0, 0, NULL} }; diff --git a/mplayer.c b/mplayer.c index f497afa40c..454866f48a 100644 --- a/mplayer.c +++ b/mplayer.c @@ -76,7 +76,7 @@ #include "cpudetect.h" -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI #include "gui/interface.h" #endif @@ -224,7 +224,7 @@ float playback_speed=1.0; int use_gui=0; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI int enqueue=0; #endif @@ -588,7 +588,7 @@ void uninit_player(unsigned int mask){ initialized_flags&=~INITIALIZED_ACODEC; current_module="uninit_acodec"; if(mpctx->sh_audio) uninit_audio(mpctx->sh_audio); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)NULL); #endif mpctx->sh_audio=NULL; @@ -663,7 +663,7 @@ void uninit_player(unsigned int mask){ mpctx->audio_out->uninit(mpctx->eof?0:1); mpctx->audio_out=NULL; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(mask&INITIALIZED_GUI){ initialized_flags&=~INITIALIZED_GUI; current_module="uninit_gui"; @@ -692,7 +692,7 @@ void exit_player_with_rc(const char* how, int rc){ timeEndPeriod(1); #endif #ifdef HAVE_X11 -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( !use_gui ) #endif vo_uninit(); // Close the X11 connection (if any is open). @@ -980,7 +980,7 @@ static int playtree_add_playlist(play_tree_t* entry) { play_tree_add_bpf(entry,filename); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (entry) { import_playtree_playlist_into_gui(entry, mconfig); @@ -1296,7 +1296,7 @@ int build_afilter_chain(sh_audio_t *sh_audio, ao_data_t *ao_data) int result; if (!sh_audio) { -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)NULL); #endif mpctx->mixer.afilter = NULL; @@ -1320,7 +1320,7 @@ int build_afilter_chain(sh_audio_t *sh_audio, ao_data_t *ao_data) result = init_audio_filters(sh_audio, new_srate, &ao_data->samplerate, &ao_data->channels, &ao_data->format); mpctx->mixer.afilter = sh_audio->afilter; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiSetAfilter, (char *)sh_audio->afilter); #endif return result; @@ -2342,7 +2342,7 @@ static void pause_loop(void) mp_msg(MSGT_CPLAYER,MSGL_STATUS,MSGTR_Paused); mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_PAUSED\n"); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) guiGetEvent(guiCEvent, (char *)guiSetPause); #endif @@ -2361,7 +2361,7 @@ static void pause_loop(void) } if (mpctx->sh_video && mpctx->video_out && vo_config_count) mpctx->video_out->check_events(); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { guiEventHandling(); guiGetEvent(guiReDraw, NULL); @@ -2385,7 +2385,7 @@ static void pause_loop(void) if (mpctx->video_out && mpctx->sh_video && vo_config_count) mpctx->video_out->control(VOCTRL_RESUME, NULL); // resume video (void)GetRelativeTime(); // ignore time that passed during pause -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if (use_gui) { if (guiIntfStruct.Playing == guiSetStop) mpctx->eof = 1; @@ -2595,7 +2595,7 @@ int gui_no_filename=0; parse_cfgfiles(mconfig); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) cfg_read(); #endif @@ -2616,7 +2616,7 @@ int gui_no_filename=0; } } -#if defined(WIN32) && defined(HAVE_NEW_GUI) +#if defined(WIN32) && defined(CONFIG_GUI) void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); if(runningmplayer && filename && use_gui){ COPYDATASTRUCT csData; @@ -2645,7 +2645,7 @@ int gui_no_filename=0; SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio); } #endif -#ifndef HAVE_NEW_GUI +#ifndef CONFIG_GUI if(use_gui){ mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui); use_gui=0; @@ -2672,7 +2672,7 @@ int gui_no_filename=0; // Import initital playtree into GUI. import_initial_playtree_into_gui(mpctx->playtree, mconfig, enqueue); } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ if(video_driver_list && strcmp(video_driver_list[0],"help")==0){ list_video_out(); @@ -2840,7 +2840,7 @@ if(!codecs_file || !parse_codec_cfg(codecs_file)){ mp_msg(MSGT_CPLAYER, MSGL_V, MSGTR_UsingRTCTiming, irqp); } } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI // breaks DGA and SVGAlib and VESA drivers: --A'rpi // and now ? -- Pontscho if(use_gui) setuid( getuid() ); // strongly test, please check this. @@ -2920,7 +2920,7 @@ current_module = NULL; #endif #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiInit(); guiGetEvent(guiSetContext, mpctx); @@ -2960,7 +2960,7 @@ if(!noconsolecontrols && !slave_mode){ } // =================== GUI idle loop (STOP state) =========================== -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { mpctx->file_format=DEMUXER_TYPE_UNKNOWN; guiGetEvent( guiSetDefaults,0 ); @@ -2998,7 +2998,7 @@ if(!noconsolecontrols && !slave_mode){ } } } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ while (player_idle_mode && !filename) { play_tree_t * entry = NULL; @@ -3142,7 +3142,7 @@ if (edl_output_filename) { } initialized_flags|=INITIALIZED_STREAM; -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) guiGetEvent( guiSetStream,(char *)mpctx->stream ); #endif @@ -3622,7 +3622,7 @@ if(force_fps && mpctx->sh_video){ mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_FPSforced,mpctx->sh_video->fps,mpctx->sh_video->frametime); } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if ( use_gui ) { if ( mpctx->sh_audio ) guiIntfStruct.AudioType=mpctx->sh_audio->channels; else guiIntfStruct.AudioType=0; if ( !mpctx->sh_video && mpctx->sh_audio ) guiGetEvent( guiSetAudioOnly,(char *)1 ); else guiGetEvent( guiSetAudioOnly,(char *)0 ); @@ -3738,7 +3738,7 @@ if(!mpctx->sh_video) { // current_module="draw_osd"; // if(vo_config_count) mpctx->video_out->draw_osd(); -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui) guiEventHandling(); #endif @@ -3887,7 +3887,7 @@ if(rel_seek_secs || abs_seek_pos){ edl_decision = 0; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui){ guiEventHandling(); if(mpctx->demuxer->file_format==DEMUXER_TYPE_AVI && mpctx->sh_video && mpctx->sh_video->video.dwLength>2){ @@ -3912,7 +3912,7 @@ if(rel_seek_secs || abs_seek_pos){ } #endif } -#endif /* HAVE_NEW_GUI */ +#endif /* CONFIG_GUI */ } // while(!mpctx->eof) @@ -4020,7 +4020,7 @@ while(mpctx->playtree_iter != NULL) { break; } -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI if(use_gui && !mpctx->playtree_iter) { #ifdef CONFIG_DVDREAD if(!guiIntfStruct.DiskChanged) diff --git a/stream/cache2.c b/stream/cache2.c index a5be3903fa..53749afb5d 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -369,7 +369,7 @@ static void ThreadProc( void *s ){ #endif #endif -#ifdef HAVE_NEW_GUI +#ifdef CONFIG_GUI use_gui = 0; // mp_msg may not use gui stuff in forked code #endif // cache thread mainloop: -- cgit v1.2.3