Files MPlayer-0.90rc4/Gui/mplayer/gtk/.about.c.rej.swp and MPlayer-0.90rc4.gtk2/Gui/mplayer/gtk/.about.c.rej.swp differ diff -urN MPlayer-0.90rc4/Gui/mplayer/gtk/about.c MPlayer-0.90rc4.gtk2/Gui/mplayer/gtk/about.c --- MPlayer-0.90rc4/Gui/mplayer/gtk/about.c 2003-02-01 10:37:05.000000000 +0200 +++ MPlayer-0.90rc4.gtk2/Gui/mplayer/gtk/about.c 2003-02-16 07:57:43.000000000 +0200 @@ -28,6 +28,11 @@ GtkWidget * AboutText; GtkWidget * Ok; +#ifdef HAVE_GTK2_GUI + GtkTextBuffer * AboutTextBuffer; + GtkTextIter iter; +#endif //HAVE_GTK2_GUI + GtkStyle * pixmapstyle; GdkPixmap * pixmapwid; GdkBitmap * mask; @@ -67,11 +72,24 @@ 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 ); - AboutText=gtk_text_new( NULL,NULL ); + #ifdef HAVE_GTK2_GUI + AboutText = gtk_text_view_new(); + AboutTextBuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (AboutText)); + gtk_text_buffer_get_iter_at_offset (AboutTextBuffer, &iter, 0); + #else + AboutText = gtk_text_new( NULL,NULL ); + #endif //HAVE_GTK2_GUI + gtk_widget_set_name( AboutText,"AboutText" ); gtk_widget_show( AboutText ); gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText ); - gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, + + #ifdef HAVE_GTK2_GUI + gtk_text_buffer_insert (AboutTextBuffer, &iter, + #else + gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL, + #endif //HAVE_GTK2_GUI + "\n" MSGTR_ABOUT_UHU " (http://www.uhulinux.hu/)\n" diff -urN MPlayer-0.90rc4/configure MPlayer-0.90rc4.gtk2/configure --- MPlayer-0.90rc4/configure 2003-02-09 00:29:05.000000000 +0200 +++ MPlayer-0.90rc4.gtk2/configure 2003-02-16 07:53:12.000000000 +0200 @@ -140,6 +140,7 @@ Optional features: --disable-mencoder disable mencoder (a/v encoder) compilation [enable] --enable-gui enable gmplayer compilation (gtk-1.2 GUI) [disable] + --enable-gtk2 enable gtk2 port of the gui [disable] --enable-largefiles enable support for files > 2 GBytes [disable] --enable-linux-devfs set default devices to devfs ones [disable] --enable-termcap use termcap database for key codes [autodetect] @@ -1032,6 +1033,7 @@ _opendivx=no _lirc=auto _gui=no +_gtk2=no _termcap=auto _termios=auto _3dfx=no @@ -1207,6 +1209,8 @@ --disable-lirc) _lirc=no ;; --enable-gui) _gui=yes ;; --disable-gui) _gui=no ;; + --enable-gtk2) _gtk2=yes ;; + --disable-gtk2) _gtk2=no ;; --enable-termcap) _termcap=yes ;; --disable-termcap) _termcap=no ;; --enable-termios) _termios=yes ;; @@ -4595,42 +4599,70 @@ fi echores "$_xshape" + # Check for new GTK (2.x.x) + if test "$_gtk2" = yes ; then + + # Check for GTK: + echocheck "GTK+ version" - # Check for GTK: - echocheck "gtk version" - if test -z "$_gtkconfig" ; then - if ( gtk-config --version ) >/dev/null 2>&1 ; then - _gtkconfig="gtk-config" - elif ( gtk12-config --version ) >/dev/null 2>&1 ; then - _gtkconfig="gtk12-config" - else - die "the GUI requires GTK (which was not found)" + _gtk=`pkg-config gtk+-2.0 --modversion 2>&1` + _inc_gtk=`pkg-config gtk+-2.0 --cflags 2>&1` + _ld_gtk=`pkg-config gtk+-2.0 --libs 2>&1` + echores "$_gtk" + + # Check for GLIB + echocheck "glib version" + _glib=`pkg-config glib-2.0 --modversion 2>&1` + _inc_glib=`pkg-config glib-2.0 --cflags 2>&1` + _ld_glib=`pkg-config glib-2.0 --libs 2>&1` + echores "$_glib" + + _def_gui='#define HAVE_NEW_GUI 1' + _def_gtk2_gui='#define HAVE_GTK2_GUI 1' + _ld_gui='$(GTKLIB) $(GLIBLIB)' + + # Check for "old" GTK (1.2.x) + else + + # Check for GTK: + echocheck "GTK+ version" + if test -z "$_gtkconfig" ; then + if ( gtk-config --version ) >/dev/null 2>&1 ; then + _gtkconfig="gtk-config" + elif ( gtk12-config --version ) >/dev/null 2>&1 ; then + _gtkconfig="gtk12-config" + else + die "the GUI requires GTK+ (which was not found)" + fi fi - fi - _gtk=`$_gtkconfig --version 2>&1` - _inc_gtk=`$_gtkconfig --cflags 2>&1` - _ld_gtk=`$_gtkconfig --libs 2>&1` - echores "$_gtk (using $_gtkconfig)" - - # Check for GLIB - echocheck "glib version" - if test -z "$_glibconfig" ; then - if ( glib-config --version ) >/dev/null 2>&1 ; then - _glibconfig="glib-config" - elif ( glib12-config --version ) >/dev/null 2>&1 ; then - _glibconfig="glib12-config" - else - die "the GUI requires GLIB (which was not found)" + _gtk=`$_gtkconfig --version 2>&1` + _inc_gtk=`$_gtkconfig --cflags 2>&1` + _ld_gtk=`$_gtkconfig --libs 2>&1` + echores "$_gtk (using $_gtkconfig)" + + # Check for GLIB + echocheck "glib version" + if test -z "$_glibconfig" ; then + if ( glib-config --version ) >/dev/null 2>&1 ; then + _glibconfig="glib-config" + elif ( glib12-config --version ) >/dev/null 2>&1 ; then + _glibconfig="glib12-config" + else + die "the GUI requires GLIB (which was not found)" + fi fi - fi - _glib=`$_glibconfig --version 2>&1` - _inc_glib=`$_glibconfig --cflags 2>&1` - _ld_glib=`$_glibconfig --libs 2>&1` - echores "$_glib (using $_glibconfig)" - - _def_gui='#define HAVE_NEW_GUI 1' - _ld_gui='$(GTKLIB) $(GLIBLIB)' + _glib=`$_glibconfig --version 2>&1` + _inc_glib=`$_glibconfig --cflags 2>&1` + _ld_glib=`$_glibconfig --libs 2>&1` + echores "$_glib (using $_glibconfig)" + + _def_gui='#define HAVE_NEW_GUI 1' + _def_gtk2_gui='#undef HAVE_GTK2_GUI' + _ld_gui='$(GTKLIB) $(GLIBLIB)' + + fi + echo "Creating Gui/config.mak" cat > Gui/config.mak << EOF # -------- Generated by configure ----------- @@ -4644,6 +4676,7 @@ else _def_gui='#undef HAVE_NEW_GUI' + _def_gtk2_gui='#undef HAVE_GTK2_GUI' fi # --------------- GUI specific tests end ------------------- @@ -5179,6 +5212,7 @@ /* gui support, please do not edit this option */ $_def_gui +$_def_gtk2_gui /* Audio output drivers */ $_def_ossaudio