diff --git a/ChangeLog b/ChangeLog index 3882dc0133..54374af0a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-02-05 Martin Nordholts + + Applied patch from Olof Frahm which makes loading of data + files (brushes and so on) happen recursively (bug #514160). + + * app/core/gimpdatafactory.c + (gimp_data_factory_data_load): Recursively search sub directories + for data files using the new helper function + (gimp_data_factory_load_data_recursive) + 2008-02-05 Sven Neumann * app/tools/gimpgegltool.c: spelling fix. diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c index 5314e104d4..40669be4ef 100644 --- a/app/core/gimpdatafactory.c +++ b/app/core/gimpdatafactory.c @@ -57,6 +57,8 @@ static gchar * gimp_data_factory_get_save_dir (GimpDataFactory *factory); static void gimp_data_factory_load_data (const GimpDatafileData *file_data, gpointer data); +static void gimp_data_factory_load_data_recursive (const GimpDatafileData *file_data, + gpointer data); G_DEFINE_TYPE (GimpDataFactory, gimp_data_factory, GIMP_TYPE_OBJECT) @@ -311,6 +313,10 @@ gimp_data_factory_data_load (GimpDataFactory *factory, gimp_datafiles_read_directories (path, G_FILE_TEST_EXISTS, gimp_data_factory_load_data, &context); + gimp_datafiles_read_directories (path, G_FILE_TEST_IS_DIR, + gimp_data_factory_load_data_recursive, + &context); + if (writable_path) { gimp_path_free (writable_list); @@ -645,6 +651,20 @@ gimp_data_factory_get_save_dir (GimpDataFactory *factory) return writable_dir; } +static void +gimp_data_factory_load_data_recursive (const GimpDatafileData *file_data, + gpointer data) +{ + GimpDataLoadContext *context = data; + + gimp_datafiles_read_directories (file_data->filename, G_FILE_TEST_EXISTS, + gimp_data_factory_load_data, context); + + gimp_datafiles_read_directories (file_data->filename, G_FILE_TEST_IS_DIR, + gimp_data_factory_load_data_recursive, + context); +} + static void gimp_data_factory_load_data (const GimpDatafileData *file_data, gpointer data)