[MPlayer-cvslog] CVS: main/Gui/mplayer/gtk about.c, 1.21, 1.22 opts.c, 1.69, 1.70

Reimar Döffinger CVS syncmail at mplayerhq.hu
Wed Aug 17 20:41:17 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var2/tmp/cvs-serv7929/Gui/mplayer/gtk

Modified Files:
	about.c opts.c 
Log Message:
Support for GTK 2.x.
Patch by Onur Kucuk (onur . delipenguen net).


Index: about.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/about.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- about.c	15 Jun 2004 10:52:36 -0000	1.21
+++ about.c	17 Aug 2005 18:41:15 -0000	1.22
@@ -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,21 @@
   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
+  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
   gtk_widget_set_name( AboutText,"AboutText" );
   gtk_widget_show( AboutText );
   gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
+#ifdef HAVE_GTK2_GUI  
+  gtk_text_buffer_insert (AboutTextBuffer, &iter,   
+#else  
   gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
+#endif
   	"\n" 
 	MSGTR_ABOUT_UHU 
 	"             (http://www.uhulinux.hu/)\n" 

Index: opts.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- opts.c	28 Jul 2005 09:43:02 -0000	1.69
+++ opts.c	17 Aug 2005 18:41:15 -0000	1.70
@@ -736,8 +736,10 @@
 	     !strncmp( ao_driver[0],"esd",3 ) ||
 	     !strncmp( ao_driver[0],"sdl",3 ) )
 	  gtk_widget_set_sensitive( AConfig,TRUE );
+#ifndef HAVE_GTK2_GUI
         if ( !strncmp( ao_driver[0],"arts",4 ) )
           gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken);
+#endif
 	break;
    case 1: // video driver 
 	gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver ); 




More information about the MPlayer-cvslog mailing list