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/frame | |
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/frame')
-rw-r--r-- | examples/frame/Makefile | 10 | ||||
-rw-r--r-- | examples/frame/frame.c | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/examples/frame/Makefile b/examples/frame/Makefile index b8e389ab7d..049b8c40a2 100644 --- a/examples/frame/Makefile +++ b/examples/frame/Makefile @@ -1,8 +1,14 @@ CC = gcc -frame: frame.c - $(CC) `pkg-config --cflags gtk+-2.0` frame.c -o frame `pkg-config --libs gtk+-2.0` +CFLAGS = -Wall \ + -DG_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ + -DGDK_PIXBUF_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED + +frame: frame.c + $(CC) frame.c -o frame $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` clean: rm -f *.o frame diff --git a/examples/frame/frame.c b/examples/frame/frame.c index e2cb09a39a..05afcd4762 100644 --- a/examples/frame/frame.c +++ b/examples/frame/frame.c @@ -1,4 +1,3 @@ -/* example-start frame frame.c */ #include <gtk/gtk.h> @@ -8,8 +7,6 @@ int main( int argc, /* GtkWidget is the storage type for widgets */ GtkWidget *window; GtkWidget *frame; - GtkWidget *button; - gint i; /* Initialise GTK */ gtk_init(&argc, &argv); @@ -19,10 +16,10 @@ int main( int argc, gtk_window_set_title(GTK_WINDOW(window), "Frame Example"); /* Here we connect the "destroy" event to a signal handler */ - gtk_signal_connect (GTK_OBJECT (window), "destroy", + g_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_main_quit), NULL); - gtk_widget_set_usize(window, 300, 300); + gtk_widget_set_size_request (window, 300, 300); /* Sets the border width of the window. */ gtk_container_set_border_width (GTK_CONTAINER (window), 10); @@ -47,6 +44,5 @@ int main( int argc, /* Enter the event loop */ gtk_main (); - return(0); + return 0; } -/* example-end */ |