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/table | |
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/table')
-rw-r--r-- | examples/table/Makefile | 8 | ||||
-rw-r--r-- | examples/table/table.c | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/examples/table/Makefile b/examples/table/Makefile index b6221ef637..98cbc50b02 100644 --- a/examples/table/Makefile +++ b/examples/table/Makefile @@ -1,8 +1,14 @@ CC = gcc +CFLAGS = -Wall \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + table: table.c - $(CC) `pkg-config --cflags gtk+-2.0` table.c -o table `pkg-config --libs gtk+-2.0` + $(CC) table.c -o table $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` clean: rm -f *.o table diff --git a/examples/table/table.c b/examples/table/table.c index a6b020c149..5311ff4db2 100644 --- a/examples/table/table.c +++ b/examples/table/table.c @@ -1,4 +1,3 @@ -/* example-start table table.c */ #include <gtk/gtk.h> @@ -16,7 +15,7 @@ gint delete_event( GtkWidget *widget, gpointer data ) { gtk_main_quit (); - return(FALSE); + return FALSE; } int main( int argc, @@ -36,7 +35,7 @@ int main( int argc, /* Set a handler for delete_event that immediately * exits GTK. */ - gtk_signal_connect (GTK_OBJECT (window), "delete_event", + g_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (delete_event), NULL); /* Sets the border width of the window. */ @@ -53,7 +52,7 @@ int main( int argc, /* When the button is clicked, we call the "callback" function * with a pointer to "button 1" as its argument */ - gtk_signal_connect (GTK_OBJECT (button), "clicked", + g_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (callback), (gpointer) "button 1"); @@ -68,7 +67,7 @@ int main( int argc, /* When the button is clicked, we call the "callback" function * with a pointer to "button 2" as its argument */ - gtk_signal_connect (GTK_OBJECT (button), "clicked", + g_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (callback), (gpointer) "button 2"); /* Insert button 2 into the upper right quadrant of the table */ gtk_table_attach_defaults (GTK_TABLE(table), button, 1, 2, 0, 1); @@ -80,7 +79,7 @@ int main( int argc, /* When the button is clicked, we call the "delete_event" function * and the program exits */ - gtk_signal_connect (GTK_OBJECT (button), "clicked", + g_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (delete_event), NULL); /* Insert the quit button into the both @@ -96,4 +95,3 @@ int main( int argc, return 0; } -/* example-end */ |