diff options
author | GMT 1999 Tony Gale <gale@gtk.org> | 1999-11-13 23:06:46 +0000 |
---|---|---|
committer | Tony Gale <gale@src.gnome.org> | 1999-11-13 23:06:46 +0000 |
commit | ee3d13766031e30653d82764aef92ae444015c5e (patch) | |
tree | c0d025531a52bee6a44d65babd111b6d3f04bed7 /examples/filesel | |
parent | e4df9fa95b83ce233c2129c3098e2727316e982b (diff) | |
download | gtk+-ee3d13766031e30653d82764aef92ae444015c5e.tar.gz |
threads example from Erik Mouw. New question on GtkLabel background
Sat Nov 13 22:30:29 GMT 1999 Tony Gale <gale@gtk.org>
* docs/gtkfaq.sgml: threads example from Erik Mouw.
New question on GtkLabel background colors.
* docs/gtk_tut.sgml:
- Correct the example code callback
function definitions.
- Update the gtkdial example code, from Frans van Schaik.
- Update setselection.c to current API.
* examples/Makefile examples/*/*.c: Update to code
listed in tutorial.
Diffstat (limited to 'examples/filesel')
-rw-r--r-- | examples/filesel/filesel.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/filesel/filesel.c b/examples/filesel/filesel.c index 63b5172cba..1e1fcaad40 100644 --- a/examples/filesel/filesel.c +++ b/examples/filesel/filesel.c @@ -3,17 +3,20 @@ #include <gtk/gtk.h> /* Get the selected filename and print it to the console */ -void file_ok_sel (GtkWidget *w, GtkFileSelection *fs) +void file_ok_sel( GtkWidget *w, + GtkFileSelection *fs ) { g_print ("%s\n", gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs))); } -void destroy (GtkWidget *widget, gpointer data) +void destroy( GtkWidget *widget, + gpointer data ) { gtk_main_quit (); } -int main (int argc, char *argv[]) +int main( int argc, + char *argv[] ) { GtkWidget *filew; @@ -29,7 +32,8 @@ int main (int argc, char *argv[]) "clicked", (GtkSignalFunc) file_ok_sel, filew ); /* Connect the cancel_button to destroy the widget */ - gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION (filew)->cancel_button), + gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION + (filew)->cancel_button), "clicked", (GtkSignalFunc) gtk_widget_destroy, GTK_OBJECT (filew)); |