diff -Nur MPlayer-1.0pre7try2.orig/Gui/mplayer/gtk/about.c MPlayer-1.0pre7try2/Gui/mplayer/gtk/about.c --- MPlayer-1.0pre7try2.orig/Gui/mplayer/gtk/about.c Tue Jun 15 06:52:36 2004 +++ MPlayer-1.0pre7try2/Gui/mplayer/gtk/about.c Sun Apr 9 17:14:47 2006 @@ -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 -Nur MPlayer-1.0pre7try2.orig/configure MPlayer-1.0pre7try2/configure --- MPlayer-1.0pre7try2.orig/configure Wed Apr 13 07:46:35 2005 +++ MPlayer-1.0pre7try2/configure Sun Apr 9 17:14:47 2006 @@ -151,6 +151,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] @@ -1373,6 +1374,7 @@ _lirc=auto _lircc=auto _gui=no +_gtk2=no _termcap=auto _termios=auto _3dfx=no @@ -1614,6 +1616,8 @@ --disable-lircc) _lircc=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 ;; @@ -6412,41 +6416,69 @@ fi echores "$_xshape" + #Check for new GTK (2.x.x) + if test "$_gtk2" = yes ; then - # 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 devel packages (which were not found)." - 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 devel packages (which were not found)" - fi - fi - _glib=`$_glibconfig --version 2>&1` - _inc_glib=`$_glibconfig --cflags 2>&1` - _ld_glib=`$_glibconfig --libs 2>&1` - echores "$_glib (using $_glibconfig)" + #Check for GTK: + echocheck "GTK+ version" - _def_gui='#define HAVE_NEW_GUI 1' - _ld_gui='$(GTKLIB) $(GLIBLIB)' + _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 + _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 + + _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 @@ -6461,6 +6493,7 @@ else _def_gui='#undef HAVE_NEW_GUI' + _def_gtk2_gui='#undef HAVE_GTK2_GUI' fi # --------------- GUI specific tests end ------------------- @@ -7206,6 +7239,7 @@ /* gui support, please do not edit this option */ $_def_gui +$_def_gtk2_gui /* Audio output drivers */ $_def_ossaudio