examples dir port. gnome-love task. ?



I wanted to add a taks in the todo system
(www.gnome.org/todo) for gtk 2.0 which is to port the
examples dir. I "ported" two directories as an example
(diff attached). I wanted to drop a note to make sure 
this is needed/wanted.

Attached you will find a small patch.

regards,
Chema
Index: examples/label/Makefile
===================================================================
RCS file: /cvs/gnome/gtk+/examples/label/Makefile,v
retrieving revision 1.1
diff -u -5 -r1.1 Makefile
--- examples/label/Makefile	1999/02/01 10:44:34	1.1
+++ examples/label/Makefile	2001/06/06 06:51:59
@@ -1,8 +1,8 @@
 
 CC = gcc
 
 label: label.c 
-	$(CC) `gtk-config --cflags`  label.c -o label `gtk-config --libs`
+	$(CC) `pkg-config --cflags gtk+-2.0` label.c -o label `pkg-config --libs gtk+-2.0`
 
 clean: 
 	rm -f *.o label
Index: examples/rulers/Makefile
===================================================================
RCS file: /cvs/gnome/gtk+/examples/rulers/Makefile,v
retrieving revision 1.2
diff -u -5 -r1.2 Makefile
--- examples/rulers/Makefile	1998/11/07 16:12:23	1.2
+++ examples/rulers/Makefile	2001/06/06 06:51:59
@@ -1,8 +1,8 @@
 
 CC = gcc
 
 rulers: rulers.c 
-	$(CC) `gtk-config --cflags`  rulers.c -o rulers `gtk-config --libs`
+	$(CC) `pkg-config --cflags gtk+-2.0`  rulers.c -o rulers `pkg-config --libs gtk+-2.0`
 
 clean: 
 	rm -f *.o rulers
Index: examples/rulers/rulers.c
===================================================================
RCS file: /cvs/gnome/gtk+/examples/rulers/rulers.c,v
retrieving revision 1.6
diff -u -5 -r1.6 rulers.c
--- examples/rulers/rulers.c	1999/11/13 23:06:43	1.6
+++ examples/rulers/rulers.c	2001/06/06 06:52:00
@@ -1,10 +1,10 @@
 /* example-start rulers rulers.c */
 
 #include <gtk/gtk.h>
 
-#define EVENT_METHOD(i, x) GTK_WIDGET_CLASS(GTK_OBJECT(i)->klass)->x
+#define EVENT_METHOD(i, x) GTK_WIDGET_CLASS(GTK_OBJECT_GET_CLASS(i))->x
 
 #define XSIZE  600
 #define YSIZE  400
 
 /* This routine gets control when the close button is clicked */
@@ -60,11 +60,11 @@
     vrule = gtk_vruler_new();
     gtk_ruler_set_metric( GTK_RULER(vrule), GTK_PIXELS );
     gtk_ruler_set_range( GTK_RULER(vrule), 0, YSIZE, 10, YSIZE );
     gtk_signal_connect_object( GTK_OBJECT(area), "motion_notify_event",
                                (GtkSignalFunc)
-                                  GTK_WIDGET_CLASS(GTK_OBJECT(vrule)->klass)->
+                                  GTK_WIDGET_CLASS(GTK_OBJECT_GET_CLASS(vrule))->
 				                         motion_notify_event,
                                GTK_OBJECT(vrule) );
     gtk_table_attach( GTK_TABLE(table), vrule, 0, 1, 1, 2,
                       GTK_FILL, GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0 );
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]