diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2002-02-16 23:52:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2002-02-16 23:52:30 +0000 |
commit | b3d5f148e6c0e2cb688403655c7800b762e33602 (patch) | |
tree | 1056439dd24e464adbabc5c374182a886c669345 /examples/wheelbarrow | |
parent | 554838e4f602d59f5be241d1da188934d51d49c3 (diff) | |
download | gtk+-b3d5f148e6c0e2cb688403655c7800b762e33602.tar.gz |
More work on #71430.
* examples/*/Makefile (CFLAGS): add deprecation guards.
* docs/tutorial/gtk-tut.sgml, examples/*/*.c: make most examples
deprecation-clean; the major offenders right now are the examples
that make heavy use of completely deprecated or broken widgets:
list, tree, text, pixmap, paned and progressbar. These will have
to be redone from scratch.
* demos/Makefile.am (INCLUDES): add -DGDK_PIXBUF_DISABLE_DEPRECATED.
Diffstat (limited to 'examples/wheelbarrow')
-rw-r--r-- | examples/wheelbarrow/Makefile | 8 | ||||
-rw-r--r-- | examples/wheelbarrow/wheelbarrow.c | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/wheelbarrow/Makefile b/examples/wheelbarrow/Makefile index b004ca9183..e51c26c565 100644 --- a/examples/wheelbarrow/Makefile +++ b/examples/wheelbarrow/Makefile @@ -1,8 +1,14 @@ CC = gcc +CFLAGS = -Wall \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + wheelbarrow: wheelbarrow.c - $(CC) `pkg-config --cflags gtk+-2.0` wheelbarrow.c -o wheelbarrow `pkg-config --libs gtk+-2.0` + $(CC) wheelbarrow.c -o wheelbarrow $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` clean: rm -f *.o wheelbarrow diff --git a/examples/wheelbarrow/wheelbarrow.c b/examples/wheelbarrow/wheelbarrow.c index 5d1df1d155..a0a7cd5412 100644 --- a/examples/wheelbarrow/wheelbarrow.c +++ b/examples/wheelbarrow/wheelbarrow.c @@ -1,4 +1,3 @@ -/* example-start wheelbarrow wheelbarrow.c */ #include <gtk/gtk.h> @@ -143,7 +142,7 @@ int main (int argc, * since we're making it a popup. */ gtk_init (&argc, &argv); window = gtk_window_new( GTK_WINDOW_POPUP ); - gtk_signal_connect (GTK_OBJECT (window), "delete_event", + g_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (close_application), NULL); gtk_widget_show (window); @@ -153,12 +152,12 @@ int main (int argc, gdk_pixmap = gdk_pixmap_create_from_xpm_d( window->window, &mask, &style->bg[GTK_STATE_NORMAL], WheelbarrowFull_xpm ); - pixmap = gtk_pixmap_new( gdk_pixmap, mask ); + pixmap = gtk_image_new_from_pixmap (gdk_pixmap, mask); gtk_widget_show( pixmap ); /* To display the pixmap, we use a fixed widget to place the pixmap */ fixed = gtk_fixed_new(); - gtk_widget_set_usize( fixed, 200, 200 ); + gtk_widget_set_size_request (fixed, 200, 200); gtk_fixed_put( GTK_FIXED(fixed), pixmap, 0, 0 ); gtk_container_add( GTK_CONTAINER(window), fixed ); gtk_widget_show( fixed ); @@ -167,10 +166,9 @@ int main (int argc, gtk_widget_shape_combine_mask( window, mask, 0, 0 ); /* show the window */ - gtk_widget_set_uposition( window, 20, 400 ); + /*gtk_widget_set_uposition( window, 20, 400 );*/ gtk_widget_show( window ); gtk_main (); - return(0); + return 0; } -/* example-end */ |