band-tune: use GeglOperationMeta::update

parent 71a4e06a
......@@ -94,7 +94,6 @@ update_graph (GeglOperation *operation)
{
GeglProperties *o = GEGL_PROPERTIES (operation);
State *state = o->user_data;
if (!state) return;
float bw = 0.625;
GeglNode *iter = state->input;
......@@ -189,22 +188,6 @@ attach (GeglOperation *operation)
state->mask_add = gegl_node_new_child (gegl, "operation", "gegl:add", "value", 0.2, NULL);
state->mask_sub = gegl_node_new_child (gegl, "operation", "gegl:subtract", NULL);
state->mask_mul = gegl_node_new_child (gegl, "operation", "gegl:multiply", "value", 4.0, NULL);
update_graph (operation);
}
static void
my_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GeglProperties *o = GEGL_PROPERTIES (object);
set_property (object, property_id, value, pspec);
if (o)
update_graph ((void*)object);
}
static void
......@@ -218,16 +201,17 @@ dispose (GObject *object)
static void
gegl_op_class_init (GeglOpClass *klass)
{
GObjectClass *object_class;
GeglOperationClass *operation_class;
object_class = G_OBJECT_CLASS (klass);
object_class->dispose = dispose;
object_class->set_property = my_set_property;
GObjectClass *object_class;
GeglOperationClass *operation_class;
GeglOperationMetaClass *operation_meta_class;
operation_class = GEGL_OPERATION_CLASS (klass);
object_class = G_OBJECT_CLASS (klass);
operation_class = GEGL_OPERATION_CLASS (klass);
operation_meta_class = GEGL_OPERATION_META_CLASS (klass);
operation_class->attach = attach;
object_class->dispose = dispose;
operation_class->attach = attach;
operation_meta_class->update = update_graph;
gegl_operation_class_set_keys (operation_class,
"name", "gegl:band-tune",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment