app: follow changes in GeglOperation API

This commit is contained in:
Øyvind Kolås 2012-03-29 19:37:40 +01:00 committed by Michael Natterer
parent deb9b9caa8
commit 49de3d5292
10 changed files with 48 additions and 29 deletions

View File

@ -120,7 +120,7 @@ gimp_gegl_config_class_init (GObjectClass *klass,
klass->set_property = gimp_gegl_config_set_property;
klass->get_property = gimp_gegl_config_get_property;
pspecs = gegl_list_properties (operation, &n_pspecs);
pspecs = gegl_operation_list_properties (operation, &n_pspecs);
for (i = 0; i < n_pspecs; i++)
{
@ -218,7 +218,7 @@ gimp_gegl_config_proxy_sync (GimpObject *proxy,
g_return_if_fail (operation != NULL);
pspecs = gegl_list_properties (operation, &n_pspecs);
pspecs = gegl_operation_list_properties (operation, &n_pspecs);
g_free (operation);
for (i = 0; i < n_pspecs; i++)

View File

@ -82,9 +82,11 @@ gimp_operation_border_class_init (GimpOperationBorderClass *klass)
object_class->set_property = gimp_operation_border_set_property;
object_class->get_property = gimp_operation_border_get_property;
operation_class->name = "gimp:border";
operation_class->categories = "gimp";
operation_class->description = "GIMP Border operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:border",
"categories" , "gimp",
"description" , "GIMP Border operation",
NULL);
operation_class->prepare = gimp_operation_border_prepare;
operation_class->get_required_for_output = gimp_operation_border_get_required_for_output;

View File

@ -75,9 +75,11 @@ gimp_operation_equalize_class_init (GimpOperationEqualizeClass *klass)
object_class->set_property = gimp_operation_equalize_set_property;
object_class->get_property = gimp_operation_equalize_get_property;
operation_class->name = "gimp:equalize";
operation_class->categories = "color";
operation_class->description = "GIMP Equalize operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:equalize",
"categories" , "color",
"description" , "GIMP Equalize operation",
NULL);
point_class->process = gimp_operation_equalize_process;

View File

@ -80,9 +80,11 @@ gimp_operation_grow_class_init (GimpOperationGrowClass *klass)
object_class->set_property = gimp_operation_grow_set_property;
object_class->get_property = gimp_operation_grow_get_property;
operation_class->name = "gimp:grow";
operation_class->categories = "gimp";
operation_class->description = "GIMP Grow operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:grow",
"categories" , "gimp",
"description" , "GIMP Grow operation",
NULL);
operation_class->prepare = gimp_operation_grow_prepare;
operation_class->get_required_for_output = gimp_operation_grow_get_required_for_output;

View File

@ -57,8 +57,12 @@ gimp_operation_normal_mode_class_init (GimpOperationNormalModeClass *klass)
operation_class = GEGL_OPERATION_CLASS (klass);
point_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
operation_class->name = "gimp:normal-mode";
operation_class->description = "GIMP normal mode operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:normal-mode",
"description" , "GIMP normal mode operation",
NULL);
operation_class->process = gimp_operation_normal_parent_process;
point_class->process = gimp_operation_normal_mode_process;

View File

@ -114,10 +114,10 @@ gimp_operation_point_layer_mode_class_init (GimpOperationPointLayerModeClass *kl
object_class->get_property = gimp_operation_point_layer_mode_get_property;
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:point-layer-mode",
"description", "GIMP point layer mode operation",
"categories" , "compositors",
NULL);
"name", "gimp:point-layer-mode",
"description", "GIMP point layer mode operation",
"categories", "compositors",
NULL);
operation_class->prepare = gimp_operation_point_layer_mode_prepare;
@ -312,6 +312,7 @@ gimp_operation_point_layer_mode_process (GeglOperation *operation,
while (sample--)
{
/* XXX: having such a switch in an innerloop is a horrible idea */
switch (blend_mode)
{
case GIMP_ERASE_MODE:

View File

@ -69,9 +69,12 @@ gimp_operation_set_alpha_class_init (GimpOperationSetAlphaClass *klass)
object_class->set_property = gimp_operation_set_alpha_set_property;
object_class->get_property = gimp_operation_set_alpha_get_property;
operation_class->name = "gimp:set-alpha";
operation_class->categories = "color";
operation_class->description = "Set a buffer's alpha channel to a value";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:set-alpha",
"categories" , "color",
"description" , "Set a buffer's alpha channel to a value",
NULL);
operation_class->prepare = gimp_operation_set_alpha_prepare;
point_class->process = gimp_operation_set_alpha_process;

View File

@ -80,9 +80,11 @@ gimp_operation_shapeburst_class_init (GimpOperationShapeburstClass *klass)
object_class->set_property = gimp_operation_shapeburst_set_property;
object_class->get_property = gimp_operation_shapeburst_get_property;
operation_class->name = "gimp:shapeburst";
operation_class->categories = "gimp";
operation_class->description = "GIMP Shapeburst operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:shapeburst",
"categories" , "gimp",
"description" , "GIMP Shapeburst operation",
NULL);
operation_class->prepare = gimp_operation_shapeburst_prepare;
operation_class->get_required_for_output = gimp_operation_shapeburst_get_required_for_output;

View File

@ -81,9 +81,11 @@ gimp_operation_shrink_class_init (GimpOperationShrinkClass *klass)
object_class->set_property = gimp_operation_shrink_set_property;
object_class->get_property = gimp_operation_shrink_get_property;
operation_class->name = "gimp:shrink";
operation_class->categories = "gimp";
operation_class->description = "GIMP Shrink operation";
gegl_operation_class_set_keys (operation_class,
"name" , "gimp:shrink",
"categories" , "gimp",
"description" , "GIMP Shrink operation",
NULL);
operation_class->prepare = gimp_operation_shrink_prepare;
operation_class->get_required_for_output = gimp_operation_shrink_get_required_for_output;

View File

@ -167,6 +167,7 @@ gimp_get_subtype_classes (GType type,
{
GeglOperationClass *klass;
GType *ops;
const gchar *categories;
guint n_ops;
gint i;
@ -176,9 +177,9 @@ gimp_get_subtype_classes (GType type,
klass = GEGL_OPERATION_CLASS (g_type_class_ref (type));
ops = g_type_children (type, &n_ops);
if (! gimp_gegl_tool_operation_blacklisted (klass->name,
gegl_operation_class_get_key (klass,
"categories")))
categories = gegl_operation_class_get_key (klass, "categories");
if (! gimp_gegl_tool_operation_blacklisted (klass->name, categories))
classes = g_list_prepend (classes, klass);
for (i = 0; i < n_ops; i++)