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/radiobuttons | |
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/radiobuttons')
-rw-r--r-- | examples/radiobuttons/Makefile | 8 | ||||
-rw-r--r-- | examples/radiobuttons/radiobuttons.c | 16 |
2 files changed, 14 insertions, 10 deletions
diff --git a/examples/radiobuttons/Makefile b/examples/radiobuttons/Makefile index c62cfad4cb..43efadeee7 100644 --- a/examples/radiobuttons/Makefile +++ b/examples/radiobuttons/Makefile @@ -1,8 +1,14 @@ CC = gcc +CFLAGS = -Wall \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + radiobuttons: radiobuttons.c - $(CC) `pkg-config --cflags gtk+-2.0` radiobuttons.c -o radiobuttons `pkg-config --libs gtk+-2.0` + $(CC) radiobuttons.c -o radiobuttons $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` clean: rm -f *.o radiobuttons diff --git a/examples/radiobuttons/radiobuttons.c b/examples/radiobuttons/radiobuttons.c index 8fc81872f6..15399ba190 100644 --- a/examples/radiobuttons/radiobuttons.c +++ b/examples/radiobuttons/radiobuttons.c @@ -1,14 +1,13 @@ -/* example-start radiobuttons radiobuttons.c */ -#include <gtk/gtk.h> #include <glib.h> +#include <gtk/gtk.h> gint close_application( GtkWidget *widget, GdkEvent *event, gpointer data ) { gtk_main_quit(); - return(FALSE); + return FALSE; } int main( int argc, @@ -25,7 +24,7 @@ int main( int argc, window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_signal_connect (GTK_OBJECT (window), "delete_event", + g_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC(close_application), NULL); @@ -45,14 +44,14 @@ int main( int argc, gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); - group = gtk_radio_button_group (GTK_RADIO_BUTTON (button)); + group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)); button = gtk_radio_button_new_with_label(group, "button2"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); button = gtk_radio_button_new_with_label( - gtk_radio_button_group (GTK_RADIO_BUTTON (button)), + gtk_radio_button_get_group (GTK_RADIO_BUTTON (button)), "button3"); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); gtk_widget_show (button); @@ -67,7 +66,7 @@ int main( int argc, gtk_widget_show (box2); button = gtk_button_new_with_label ("close"); - gtk_signal_connect_object (GTK_OBJECT (button), "clicked", + g_signal_connect_swapped (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC(close_application), GTK_OBJECT (window)); gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0); @@ -78,6 +77,5 @@ int main( int argc, gtk_main(); - return(0); + return 0; } -/* example-end */ |