Applied patch from Olof Frahm which makes loading of data files (brushes

2008-02-05  Martin Nordholts  <martinn@svn.gnome.org>

	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)

svn path=/trunk/; revision=24814
This commit is contained in:
Martin Nordholts 2008-02-05 19:15:13 +00:00 committed by Martin Nordholts
parent a93cb8d785
commit 356b1a87a5
2 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2008-02-05 Martin Nordholts <martinn@svn.gnome.org>
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 <sven@gimp.org>
* app/tools/gimpgegltool.c: spelling fix.

View File

@ -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)