diff options
author | Federico Mena Quintero <federico@ximian.com> | 2003-09-11 00:56:46 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2003-09-11 00:56:46 +0000 |
commit | 9044d774bb625c6b804e24064339c2e485eec9b0 (patch) | |
tree | 79f2e651b0215cec49018025b738aa48ac77bccd /tests/testfilechooser.c | |
parent | aa22566e6c98745e38b777b2c099bdc799857f59 (diff) | |
download | gtk+-9044d774bb625c6b804e24064339c2e485eec9b0.tar.gz |
Added an API point about needing a way to fetch the hpaned position so we
2003-09-10 Federico Mena Quintero <federico@ximian.com>
* TODO: Added an API point about needing a way to fetch the hpaned
position so we can save it.
* gtkfilechooser.c (_gtk_file_chooser_get_paths): Fixed API docs.
(gtk_file_chooser_get_uris): Likewise.
(gtk_file_chooser_get_filenames): Likewise.
* gtkfilechooserdialog.c (file_chooser_widget_file_activated): New
callback, calls gtk_window_activate_default().
* testfilechooser.c (response_cb): Print the selected files if the
user clicks OK.
Diffstat (limited to 'tests/testfilechooser.c')
-rw-r--r-- | tests/testfilechooser.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 5ff9af1d2c..be1127f9db 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -50,6 +50,32 @@ static void response_cb (GtkDialog *dialog, gint response_id) { + if (response_id == GTK_RESPONSE_OK) + { + GSList *list; + + list = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (dialog)); + + if (list) + { + GSList *l; + + g_print ("Selected files:\n"); + + for (l = list; l; l = l->next) + { + g_print ("%s\n", (char *) l->data); + g_free (l->data); + } + + g_slist_free (list); + } + else + g_print ("No selected files\n"); + } + else + g_print ("Dialog was closed\n"); + gtk_main_quit (); } |