diff options
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 */ |