mplayer-gtk+2.patch

Szymon Siwek sls w poczta.wp.pl
Pon, 13 Wrz 2004, 00:18:59 CEST


Witam i przesyłam patch dostosowany do mplayera 1.0pre5.
-- 
Szymon Siwek
Los nikomu nie szczędzi rozczarowań.
-------------- następna część ---------
diff -burN MPlayer-1.0pre3.orig/configure MPlayer-1.0pre3/configure
--- MPlayer-1.0pre3.orig/configure	2004-01-02 15:29:02.000000000 +0100
+++ MPlayer-1.0pre3/configure	2004-01-02 15:45:49.000000000 +0100
@@ -314,8 +314,7 @@
                               (e.g. /opt/bin/freetype-config)
   --with-fribidi-config=PATH  path to fribidi-config
                               (e.g. /opt/bin/fribidi-config)
-  --with-glib-config=PATH  path to glib*-config (e.g. /opt/bin/glib-config)
-  --with-gtk-config=PATH   path to gtk*-config (e.g. /opt/bin/gtk-config)
+  --with-pkg-config=PATH   path to pkg-config (e.g. /opt/bin/pkg-config)
   --with-sdl-config=PATH   path to sdl*-config (e.g. /opt/bin/sdl-config)
 EOF
     exit 0
@@ -1542,11 +1541,8 @@
   --with-fribidi-config=*)
     _fribidiconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
-  --with-gtk-config=*)
-    _gtkconfig=`echo $ac_option | cut -d '=' -f 2`
-    ;;
-  --with-glib-config=*)
-    _glibconfig=`echo $ac_option | cut -d '=' -f 2`
+  --with-pkg-config=*)
+    _pkgconfig=`echo $ac_option | cut -d '=' -f 2`
     ;;
 # dvdnav disabled, it does not work
 #  --with-dvdnav-config=*)
@@ -5538,37 +5534,38 @@
   echores "$_xshape"
 
 
-  # 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)."
+  # Check for pkg-config
+  echocheck "pkg-config"
+  if test -z "$_pkgconfig"; then
+    if ( pkg-config --version ) > /dev/null 2>&1; then
+      _pkgconfig="pkg-config"
+    else
+      die "The GUI requires pkg-config (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 GTK
+  if ( $_pkgconfig --modversion gtk+-2.0 ) > /dev/null 2>&1; then
+    :
+  else
+    die "the GUI requires GTK (which was not found)"
+  fi
+  _gtk=`$_pkgconfig --modversion gtk+-2.0 2>&1`
+  _inc_gtk=`$_pkgconfig --cflags gtk+-2.0 2>&1`
+  _ld_gtk=`$_pkgconfig  --libs   gtk+-2.0 2>&1`
+  echores "$_gtk (using $_pkconfig)"
 
   # 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
+  if ( $_pkgconfig --modversion glib-2.0 ) > /dev/null 2>&1 ; then
+    :
+  else
+    die "The GUI requires GLIB (which was not found)"
   fi
-  _glib=`$_glibconfig --version 2>&1`
-  _inc_glib=`$_glibconfig --cflags 2>&1`
-  _ld_glib=`$_glibconfig --libs 2>&1`
-  echores "$_glib (using $_glibconfig)"
+  _glib=`$_pkgconfig --modversion glib-2.0 2>&1`
+  _inc_glib=`$_pkgconfig --cflags glib-2.0 2>&1`
+  _ld_glib=`$_pkgconfig  --libs   glib-2.0 2>&1`
+  echores "$_glib (using $_pkgconfig)"
 
   _def_gui='#define HAVE_NEW_GUI 1'
   _ld_gui='$(GTKLIB) $(GLIBLIB)'
diff -burN MPlayer-1.0pre3.orig/Gui/mplayer/gtk/about.c MPlayer-1.0pre3/Gui/mplayer/gtk/about.c
--- MPlayer-1.0pre3.orig/Gui/mplayer/gtk/about.c	2004-01-02 15:29:01.000000000 +0100
+++ MPlayer-1.0pre3/Gui/mplayer/gtk/about.c	2004-01-02 15:56:07.000000000 +0100
@@ -67,11 +67,20 @@
   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 USE_GTK1
   AboutText=gtk_text_new( NULL,NULL );
+#else
+  AboutText=gtk_text_view_new();
+  gtk_text_view_set_editable( GTK_TEXT_VIEW( AboutText ), FALSE );
+#endif
   gtk_widget_set_name( AboutText,"AboutText" );
   gtk_widget_show( AboutText );
   gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
+#ifdef USE_GTK1
   gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
+#else
+  gtk_text_buffer_set_text( gtk_text_view_get_buffer( AboutText), 
+#endif
   	"\n" 
 	MSGTR_ABOUT_UHU 
 	"             (http://www.uhulinux.hu/)\n" 


Więcej informacji o liście dyskusyjnej pld-devel-pl