Commit 5934dfa3 authored by Martin Nordholts's avatar Martin Nordholts

Add support for backwards compatibility names of ops

Add a new class field GeglOperation::compat_name that can be used to
specify alternative names for ops, meant to be used for backwards

svn path=/trunk/; revision=2888
parent 615aaf2c
......@@ -55,6 +55,7 @@ gegl_operation_class_init (GeglOperationClass *klass)
* operation lookup by
* name
klass->compat_name = NULL;
klass->description = NULL;
klass->categories = NULL;
klass->attach = attach;
......@@ -74,6 +74,8 @@ struct _GeglOperationClass
const gchar *name; /* name(string) used to create/indetify
this type of operation in GEGL*/
const gchar *compat_name; /* name used for backwards compatibility
const gchar *description; /* textual description of the operation */
const gchar *categories; /* a colon seperated list of categories */
......@@ -52,6 +52,10 @@ add_operations (GHashTable *hash,
g_hash_table_insert (hash, g_strdup (operation_class->name), (gpointer) types[no]);
if (operation_class->compat_name)
g_hash_table_insert (hash, g_strdup (operation_class->compat_name), (gpointer) types[no]);
add_operations (hash, types[no]);
g_free (types);
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