Making gtk-demo deprecation-clean



Here is a patch which removes the few instances of
deprecated functions in gtk-demo. Ok to commit ?

Index: demos/gtk-demo/Makefile.am
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/Makefile.am,v
retrieving revision 1.15
diff -u -3 -p -u -r1.15 Makefile.am
--- demos/gtk-demo/Makefile.am	2001/06/04 23:15:48	1.15
+++ demos/gtk-demo/Makefile.am	2001/08/17 08:54:25
@@ -24,6 +24,7 @@ INCLUDES = @STRIP_BEGIN@ \
 	-DDEMOCODEDIR="\"$(democodedir)\""		\
 	-I$(top_srcdir) 				\
 	-I$(top_builddir)/gdk				\
+	-DG_DISABLE_DEPRECATED	 			\
 	-DGDK_DISABLE_COMPAT_H				\
 	-DGDK_DISABLE_DEPRECATED			\
 	-DGTK_DISABLE_COMPAT_H				\
Index: demos/gtk-demo/drawingarea.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/drawingarea.c,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 drawingarea.c
--- demos/gtk-demo/drawingarea.c	2001/05/18 16:28:30	1.2
+++ demos/gtk-demo/drawingarea.c	2001/08/17 08:54:25
@@ -254,7 +254,7 @@ do_drawingarea (void)
       
       da = gtk_drawing_area_new ();
       /* set a minimum size */
-      gtk_widget_set_usize (da, 100, 100);
+      gtk_widget_set_size_request (da, 100, 100);
 
       gtk_container_add (GTK_CONTAINER (frame), da);
 
@@ -278,7 +278,7 @@ do_drawingarea (void)
       
       da = gtk_drawing_area_new ();
       /* set a minimum size */
-      gtk_widget_set_usize (da, 100, 100);
+      gtk_widget_set_size_request (da, 100, 100);
 
       gtk_container_add (GTK_CONTAINER (frame), da);
 
Index: demos/gtk-demo/menus.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/menus.c,v
retrieving revision 1.7
diff -u -3 -p -u -r1.7 menus.c
--- demos/gtk-demo/menus.c	2001/07/31 20:12:00	1.7
+++ demos/gtk-demo/menus.c	2001/08/17 08:54:25
@@ -60,7 +60,7 @@ create_menu (gint     depth,
     {
       sprintf (buf, "item %2d - %d", depth, j);
       menuitem = gtk_radio_menu_item_new_with_label (group, buf);
-      group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
+      group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
 
       gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
       gtk_widget_show (menuitem);
Index: demos/gtk-demo/panes.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/panes.c,v
retrieving revision 1.6
diff -u -3 -p -u -r1.6 panes.c
--- demos/gtk-demo/panes.c	2001/08/10 03:45:44	1.6
+++ demos/gtk-demo/panes.c	2001/08/17 08:54:25
@@ -156,12 +156,12 @@ do_panes (void)
 
       frame = gtk_frame_new (NULL);
       gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
-      gtk_widget_set_usize (frame, 80, 60);
+      gtk_widget_set_size_request (frame, 80, 60);
       gtk_paned_add2 (GTK_PANED (hpaned), frame);
 
       frame = gtk_frame_new (NULL);
       gtk_frame_set_shadow_type (GTK_FRAME(frame), GTK_SHADOW_IN);
-      gtk_widget_set_usize (frame, 60, 80);
+      gtk_widget_set_size_request (frame, 60, 80);
       gtk_paned_add2 (GTK_PANED (vpaned), frame);
 
       /* Now create toggle buttons to control sizing */
Index: demos/gtk-demo/stock_browser.c
===================================================================
RCS file: /cvs/gnome/gtk+/demos/gtk-demo/stock_browser.c,v
retrieving revision 1.5
diff -u -3 -p -u -r1.5 stock_browser.c
--- demos/gtk-demo/stock_browser.c	2001/06/30 02:38:16	1.5
+++ demos/gtk-demo/stock_browser.c	2001/08/17 08:54:25
@@ -122,7 +122,7 @@ id_to_macro (const gchar *id)
       ++p;
     }
 
-  g_strup (macro->str);
+  g_ascii_strup (macro->str);
   
   return g_string_free (macro, FALSE);
 }




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