gimp r27812 - in trunk: . app/actions app/core app/dialogs app/pdb app/widgets tools/pdbgen/pdb
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27812 - in trunk: . app/actions app/core app/dialogs app/pdb app/widgets tools/pdbgen/pdb
- Date: Fri, 19 Dec 2008 21:58:17 +0000 (UTC)
Author: martinn
Date: Fri Dec 19 21:58:17 2008
New Revision: 27812
URL: http://svn.gnome.org/viewvc/gimp?rev=27812&view=rev
Log:
* app/core/gimpdatafactory.[ch]: Make instance members private and
add getters for required members.
(gimp_data_factory_get_container)
(gimp_data_factory_get_gimp)
(gimp_data_factory_has_data_new_func): The new getters.
* app/actions/context-commands.c
* app/actions/data-commands.c
* app/core/gimp-gradients.c
* app/core/gimp.c
* app/core/gimpcontext.c
* app/core/gimpdatafactory.c
* app/core/gimpdatafactory.h
* app/dialogs/convert-dialog.c
* app/dialogs/palette-import-dialog.c
* app/pdb/gimppdb-utils.c
* app/widgets/gimpbrushfactoryview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpselectiondata.c
* app/widgets/gimpviewablebox.c
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palettes.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb: Use the getters.
* app/pdb/brush-select-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/gradient-select-cmds.c
* app/pdb/gradients-cmds.c
* app/pdb/palette-select-cmds.c
* app/pdb/palettes-cmds.c
* app/pdb/pattern-select-cmds.c
* app/pdb/patterns-cmds.c: Regenerated.
Modified:
trunk/ChangeLog
trunk/app/actions/context-commands.c
trunk/app/actions/data-commands.c
trunk/app/core/gimp-gradients.c
trunk/app/core/gimp.c
trunk/app/core/gimpcontext.c
trunk/app/core/gimpdatafactory.c
trunk/app/core/gimpdatafactory.h
trunk/app/dialogs/convert-dialog.c
trunk/app/dialogs/palette-import-dialog.c
trunk/app/pdb/brush-select-cmds.c
trunk/app/pdb/brushes-cmds.c
trunk/app/pdb/gimppdb-utils.c
trunk/app/pdb/gradient-select-cmds.c
trunk/app/pdb/gradients-cmds.c
trunk/app/pdb/palette-select-cmds.c
trunk/app/pdb/palettes-cmds.c
trunk/app/pdb/pattern-select-cmds.c
trunk/app/pdb/patterns-cmds.c
trunk/app/widgets/gimpbrushfactoryview.c
trunk/app/widgets/gimpdataeditor.c
trunk/app/widgets/gimpdatafactoryview.c
trunk/app/widgets/gimpselectiondata.c
trunk/app/widgets/gimpviewablebox.c
trunk/tools/pdbgen/pdb/brush_select.pdb
trunk/tools/pdbgen/pdb/brushes.pdb
trunk/tools/pdbgen/pdb/gradient_select.pdb
trunk/tools/pdbgen/pdb/gradients.pdb
trunk/tools/pdbgen/pdb/palette_select.pdb
trunk/tools/pdbgen/pdb/palettes.pdb
trunk/tools/pdbgen/pdb/pattern_select.pdb
trunk/tools/pdbgen/pdb/patterns.pdb
Modified: trunk/app/actions/context-commands.c
==============================================================================
--- trunk/app/actions/context-commands.c (original)
+++ trunk/app/actions/context-commands.c Fri Dec 19 21:58:17 2008
@@ -421,7 +421,7 @@
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
- context, context->gimp->brush_factory->container);
+ context, gimp_data_factory_get_container (context->gimp->brush_factory));
}
void
@@ -433,7 +433,7 @@
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
- context, context->gimp->pattern_factory->container);
+ context, gimp_data_factory_get_container (context->gimp->pattern_factory));
}
void
@@ -445,7 +445,7 @@
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
- context, context->gimp->palette_factory->container);
+ context, gimp_data_factory_get_container (context->gimp->palette_factory));
}
void
@@ -457,7 +457,7 @@
return_if_no_context (context, data);
context_select_object ((GimpActionSelectType) value,
- context, context->gimp->gradient_factory->container);
+ context, gimp_data_factory_get_container (context->gimp->gradient_factory));
}
void
Modified: trunk/app/actions/data-commands.c
==============================================================================
--- trunk/app/actions/data-commands.c (original)
+++ trunk/app/actions/data-commands.c Fri Dec 19 21:58:17 2008
@@ -82,7 +82,7 @@
data = (GimpData *)
gimp_context_get_by_type (context,
- gimp_container_get_children_type (view->factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)));
if (data && data->filename)
{
@@ -122,7 +122,7 @@
{
GimpDataFactoryView *view = GIMP_DATA_FACTORY_VIEW (user_data);
- if (view->factory->data_new_func)
+ if (gimp_data_factory_has_data_new_func (view->factory))
{
GimpContext *context;
GimpData *data;
@@ -135,7 +135,7 @@
if (data)
{
gimp_context_set_by_type (context,
- gimp_container_get_children_type (view->factory->container),
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)),
GIMP_OBJECT (data));
gtk_button_clicked (GTK_BUTTON (view->edit_button));
@@ -155,9 +155,9 @@
data = (GimpData *)
gimp_context_get_by_type (context,
- gimp_container_get_children_type (view->factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)));
- if (data && gimp_container_have (view->factory->container,
+ if (data && gimp_container_have (gimp_data_factory_get_container (view->factory),
GIMP_OBJECT (data)))
{
GimpData *new_data;
@@ -167,7 +167,7 @@
if (new_data)
{
gimp_context_set_by_type (context,
- gimp_container_get_children_type (view->factory->container),
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)),
GIMP_OBJECT (new_data));
gtk_button_clicked (GTK_BUTTON (view->edit_button));
@@ -187,7 +187,7 @@
data = (GimpData *)
gimp_context_get_by_type (context,
- gimp_container_get_children_type (view->factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)));
if (data && data->filename && *data->filename)
{
@@ -214,9 +214,9 @@
data = (GimpData *)
gimp_context_get_by_type (context,
- gimp_container_get_children_type (view->factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)));
- if (data && data->deletable && gimp_container_have (view->factory->container,
+ if (data && data->deletable && gimp_container_have (gimp_data_factory_get_container (view->factory),
GIMP_OBJECT (data)))
{
GimpDataDeleteData *delete_data;
@@ -288,9 +288,9 @@
data = (GimpData *)
gimp_context_get_by_type (context,
- gimp_container_get_children_type (view->factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (view->factory)));
- if (data && gimp_container_have (view->factory->container,
+ if (data && gimp_container_have (gimp_data_factory_get_container (view->factory),
GIMP_OBJECT (data)))
{
GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (view));
@@ -321,13 +321,13 @@
GimpObject *new_active;
GError *error = NULL;
- new_active = gimp_container_get_neighbor_of_active (factory->container,
+ new_active = gimp_container_get_neighbor_of_active (gimp_data_factory_get_container (factory),
delete_data->context,
GIMP_OBJECT (data));
if (! gimp_data_factory_data_delete (factory, data, TRUE, &error))
{
- gimp_message (factory->gimp,
+ gimp_message (gimp_data_factory_get_gimp (factory),
G_OBJECT (delete_data->view), GIMP_MESSAGE_ERROR,
"%s", error->message);
g_clear_error (&error);
@@ -335,7 +335,7 @@
if (new_active)
gimp_context_set_by_type (delete_data->context,
- gimp_container_get_children_type (factory->container),
+ gimp_container_get_children_type (gimp_data_factory_get_container (factory)),
new_active);
}
Modified: trunk/app/core/gimp-gradients.c
==============================================================================
--- trunk/app/core/gimp-gradients.c (original)
+++ trunk/app/core/gimp-gradients.c Fri Dec 19 21:58:17 2008
@@ -93,7 +93,7 @@
gradient->segments->left_color_type = GIMP_GRADIENT_COLOR_FOREGROUND;
gradient->segments->right_color_type = GIMP_GRADIENT_COLOR_BACKGROUND;
- gimp_container_add (gimp->gradient_factory->container,
+ gimp_container_add (gimp_data_factory_get_container (gimp->gradient_factory),
GIMP_OBJECT (gradient));
g_object_unref (gradient);
Modified: trunk/app/core/gimp.c
==============================================================================
--- trunk/app/core/gimp.c (original)
+++ trunk/app/core/gimp.c Fri Dec 19 21:58:17 2008
@@ -604,7 +604,7 @@
clipboard_brush = gimp_brush_clipboard_new (gimp);
gimp_data_make_internal (GIMP_DATA (clipboard_brush),
"gimp-brush-clipboard");
- gimp_container_add (gimp->brush_factory->container,
+ gimp_container_add (gimp_data_factory_get_container (gimp->brush_factory),
GIMP_OBJECT (clipboard_brush));
g_object_unref (clipboard_brush);
@@ -612,7 +612,7 @@
clipboard_pattern = gimp_pattern_clipboard_new (gimp);
gimp_data_make_internal (GIMP_DATA (clipboard_pattern),
"gimp-pattern-clipboard");
- gimp_container_add (gimp->pattern_factory->container,
+ gimp_container_add (gimp_data_factory_get_container (gimp->pattern_factory),
GIMP_OBJECT (clipboard_pattern));
g_object_unref (clipboard_pattern);
Modified: trunk/app/core/gimpcontext.c
==============================================================================
--- trunk/app/core/gimpcontext.c (original)
+++ trunk/app/core/gimpcontext.c Fri Dec 19 21:58:17 2008
@@ -742,31 +742,31 @@
G_CALLBACK (gimp_context_paint_info_list_thaw),
object, 0);
- g_signal_connect_object (gimp->brush_factory->container, "remove",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->brush_factory), "remove",
G_CALLBACK (gimp_context_brush_removed),
object, 0);
- g_signal_connect_object (gimp->brush_factory->container, "thaw",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->brush_factory), "thaw",
G_CALLBACK (gimp_context_brush_list_thaw),
object, 0);
- g_signal_connect_object (gimp->pattern_factory->container, "remove",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->pattern_factory), "remove",
G_CALLBACK (gimp_context_pattern_removed),
object, 0);
- g_signal_connect_object (gimp->pattern_factory->container, "thaw",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->pattern_factory), "thaw",
G_CALLBACK (gimp_context_pattern_list_thaw),
object, 0);
- g_signal_connect_object (gimp->gradient_factory->container, "remove",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->gradient_factory), "remove",
G_CALLBACK (gimp_context_gradient_removed),
object, 0);
- g_signal_connect_object (gimp->gradient_factory->container, "thaw",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->gradient_factory), "thaw",
G_CALLBACK (gimp_context_gradient_list_thaw),
object, 0);
- g_signal_connect_object (gimp->palette_factory->container, "remove",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->palette_factory), "remove",
G_CALLBACK (gimp_context_palette_removed),
object, 0);
- g_signal_connect_object (gimp->palette_factory->container, "thaw",
+ g_signal_connect_object (gimp_data_factory_get_container (gimp->palette_factory), "thaw",
G_CALLBACK (gimp_context_palette_list_thaw),
object, 0);
@@ -1185,25 +1185,25 @@
break;
case GIMP_CONTEXT_PROP_BRUSH:
- container = context->gimp->brush_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->brush_factory);
current = (GimpObject *) context->brush;
name_loc = &context->brush_name;
break;
case GIMP_CONTEXT_PROP_PATTERN:
- container = context->gimp->pattern_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->pattern_factory);
current = (GimpObject *) context->pattern;
name_loc = &context->pattern_name;
break;
case GIMP_CONTEXT_PROP_GRADIENT:
- container = context->gimp->gradient_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->gradient_factory);
current = (GimpObject *) context->gradient;
name_loc = &context->gradient_name;
break;
case GIMP_CONTEXT_PROP_PALETTE:
- container = context->gimp->palette_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->palette_factory);
current = (GimpObject *) context->palette;
name_loc = &context->palette_name;
break;
Modified: trunk/app/core/gimpdatafactory.c
==============================================================================
--- trunk/app/core/gimpdatafactory.c (original)
+++ trunk/app/core/gimpdatafactory.c Fri Dec 19 21:58:17 2008
@@ -44,6 +44,22 @@
#define WRITABLE_PATH_KEY "gimp-data-factory-writable-path"
+struct _GimpDataFactoryPriv
+{
+ Gimp *gimp;
+ GimpContainer *container;
+
+ gchar *path_property_name;
+ gchar *writable_property_name;
+
+ const GimpDataFactoryLoaderEntry *loader_entries;
+ gint n_loader_entries;
+
+ GimpDataNewFunc data_new_func;
+ GimpDataGetStandardFunc data_get_standard_func;
+};
+
+
static void gimp_data_factory_finalize (GObject *object);
static void gimp_data_factory_data_load (GimpDataFactory *factory,
@@ -74,19 +90,25 @@
object_class->finalize = gimp_data_factory_finalize;
gimp_object_class->get_memsize = gimp_data_factory_get_memsize;
+
+ g_type_class_add_private (klass, sizeof (GimpDataFactoryPriv));
}
static void
gimp_data_factory_init (GimpDataFactory *factory)
{
- factory->gimp = NULL;
- factory->container = NULL;
- factory->path_property_name = NULL;
- factory->writable_property_name = NULL;
- factory->loader_entries = NULL;
- factory->n_loader_entries = 0;
- factory->data_new_func = NULL;
- factory->data_get_standard_func = NULL;
+ factory->priv = G_TYPE_INSTANCE_GET_PRIVATE (factory,
+ GIMP_TYPE_DATA_FACTORY,
+ GimpDataFactoryPriv);
+
+ factory->priv->gimp = NULL;
+ factory->priv->container = NULL;
+ factory->priv->path_property_name = NULL;
+ factory->priv->writable_property_name = NULL;
+ factory->priv->loader_entries = NULL;
+ factory->priv->n_loader_entries = 0;
+ factory->priv->data_new_func = NULL;
+ factory->priv->data_get_standard_func = NULL;
}
static void
@@ -94,22 +116,22 @@
{
GimpDataFactory *factory = GIMP_DATA_FACTORY (object);
- if (factory->container)
+ if (factory->priv->container)
{
- g_object_unref (factory->container);
- factory->container = NULL;
+ g_object_unref (factory->priv->container);
+ factory->priv->container = NULL;
}
- if (factory->path_property_name)
+ if (factory->priv->path_property_name)
{
- g_free (factory->path_property_name);
- factory->path_property_name = NULL;
+ g_free (factory->priv->path_property_name);
+ factory->priv->path_property_name = NULL;
}
- if (factory->writable_property_name)
+ if (factory->priv->writable_property_name)
{
- g_free (factory->writable_property_name);
- factory->writable_property_name = NULL;
+ g_free (factory->priv->writable_property_name);
+ factory->priv->writable_property_name = NULL;
}
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -122,7 +144,7 @@
GimpDataFactory *factory = GIMP_DATA_FACTORY (object);
gint64 memsize = 0;
- memsize += gimp_object_get_memsize (GIMP_OBJECT (factory->container),
+ memsize += gimp_object_get_memsize (GIMP_OBJECT (factory->priv->container),
gui_size);
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
@@ -150,19 +172,19 @@
factory = g_object_new (GIMP_TYPE_DATA_FACTORY, NULL);
- factory->gimp = gimp;
- factory->container = gimp_list_new (data_type, TRUE);
- gimp_list_set_sort_func (GIMP_LIST (factory->container),
+ factory->priv->gimp = gimp;
+ factory->priv->container = gimp_list_new (data_type, TRUE);
+ gimp_list_set_sort_func (GIMP_LIST (factory->priv->container),
(GCompareFunc) gimp_data_compare);
- factory->path_property_name = g_strdup (path_property_name);
- factory->writable_property_name = g_strdup (writable_property_name);
+ factory->priv->path_property_name = g_strdup (path_property_name);
+ factory->priv->writable_property_name = g_strdup (writable_property_name);
- factory->loader_entries = loader_entries;
- factory->n_loader_entries = n_loader_entries;
+ factory->priv->loader_entries = loader_entries;
+ factory->priv->n_loader_entries = n_loader_entries;
- factory->data_new_func = new_func;
- factory->data_get_standard_func = get_standard_func;
+ factory->priv->data_new_func = new_func;
+ factory->priv->data_get_standard_func = get_standard_func;
return factory;
}
@@ -176,11 +198,11 @@
/* Freeze and thaw the container even if no_data,
* this creates the standard data that serves as fallback.
*/
- gimp_container_freeze (factory->container);
+ gimp_container_freeze (factory->priv->container);
if (! no_data)
{
- if (factory->gimp->be_verbose)
+ if (factory->priv->gimp->be_verbose)
{
const gchar *name = gimp_object_get_name (GIMP_OBJECT (factory));
@@ -190,7 +212,7 @@
gimp_data_factory_data_load (factory, NULL);
}
- gimp_container_thaw (factory->container);
+ gimp_container_thaw (factory->priv->container);
}
typedef struct
@@ -225,7 +247,7 @@
g_object_ref (object);
- gimp_container_remove (factory->container, GIMP_OBJECT (object));
+ gimp_container_remove (factory->priv->container, GIMP_OBJECT (object));
list = g_hash_table_lookup (cache, filename);
list = g_list_prepend (list, object);
@@ -242,10 +264,10 @@
{
GimpList *list;
- if (gimp_container_is_empty (factory->container))
+ if (gimp_container_is_empty (factory->priv->container))
return;
- list = GIMP_LIST (factory->container);
+ list = GIMP_LIST (factory->priv->container);
if (list->list)
{
@@ -280,9 +302,9 @@
gchar *path;
gchar *writable_path;
- g_object_get (factory->gimp->config,
- factory->path_property_name, &path,
- factory->writable_property_name, &writable_path,
+ g_object_get (factory->priv->gimp->config,
+ factory->priv->path_property_name, &path,
+ factory->priv->writable_property_name, &writable_path,
NULL);
if (path && strlen (path))
@@ -336,7 +358,7 @@
g_return_if_fail (GIMP_IS_DATA_FACTORY (factory));
- gimp_container_freeze (factory->container);
+ gimp_container_freeze (factory->priv->container);
cache = g_hash_table_new (g_str_hash, g_str_equal);
@@ -358,7 +380,7 @@
gimp_data_factory_refresh_cache_remove, NULL);
g_hash_table_destroy (cache);
- gimp_container_thaw (factory->container);
+ gimp_container_thaw (factory->priv->container);
}
void
@@ -366,13 +388,13 @@
{
g_return_if_fail (GIMP_IS_DATA_FACTORY (factory));
- gimp_container_freeze (factory->container);
+ gimp_container_freeze (factory->priv->container);
gimp_data_factory_data_save (factory);
gimp_data_factory_data_reload (factory);
- gimp_container_thaw (factory->container);
+ gimp_container_thaw (factory->priv->container);
}
void
@@ -383,7 +405,7 @@
g_return_if_fail (GIMP_IS_DATA_FACTORY (factory));
- if (gimp_container_is_empty (factory->container))
+ if (gimp_container_is_empty (factory->priv->container))
return;
writable_dir = gimp_data_factory_get_save_dir (factory);
@@ -391,7 +413,7 @@
if (! writable_dir)
return;
- for (list = GIMP_LIST (factory->container)->list;
+ for (list = GIMP_LIST (factory->priv->container)->list;
list;
list = g_list_next (list))
{
@@ -411,7 +433,7 @@
*/
if (error)
{
- gimp_message (factory->gimp, NULL, GIMP_MESSAGE_ERROR,
+ gimp_message (factory->priv->gimp, NULL, GIMP_MESSAGE_ERROR,
_("Failed to save data:\n\n%s"),
error->message);
g_clear_error (&error);
@@ -428,7 +450,7 @@
gpointer data,
gpointer context)
{
- gimp_container_remove (factory->container, GIMP_OBJECT (data));
+ gimp_container_remove (factory->priv->container, GIMP_OBJECT (data));
}
void
@@ -436,11 +458,11 @@
{
g_return_if_fail (GIMP_IS_DATA_FACTORY (factory));
- gimp_container_freeze (factory->container);
+ gimp_container_freeze (factory->priv->container);
gimp_data_factory_data_foreach (factory, gimp_data_factory_remove_cb, NULL);
- gimp_container_thaw (factory->container);
+ gimp_container_thaw (factory->priv->container);
}
GimpData *
@@ -451,19 +473,19 @@
g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (*name != '\0', NULL);
- if (factory->data_new_func)
+ if (factory->priv->data_new_func)
{
- GimpData *data = factory->data_new_func (name);
+ GimpData *data = factory->priv->data_new_func (name);
if (data)
{
- gimp_container_add (factory->container, GIMP_OBJECT (data));
+ gimp_container_add (factory->priv->container, GIMP_OBJECT (data));
g_object_unref (data);
return data;
}
- g_warning ("%s: factory->data_new_func() returned NULL", G_STRFUNC);
+ g_warning ("%s: factory->priv->data_new_func() returned NULL", G_STRFUNC);
}
return NULL;
@@ -508,7 +530,7 @@
gimp_object_take_name (GIMP_OBJECT (new_data), new_name);
- gimp_container_add (factory->container, GIMP_OBJECT (new_data));
+ gimp_container_add (factory->priv->container, GIMP_OBJECT (new_data));
g_object_unref (new_data);
}
@@ -527,11 +549,11 @@
g_return_val_if_fail (GIMP_IS_DATA (data), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- if (gimp_container_have (factory->container, GIMP_OBJECT (data)))
+ if (gimp_container_have (factory->priv->container, GIMP_OBJECT (data)))
{
g_object_ref (data);
- gimp_container_remove (factory->container, GIMP_OBJECT (data));
+ gimp_container_remove (factory->priv->container, GIMP_OBJECT (data));
if (delete_from_disk && data->filename)
retval = gimp_data_delete_from_disk (data, error);
@@ -547,8 +569,8 @@
{
g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
- if (factory->data_get_standard_func)
- return factory->data_get_standard_func ();
+ if (factory->priv->data_get_standard_func)
+ return factory->priv->data_get_standard_func ();
return NULL;
}
@@ -601,6 +623,30 @@
return TRUE;
}
+GimpContainer *
+gimp_data_factory_get_container (GimpDataFactory *factory)
+{
+ g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
+
+ return factory->priv->container;
+}
+
+Gimp *
+gimp_data_factory_get_gimp (GimpDataFactory *factory)
+{
+ g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), NULL);
+
+ return factory->priv->gimp;
+}
+
+gboolean
+gimp_data_factory_has_data_new_func (GimpDataFactory *factory)
+{
+ g_return_val_if_fail (GIMP_IS_DATA_FACTORY (factory), FALSE);
+
+ return factory->priv->data_new_func != NULL;
+}
+
/* private functions */
@@ -615,9 +661,9 @@
GList *list;
gchar *writable_dir = NULL;
- g_object_get (factory->gimp->config,
- factory->path_property_name, &path,
- factory->writable_property_name, &writable_path,
+ g_object_get (factory->priv->gimp->config,
+ factory->priv->path_property_name, &path,
+ factory->priv->writable_property_name, &writable_path,
NULL);
tmp = gimp_config_path_expand (path, TRUE, NULL);
@@ -674,11 +720,11 @@
GHashTable *cache = context->cache;
gint i;
- for (i = 0; i < factory->n_loader_entries; i++)
+ for (i = 0; i < factory->priv->n_loader_entries; i++)
{
- if (! factory->loader_entries[i].extension ||
+ if (! factory->priv->loader_entries[i].extension ||
gimp_datafiles_check_extension (file_data->filename,
- factory->loader_entries[i].extension))
+ factory->priv->loader_entries[i].extension))
goto insert;
}
@@ -701,7 +747,7 @@
GList *list;
for (list = cached_data; list; list = g_list_next (list))
- gimp_container_add (factory->container, GIMP_OBJECT (list->data));
+ gimp_container_add (factory->priv->container, GIMP_OBJECT (list->data));
}
}
@@ -710,7 +756,7 @@
GList *data_list;
GError *error = NULL;
- data_list = factory->loader_entries[i].load_func (file_data->filename,
+ data_list = factory->priv->loader_entries[i].load_func (file_data->filename,
&error);
if (G_LIKELY (data_list))
@@ -727,7 +773,7 @@
g_list_find_custom (writable_list, file_data->dirname,
(GCompareFunc) strcmp) != NULL);
- writable = (deletable && factory->loader_entries[i].writable);
+ writable = (deletable && factory->priv->loader_entries[i].writable);
for (list = data_list; list; list = g_list_next (list))
{
@@ -738,7 +784,7 @@
data->mtime = file_data->mtime;
data->dirty = FALSE;
- gimp_container_add (factory->container, GIMP_OBJECT (data));
+ gimp_container_add (factory->priv->container, GIMP_OBJECT (data));
g_object_unref (data);
}
@@ -747,7 +793,7 @@
if (G_UNLIKELY (error))
{
- gimp_message (factory->gimp, NULL, GIMP_MESSAGE_ERROR,
+ gimp_message (factory->priv->gimp, NULL, GIMP_MESSAGE_ERROR,
_("Failed to load data:\n\n%s"), error->message);
g_clear_error (&error);
}
Modified: trunk/app/core/gimpdatafactory.h
==============================================================================
--- trunk/app/core/gimpdatafactory.h (original)
+++ trunk/app/core/gimpdatafactory.h Fri Dec 19 21:58:17 2008
@@ -51,22 +51,13 @@
typedef struct _GimpDataFactoryClass GimpDataFactoryClass;
+typedef struct _GimpDataFactoryPriv GimpDataFactoryPriv;
struct _GimpDataFactory
{
- GimpObject parent_instance;
+ GimpObject parent_instance;
- Gimp *gimp;
- GimpContainer *container;
-
- gchar *path_property_name;
- gchar *writable_property_name;
-
- const GimpDataFactoryLoaderEntry *loader_entries;
- gint n_loader_entries;
-
- GimpDataNewFunc data_new_func;
- GimpDataGetStandardFunc data_get_standard_func;
+ GimpDataFactoryPriv *priv;
};
struct _GimpDataFactoryClass
@@ -86,24 +77,27 @@
GimpDataNewFunc new_func,
GimpDataGetStandardFunc get_standard_func);
-void gimp_data_factory_data_init (GimpDataFactory *factory,
- gboolean no_data);
-void gimp_data_factory_data_refresh (GimpDataFactory *factory);
-void gimp_data_factory_data_save (GimpDataFactory *factory);
-void gimp_data_factory_data_free (GimpDataFactory *factory);
-
-GimpData * gimp_data_factory_data_new (GimpDataFactory *factory,
- const gchar *name);
-GimpData * gimp_data_factory_data_duplicate (GimpDataFactory *factory,
- GimpData *data);
-gboolean gimp_data_factory_data_delete (GimpDataFactory *factory,
- GimpData *data,
- gboolean delete_from_disk,
- GError **error);
-GimpData * gimp_data_factory_data_get_standard (GimpDataFactory *factory);
-gboolean gimp_data_factory_data_save_single (GimpDataFactory *factory,
- GimpData *data,
- GError **error);
+void gimp_data_factory_data_init (GimpDataFactory *factory,
+ gboolean no_data);
+void gimp_data_factory_data_refresh (GimpDataFactory *factory);
+void gimp_data_factory_data_save (GimpDataFactory *factory);
+void gimp_data_factory_data_free (GimpDataFactory *factory);
+
+GimpData * gimp_data_factory_data_new (GimpDataFactory *factory,
+ const gchar *name);
+GimpData * gimp_data_factory_data_duplicate (GimpDataFactory *factory,
+ GimpData *data);
+gboolean gimp_data_factory_data_delete (GimpDataFactory *factory,
+ GimpData *data,
+ gboolean delete_from_disk,
+ GError **error);
+GimpData * gimp_data_factory_data_get_standard (GimpDataFactory *factory);
+gboolean gimp_data_factory_data_save_single (GimpDataFactory *factory,
+ GimpData *data,
+ GError **error);
+GimpContainer * gimp_data_factory_get_container (GimpDataFactory *factory);
+Gimp * gimp_data_factory_get_gimp (GimpDataFactory *factory);
+gboolean gimp_data_factory_has_data_new_func (GimpDataFactory *factory);
#endif /* __GIMP_DATA_FACTORY_H__ */
Modified: trunk/app/dialogs/convert-dialog.c
==============================================================================
--- trunk/app/dialogs/convert-dialog.c (original)
+++ trunk/app/dialogs/convert-dialog.c Fri Dec 19 21:58:17 2008
@@ -335,7 +335,7 @@
gboolean default_found = FALSE;
/* We can't dither to > 256 colors */
- dialog->container = gimp_container_filter (gimp->palette_factory->container,
+ dialog->container = gimp_container_filter (gimp_data_factory_get_container (gimp->palette_factory),
convert_dialog_palette_filter,
NULL);
Modified: trunk/app/dialogs/palette-import-dialog.c
==============================================================================
--- trunk/app/dialogs/palette-import-dialog.c (original)
+++ trunk/app/dialogs/palette-import-dialog.c Fri Dec 19 21:58:17 2008
@@ -275,7 +275,7 @@
/* The gradient menu */
dialog->gradient_combo =
- gimp_container_combo_box_new (context->gimp->gradient_factory->container,
+ gimp_container_combo_box_new (gimp_data_factory_get_container (context->gimp->gradient_factory),
dialog->context, 24, 1);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
NULL, 0.0, 0.5, dialog->gradient_combo, 1, FALSE);
@@ -458,7 +458,7 @@
if (name && *name)
gimp_object_set_name (GIMP_OBJECT (dialog->palette), name);
- gimp_container_add (gimp->palette_factory->container,
+ gimp_container_add (gimp_data_factory_get_container (gimp->palette_factory),
GIMP_OBJECT (dialog->palette));
}
}
Modified: trunk/app/pdb/brush-select-cmds.c
==============================================================================
--- trunk/app/pdb/brush-select-cmds.c (original)
+++ trunk/app/pdb/brush-select-cmds.c Fri Dec 19 21:58:17 2008
@@ -61,7 +61,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->brush_factory->container,
+ gimp_data_factory_get_container (gimp->brush_factory),
popup_title, brush_callback, initial_brush,
"opacity", opacity / 100.0,
"paint-mode", paint_mode,
@@ -91,7 +91,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->brush_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->brush_factory),
brush_callback))
success = FALSE;
}
@@ -125,7 +125,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->brush_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->brush_factory),
brush_callback, brush_name,
"opacity", opacity / 100.0,
"paint-mode", paint_mode,
Modified: trunk/app/pdb/brushes-cmds.c
==============================================================================
--- trunk/app/pdb/brushes-cmds.c (original)
+++ trunk/app/pdb/brushes-cmds.c Fri Dec 19 21:58:17 2008
@@ -71,7 +71,7 @@
if (success)
{
- brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container,
+ brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->brush_factory),
filter, &num_brushes);
}
Modified: trunk/app/pdb/gimppdb-utils.c
==============================================================================
--- trunk/app/pdb/gimppdb-utils.c (original)
+++ trunk/app/pdb/gimppdb-utils.c Fri Dec 19 21:58:17 2008
@@ -61,7 +61,7 @@
}
brush = (GimpBrush *)
- gimp_container_get_child_by_name (gimp->brush_factory->container, name);
+ gimp_container_get_child_by_name (gimp_data_factory_get_container (gimp->brush_factory), name);
if (! brush)
{
@@ -122,7 +122,7 @@
}
pattern = (GimpPattern *)
- gimp_container_get_child_by_name (gimp->pattern_factory->container, name);
+ gimp_container_get_child_by_name (gimp_data_factory_get_container (gimp->pattern_factory), name);
if (! pattern)
{
@@ -152,7 +152,7 @@
}
gradient = (GimpGradient *)
- gimp_container_get_child_by_name (gimp->gradient_factory->container, name);
+ gimp_container_get_child_by_name (gimp_data_factory_get_container (gimp->gradient_factory), name);
if (! gradient)
{
@@ -188,7 +188,7 @@
}
palette = (GimpPalette *)
- gimp_container_get_child_by_name (gimp->palette_factory->container, name);
+ gimp_container_get_child_by_name (gimp_data_factory_get_container (gimp->palette_factory), name);
if (! palette)
{
Modified: trunk/app/pdb/gradient-select-cmds.c
==============================================================================
--- trunk/app/pdb/gradient-select-cmds.c (original)
+++ trunk/app/pdb/gradient-select-cmds.c Fri Dec 19 21:58:17 2008
@@ -61,7 +61,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->gradient_factory->container,
+ gimp_data_factory_get_container (gimp->gradient_factory),
popup_title, gradient_callback, initial_gradient,
"sample-size", sample_size,
NULL))
@@ -89,7 +89,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->gradient_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->gradient_factory),
gradient_callback))
success = FALSE;
}
@@ -117,7 +117,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->gradient_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->gradient_factory),
gradient_callback, gradient_name,
NULL))
success = FALSE;
Modified: trunk/app/pdb/gradients-cmds.c
==============================================================================
--- trunk/app/pdb/gradients-cmds.c (original)
+++ trunk/app/pdb/gradients-cmds.c Fri Dec 19 21:58:17 2008
@@ -70,7 +70,7 @@
if (success)
{
- gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container,
+ gradient_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->gradient_factory),
filter, &num_gradients);
}
Modified: trunk/app/pdb/palette-select-cmds.c
==============================================================================
--- trunk/app/pdb/palette-select-cmds.c (original)
+++ trunk/app/pdb/palette-select-cmds.c Fri Dec 19 21:58:17 2008
@@ -55,7 +55,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->palette_factory->container,
+ gimp_data_factory_get_container (gimp->palette_factory),
popup_title, palette_callback, initial_palette,
NULL))
success = FALSE;
@@ -82,7 +82,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->palette_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->palette_factory),
palette_callback))
success = FALSE;
}
@@ -110,7 +110,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->palette_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->palette_factory),
palette_callback, palette_name,
NULL))
success = FALSE;
Modified: trunk/app/pdb/palettes-cmds.c
==============================================================================
--- trunk/app/pdb/palettes-cmds.c (original)
+++ trunk/app/pdb/palettes-cmds.c Fri Dec 19 21:58:17 2008
@@ -72,7 +72,7 @@
if (success)
{
- palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container,
+ palette_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->palette_factory),
filter, &num_palettes);
}
Modified: trunk/app/pdb/pattern-select-cmds.c
==============================================================================
--- trunk/app/pdb/pattern-select-cmds.c (original)
+++ trunk/app/pdb/pattern-select-cmds.c Fri Dec 19 21:58:17 2008
@@ -55,7 +55,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->pattern_factory->container,
+ gimp_data_factory_get_container (gimp->pattern_factory),
popup_title, pattern_callback, initial_pattern,
NULL))
success = FALSE;
@@ -82,7 +82,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->pattern_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->pattern_factory),
pattern_callback))
success = FALSE;
}
@@ -110,7 +110,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->pattern_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->pattern_factory),
pattern_callback, pattern_name,
NULL))
success = FALSE;
Modified: trunk/app/pdb/patterns-cmds.c
==============================================================================
--- trunk/app/pdb/patterns-cmds.c (original)
+++ trunk/app/pdb/patterns-cmds.c Fri Dec 19 21:58:17 2008
@@ -71,7 +71,7 @@
if (success)
{
- pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container,
+ pattern_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->pattern_factory),
filter, &num_patterns);
}
Modified: trunk/app/widgets/gimpbrushfactoryview.c
==============================================================================
--- trunk/app/widgets/gimpbrushfactoryview.c (original)
+++ trunk/app/widgets/gimpbrushfactoryview.c Fri Dec 19 21:58:17 2008
@@ -159,7 +159,7 @@
FALSE, FALSE, 0);
factory_view->spacing_changed_handler_id =
- gimp_container_add_handler (factory->container, "spacing-changed",
+ gimp_container_add_handler (gimp_data_factory_get_container (factory), "spacing-changed",
G_CALLBACK (gimp_brush_factory_view_spacing_changed),
factory_view);
Modified: trunk/app/widgets/gimpdataeditor.c
==============================================================================
--- trunk/app/widgets/gimpdataeditor.c (original)
+++ trunk/app/widgets/gimpdataeditor.c Fri Dec 19 21:58:17 2008
@@ -353,7 +353,7 @@
g_object_ref (editor->context);
- data_type = gimp_container_get_children_type (editor->data_factory->container);
+ data_type = gimp_container_get_children_type (gimp_data_factory_get_container (editor->data_factory));
data = GIMP_DATA (gimp_context_get_by_type (editor->context, data_type));
g_signal_connect (editor->context,
@@ -396,7 +396,7 @@
GimpData *data;
data = (GimpData *)
- gimp_container_get_child_by_name (editor->data_factory->container,
+ gimp_container_get_child_by_name (gimp_data_factory_get_container (editor->data_factory),
aux->value);
if (data)
@@ -496,7 +496,7 @@
g_return_if_fail (data == NULL || GIMP_IS_DATA (data));
g_return_if_fail (data == NULL ||
g_type_is_a (G_TYPE_FROM_INSTANCE (data),
- gimp_container_get_children_type (editor->data_factory->container)));
+ gimp_container_get_children_type (gimp_data_factory_get_container (editor->data_factory))));
if (editor->data != data)
{
@@ -533,7 +533,7 @@
GType data_type;
GimpData *data;
- data_type = gimp_container_get_children_type (editor->data_factory->container);
+ data_type = gimp_container_get_children_type (gimp_data_factory_get_container (editor->data_factory));
data = GIMP_DATA (gimp_context_get_by_type (editor->context,
data_type));
@@ -645,7 +645,7 @@
if (! gimp_data_factory_data_save_single (editor->data_factory, data,
&error))
{
- gimp_message_literal (editor->data_factory->gimp, G_OBJECT (editor),
+ gimp_message_literal (gimp_data_factory_get_gimp (editor->data_factory), G_OBJECT (editor),
GIMP_MESSAGE_ERROR,
error->message);
g_clear_error (&error);
Modified: trunk/app/widgets/gimpdatafactoryview.c
==============================================================================
--- trunk/app/widgets/gimpdatafactoryview.c (original)
+++ trunk/app/widgets/gimpdatafactoryview.c Fri Dec 19 21:58:17 2008
@@ -142,7 +142,7 @@
if (! gimp_container_editor_construct (GIMP_CONTAINER_EDITOR (factory_view),
view_type,
- factory->container, context,
+ gimp_data_factory_get_container (factory), context,
view_size, view_border_width,
menu_factory, menu_identifier,
ui_identifier))
@@ -169,7 +169,7 @@
str, NULL);
g_free (str);
- if (factory_view->factory->data_new_func)
+ if (gimp_data_factory_has_data_new_func (factory_view->factory))
{
str = g_strdup_printf ("%s-new", action_group);
factory_view->new_button =
@@ -198,13 +198,13 @@
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->edit_button),
- gimp_container_get_children_type (factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (factory)));
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->duplicate_button),
- gimp_container_get_children_type (factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (factory)));
gimp_container_view_enable_dnd (editor->view,
GTK_BUTTON (factory_view->delete_button),
- gimp_container_get_children_type (factory->container));
+ gimp_container_get_children_type (gimp_data_factory_get_container (factory)));
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);
@@ -221,7 +221,7 @@
if (GIMP_CONTAINER_EDITOR_CLASS (parent_class)->activate_item)
GIMP_CONTAINER_EDITOR_CLASS (parent_class)->activate_item (editor, viewable);
- if (data && gimp_container_have (view->factory->container,
+ if (data && gimp_container_have (gimp_data_factory_get_container (view->factory),
GIMP_OBJECT (data)))
{
if (view->edit_button && GTK_WIDGET_SENSITIVE (view->edit_button))
Modified: trunk/app/widgets/gimpselectiondata.c
==============================================================================
--- trunk/app/widgets/gimpselectiondata.c (original)
+++ trunk/app/widgets/gimpselectiondata.c Fri Dec 19 21:58:17 2008
@@ -524,7 +524,7 @@
return (GimpBrush *)
gimp_selection_data_get_object (selection,
- gimp->brush_factory->container,
+ gimp_data_factory_get_container (gimp->brush_factory),
GIMP_OBJECT (gimp_brush_get_standard ()));
}
@@ -537,7 +537,7 @@
return (GimpPattern *)
gimp_selection_data_get_object (selection,
- gimp->pattern_factory->container,
+ gimp_data_factory_get_container (gimp->pattern_factory),
GIMP_OBJECT (gimp_pattern_get_standard ()));
}
@@ -550,7 +550,7 @@
return (GimpGradient *)
gimp_selection_data_get_object (selection,
- gimp->gradient_factory->container,
+ gimp_data_factory_get_container (gimp->gradient_factory),
GIMP_OBJECT (gimp_gradient_get_standard ()));
}
@@ -563,7 +563,7 @@
return (GimpPalette *)
gimp_selection_data_get_object (selection,
- gimp->palette_factory->container,
+ gimp_data_factory_get_container (gimp->palette_factory),
GIMP_OBJECT (gimp_palette_get_standard ()));
}
Modified: trunk/app/widgets/gimpviewablebox.c
==============================================================================
--- trunk/app/widgets/gimpviewablebox.c (original)
+++ trunk/app/widgets/gimpviewablebox.c Fri Dec 19 21:58:17 2008
@@ -72,7 +72,7 @@
GimpViewSize view_size)
{
if (! container)
- container = context->gimp->brush_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->brush_factory);
return gimp_viewable_box_new (container, context, spacing,
view_type, GIMP_VIEW_SIZE_SMALL, view_size,
@@ -129,7 +129,7 @@
GimpViewSize view_size)
{
if (! container)
- container = context->gimp->pattern_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->pattern_factory);
return gimp_viewable_box_new (container, context, spacing,
view_type, GIMP_VIEW_SIZE_SMALL, view_size,
@@ -191,7 +191,7 @@
GtkWidget *button;
if (! container)
- container = context->gimp->gradient_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->gradient_factory);
hbox = gtk_hbox_new (FALSE, spacing);
@@ -297,7 +297,7 @@
GimpViewSize view_size)
{
if (! container)
- container = context->gimp->palette_factory->container;
+ container = gimp_data_factory_get_container (context->gimp->palette_factory);
return gimp_viewable_box_new (container, context, spacing,
view_type, GIMP_VIEW_SIZE_MEDIUM, view_size,
Modified: trunk/tools/pdbgen/pdb/brush_select.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/brush_select.pdb (original)
+++ trunk/tools/pdbgen/pdb/brush_select.pdb Fri Dec 19 21:58:17 2008
@@ -46,7 +46,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->brush_factory->container,
+ gimp_data_factory_get_container (gimp->brush_factory),
popup_title, brush_callback, initial_brush,
"opacity", opacity / 100.0,
"paint-mode", paint_mode,
@@ -74,7 +74,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->brush_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->brush_factory),
brush_callback))
success = FALSE;
}
@@ -107,7 +107,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, brush_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->brush_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->brush_factory),
brush_callback, brush_name,
"opacity", opacity / 100.0,
"paint-mode", paint_mode,
Modified: trunk/tools/pdbgen/pdb/brushes.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/brushes.pdb (original)
+++ trunk/tools/pdbgen/pdb/brushes.pdb Fri Dec 19 21:58:17 2008
@@ -63,7 +63,7 @@
headers => [ qw("core/gimpcontainer-filter.h") ],
code => <<'CODE'
{
- brush_list = gimp_container_get_filtered_name_array (gimp->brush_factory->container,
+ brush_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->brush_factory),
filter, &num_brushes);
}
CODE
Modified: trunk/tools/pdbgen/pdb/gradient_select.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/gradient_select.pdb (original)
+++ trunk/tools/pdbgen/pdb/gradient_select.pdb Fri Dec 19 21:58:17 2008
@@ -44,7 +44,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->gradient_factory->container,
+ gimp_data_factory_get_container (gimp->gradient_factory),
popup_title, gradient_callback, initial_gradient,
"sample-size", sample_size,
NULL))
@@ -70,7 +70,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->gradient_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->gradient_factory),
gradient_callback))
success = FALSE;
}
@@ -96,7 +96,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, gradient_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->gradient_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->gradient_factory),
gradient_callback, gradient_name,
NULL))
success = FALSE;
Modified: trunk/tools/pdbgen/pdb/gradients.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/gradients.pdb (original)
+++ trunk/tools/pdbgen/pdb/gradients.pdb Fri Dec 19 21:58:17 2008
@@ -63,7 +63,7 @@
headers => [ qw("core/gimpcontainer-filter.h") ],
code => <<'CODE'
{
- gradient_list = gimp_container_get_filtered_name_array (gimp->gradient_factory->container,
+ gradient_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->gradient_factory),
filter, &num_gradients);
}
CODE
Modified: trunk/tools/pdbgen/pdb/palette_select.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/palette_select.pdb (original)
+++ trunk/tools/pdbgen/pdb/palette_select.pdb Fri Dec 19 21:58:17 2008
@@ -39,7 +39,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->palette_factory->container,
+ gimp_data_factory_get_container (gimp->palette_factory),
popup_title, palette_callback, initial_palette,
NULL))
success = FALSE;
@@ -64,7 +64,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->palette_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->palette_factory),
palette_callback))
success = FALSE;
}
@@ -90,7 +90,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, palette_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->palette_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->palette_factory),
palette_callback, palette_name,
NULL))
success = FALSE;
Modified: trunk/tools/pdbgen/pdb/palettes.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/palettes.pdb (original)
+++ trunk/tools/pdbgen/pdb/palettes.pdb Fri Dec 19 21:58:17 2008
@@ -62,7 +62,7 @@
headers => [ qw("core/gimpcontainer-filter.h") ],
code => <<'CODE'
{
- palette_list = gimp_container_get_filtered_name_array (gimp->palette_factory->container,
+ palette_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->palette_factory),
filter, &num_palettes);
}
CODE
Modified: trunk/tools/pdbgen/pdb/pattern_select.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/pattern_select.pdb (original)
+++ trunk/tools/pdbgen/pdb/pattern_select.pdb Fri Dec 19 21:58:17 2008
@@ -39,7 +39,7 @@
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
! gimp_pdb_dialog_new (gimp, context, progress,
- gimp->pattern_factory->container,
+ gimp_data_factory_get_container (gimp->pattern_factory),
popup_title, pattern_callback, initial_pattern,
NULL))
success = FALSE;
@@ -64,7 +64,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
- ! gimp_pdb_dialog_close (gimp, gimp->pattern_factory->container,
+ ! gimp_pdb_dialog_close (gimp, gimp_data_factory_get_container (gimp->pattern_factory),
pattern_callback))
success = FALSE;
}
@@ -90,7 +90,7 @@
{
if (gimp->no_interface ||
! gimp_pdb_lookup_procedure (gimp->pdb, pattern_callback) ||
- ! gimp_pdb_dialog_set (gimp, gimp->pattern_factory->container,
+ ! gimp_pdb_dialog_set (gimp, gimp_data_factory_get_container (gimp->pattern_factory),
pattern_callback, pattern_name,
NULL))
success = FALSE;
Modified: trunk/tools/pdbgen/pdb/patterns.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/patterns.pdb (original)
+++ trunk/tools/pdbgen/pdb/patterns.pdb Fri Dec 19 21:58:17 2008
@@ -62,7 +62,7 @@
headers => [ qw("core/gimpcontainer-filter.h") ],
code => <<'CODE'
{
- pattern_list = gimp_container_get_filtered_name_array (gimp->pattern_factory->container,
+ pattern_list = gimp_container_get_filtered_name_array (gimp_data_factory_get_container (gimp->pattern_factory),
filter, &num_patterns);
}
CODE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]