summaryrefslogtreecommitdiff
path: root/examples/tree
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/tree
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/tree')
-rw-r--r--examples/tree/Makefile8
-rw-r--r--examples/tree/tree.c7
2 files changed, 10 insertions, 5 deletions
diff --git a/examples/tree/Makefile b/examples/tree/Makefile
index 015f78ece4..de510b9b89 100644
--- a/examples/tree/Makefile
+++ b/examples/tree/Makefile
@@ -1,8 +1,14 @@
CC = gcc
+CFLAGS = -Wall \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED
+
tree: tree.c
- $(CC) `pkg-config --cflags gtk+-2.0` tree.c -o tree `pkg-config --libs gtk+-2.0`
+ $(CC) tree.c -o tree $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`
clean:
rm -f *.o tree
diff --git a/examples/tree/tree.c b/examples/tree/tree.c
index 67b93fe283..acd431e13f 100644
--- a/examples/tree/tree.c
+++ b/examples/tree/tree.c
@@ -1,5 +1,5 @@
-/* example-start tree tree.c */
+#define GTK_ENABLE_BROKEN
#include <gtk/gtk.h>
/* for all the GtkItem:: and GtkTreeItem:: signals */
@@ -44,7 +44,7 @@ static void cb_selection_changed( GtkWidget *tree )
g_print ("selection_change called for tree %p\n", tree);
g_print ("selected objects are:\n");
- i = GTK_TREE_SELECTION(tree);
+ i = GTK_TREE_SELECTION_OLD(tree);
while (i){
gchar *name;
GtkLabel *label;
@@ -81,7 +81,7 @@ int main( int argc,
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_widget_set_usize (scrolled_win, 150, 200);
+ gtk_widget_set_size_request (scrolled_win, 150, 200);
gtk_container_add (GTK_CONTAINER(window), scrolled_win);
gtk_widget_show (scrolled_win);
@@ -179,4 +179,3 @@ int main( int argc,
gtk_main();
return 0;
}
-/* example-end */