From f9f34aef79dafaf3dd90d88eb75763799723b4b3 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 23 Aug 2006 21:59:18 +0000 Subject: [PATCH] Renamed to gtk_file_system_create() so that it will get exported and we 2006-08-23 Federico Mena Quintero * gtk/gtkfilesystem.[ch] (_gtk_file_system_create): Renamed to gtk_file_system_create() so that it will get exported and we can use it in the test program. * gtk/gtk.symbols: Added gtk_file_system_create. * gtk/gtkfilechooserdefault.c (set_file_system_backend): Use gtk_file_system_create(). * tests/autotestfilesystem.c: New file with automatic tests for the async callbacks and cancelation policy of GtkFileSystem. * tests/Makefile.am: Added autotestfilesystem. --- ChangeLog | 16 ++++++++++++++++ gtk/gtk.symbols | 1 + gtk/gtkfilechooserdefault.c | 4 ++-- gtk/gtkfilesystem.c | 2 +- gtk/gtkfilesystem.h | 2 +- tests/Makefile.am | 6 ++++++ tests/testfilechooser.c | 2 ++ 7 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2577e27f1..dc6ddc406c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2006-08-23 Federico Mena Quintero + + * gtk/gtkfilesystem.[ch] (_gtk_file_system_create): Renamed to + gtk_file_system_create() so that it will get exported and we can + use it in the test program. + + * gtk/gtk.symbols: Added gtk_file_system_create. + + * gtk/gtkfilechooserdefault.c (set_file_system_backend): Use + gtk_file_system_create(). + + * tests/autotestfilesystem.c: New file with automatic tests for + the async callbacks and cancelation policy of GtkFileSystem. + + * tests/Makefile.am: Added autotestfilesystem. + 2006-08-23 Matthias Clasen * gtk/gtkprinteroptionwidget.[hc]: Fix confusion about diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols index b90c633275..a593bb46cc 100644 --- a/gtk/gtk.symbols +++ b/gtk/gtk.symbols @@ -1431,6 +1431,7 @@ gtk_file_path_get_type G_GNUC_CONST gtk_file_paths_copy gtk_file_paths_free gtk_file_paths_sort +gtk_file_system_create gtk_file_system_cancel_operation gtk_file_system_create_folder gtk_file_system_error_quark diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index e5b6e90602..4917ed0d3c 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -4732,7 +4732,7 @@ set_file_system_backend (GtkFileChooserDefault *impl, impl->file_system = NULL; if (backend) - impl->file_system = _gtk_file_system_create (backend); + impl->file_system = gtk_file_system_create (backend); else { GtkSettings *settings = gtk_settings_get_default (); @@ -4741,7 +4741,7 @@ set_file_system_backend (GtkFileChooserDefault *impl, g_object_get (settings, "gtk-file-chooser-backend", &default_backend, NULL); if (default_backend) { - impl->file_system = _gtk_file_system_create (default_backend); + impl->file_system = gtk_file_system_create (default_backend); g_free (default_backend); } } diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 7e10039871..12ee4b8758 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -1364,7 +1364,7 @@ _gtk_file_system_module_create (GtkFileSystemModule *fs_module) GtkFileSystem * -_gtk_file_system_create (const char *file_system_name) +gtk_file_system_create (const char *file_system_name) { GSList *l; char *module_path; diff --git a/gtk/gtkfilesystem.h b/gtk/gtkfilesystem.h index 57c458a028..18aa584855 100644 --- a/gtk/gtkfilesystem.h +++ b/gtk/gtkfilesystem.h @@ -441,7 +441,7 @@ void gtk_file_paths_free (GSList *paths); /* GtkFileSystem modules support */ -GtkFileSystem *_gtk_file_system_create (const char *file_system_name); +GtkFileSystem *gtk_file_system_create (const char *file_system_name); G_END_DECLS diff --git a/tests/Makefile.am b/tests/Makefile.am index 32bac901e4..754362e847 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,6 +28,7 @@ TESTS = floatingtest noinst_PROGRAMS = \ autotestfilechooser \ + autotestfilesystem \ floatingtest \ simple \ print-editor \ @@ -84,6 +85,7 @@ noinst_PROGRAMS = \ testgrouping autotestfilechooser_DEPENDENCIES = $(TEST_DEPS) +autotestfilesystem_DEPENDENCIES = $(TEST_DEPS) simple_DEPENDENCIES = $(TEST_DEPS) floatingtest_DEPENDENCIES = $(TEST_DEPS) print_editor_DEPENDENCIES = $(TEST_DEPS) @@ -134,6 +136,7 @@ testactions_DEPENDENCIES = $(TEST_DEPS) testgrouping_DEPENDENCIES = $(TEST_DEPS) autotestfilechooser_LDADD = $(LDADDS) +autotestfilesystem_LDADD = $(LDADDS) simple_LDADD = $(LDADDS) floatingtest_LDADD = $(LDADDS) print_editor_LDADD = $(LDADDS) @@ -193,6 +196,9 @@ testgrouping_LDADD = $(LDADDS) autotestfilechooser_SOURCES = \ autotestfilechooser.c +autotestfilesystem_SOURCES = \ + autotestfilesystem.c + testentrycompletion_SOURCES = \ prop-editor.c \ testentrycompletion.c diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c index 548114fd17..dd6773daa9 100644 --- a/tests/testfilechooser.c +++ b/tests/testfilechooser.c @@ -509,7 +509,9 @@ main (int argc, char **argv) dialog = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG, "action", action, +#if 0 "file-system-backend", "gtk+", +#endif "select-multiple", multiple, NULL); switch (action)