summaryrefslogtreecommitdiff
path: root/examples/filesel
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/filesel
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/filesel')
-rw-r--r--examples/filesel/Makefile8
-rw-r--r--examples/filesel/filesel.c14
2 files changed, 13 insertions, 9 deletions
diff --git a/examples/filesel/Makefile b/examples/filesel/Makefile
index fe13786831..92d5e3d003 100644
--- a/examples/filesel/Makefile
+++ b/examples/filesel/Makefile
@@ -1,8 +1,14 @@
CC = gcc
+CFLAGS = -Wall \
+ -DG_DISABLE_DEPRECATED \
+ -DGDK_DISABLE_DEPRECATED \
+ -DGDK_PIXBUF_DISABLE_DEPRECATED \
+ -DGTK_DISABLE_DEPRECATED
+
filesel: filesel.c
- $(CC) `pkg-config --cflags gtk+-2.0` filesel.c -o filesel `pkg-config --libs gtk+-2.0`
+ $(CC) filesel.c -o filesel $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs`
clean:
rm -f *.o filesel
diff --git a/examples/filesel/filesel.c b/examples/filesel/filesel.c
index 1e1fcaad40..87daf12645 100644
--- a/examples/filesel/filesel.c
+++ b/examples/filesel/filesel.c
@@ -1,4 +1,3 @@
-/* example-start filesel filesel.c */
#include <gtk/gtk.h>
@@ -25,16 +24,16 @@ int main( int argc,
/* Create a new file selection widget */
filew = gtk_file_selection_new ("File selection");
- gtk_signal_connect (GTK_OBJECT (filew), "destroy",
- (GtkSignalFunc) destroy, &filew);
+ g_signal_connect (GTK_OBJECT (filew), "destroy",
+ GTK_SIGNAL_FUNC (destroy), &filew);
/* Connect the ok_button to file_ok_sel function */
- gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
- "clicked", (GtkSignalFunc) file_ok_sel, filew );
+ g_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
+ "clicked", GTK_SIGNAL_FUNC (file_ok_sel), filew );
/* Connect the cancel_button to destroy the widget */
- gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ g_signal_connect_swapped (GTK_OBJECT (GTK_FILE_SELECTION
(filew)->cancel_button),
- "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ "clicked", GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (filew));
/* Lets set the filename, as if this were a save dialog, and we are giving
@@ -46,4 +45,3 @@ int main( int argc,
gtk_main ();
return 0;
}
-/* example-end */