static void test_file_chooser_widget_basic (void) { GtkWidget *widget; /* This test also tests the internal GtkPathBar widget */ g_test_log_set_fatal_handler (ignore_gvfs_warning, NULL); widget = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); g_assert (GTK_IS_FILE_CHOOSER_WIDGET (widget)); /* XXX BUG: * * Spin the mainloop for a bit, this allows the file operations * to complete, GtkFileChooserDefault has a bug where it leaks * GtkTreeRowReferences to the internal shortcuts_model * * Since we assert all automated children are finalized we * can catch this */ g_timeout_add (100, main_loop_quit_cb, NULL); gtk_main(); gtk_widget_destroy (widget); }
static void glade_gtk_file_chooser_forall (GtkWidget * widget, gpointer data) { /* GtkFileChooserWidget packs a GtkFileChooserDefault */ if (GTK_IS_FILE_CHOOSER_WIDGET (widget)) gtk_container_forall (GTK_CONTAINER (widget), glade_gtk_file_chooser_default_forall, NULL); }