summaryrefslogtreecommitdiff
path: root/examples/buttonbox
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-02-16 23:52:30 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-02-16 23:52:30 +0000
commitb3d5f148e6c0e2cb688403655c7800b762e33602 (patch)
tree1056439dd24e464adbabc5c374182a886c669345 /examples/buttonbox
parent554838e4f602d59f5be241d1da188934d51d49c3 (diff)
downloadgtk+-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/buttonbox')
-rw-r--r--examples/buttonbox/Makefile8
-rw-r--r--examples/buttonbox/buttonbox.c12
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/buttonbox/Makefile b/examples/buttonbox/Makefile
index d28bd8d9a4..0863978842 100644
--- a/examples/buttonbox/Makefile
+++ b/examples/buttonbox/Makefile
@@ -1,8 +1,14 @@
CC = gcc
+CFLAGS = -Wall \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED
+
buttonbox: buttonbox.c
- $(CC) `pkg-config --cflags gtk+-2.0` buttonbox.c -o buttonbox `pkg-config --libs gtk+-2.0`
+ $(CC) buttonbox.c -o buttonbox $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`
clean:
rm -f *.o buttonbox
diff --git a/examples/buttonbox/buttonbox.c b/examples/buttonbox/buttonbox.c
index 18346403ac..45e71c94f5 100644
--- a/examples/buttonbox/buttonbox.c
+++ b/examples/buttonbox/buttonbox.c
@@ -1,4 +1,3 @@
-/* example-start buttonbox buttonbox.c */
#include <gtk/gtk.h>
@@ -26,8 +25,8 @@ GtkWidget *create_bbox( gint horizontal,
/* Set the appearance of the Button Box */
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
- gtk_button_box_set_spacing (GTK_BUTTON_BOX (bbox), spacing);
- gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), child_w, child_h);
+ gtk_box_set_spacing (GTK_BOX (bbox), spacing);
+ /*gtk_button_box_set_child_size (GTK_BUTTON_BOX (bbox), child_w, child_h);*/
button = gtk_button_new_with_label ("OK");
gtk_container_add (GTK_CONTAINER (bbox), button);
@@ -57,9 +56,9 @@ int main( int argc,
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
- gtk_signal_connect (GTK_OBJECT (window), "destroy",
- GTK_SIGNAL_FUNC(gtk_main_quit),
- NULL);
+ g_signal_connect (GTK_OBJECT (window), "destroy",
+ GTK_SIGNAL_FUNC(gtk_main_quit),
+ NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
@@ -119,4 +118,3 @@ int main( int argc,
return(0);
}
-/* example-end */