[gegl-gtk] operations: Update to new metadata handling in GEGL 0.2.0+



commit 4b58f13e513bbbb683f7b88bb6c2482480c3a7c3
Author: Jon Nordby <jononor gmail com>
Date:   Thu Apr 12 14:43:13 2012 +0200

    operations: Update to new metadata handling in GEGL 0.2.0+
    
    Handling of operation metadata was changes as of GEGL commit
    1b7ea4207c78d46d87598a0765f093412e1694fe

 operations/gegl-gtk-display.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/operations/gegl-gtk-display.c b/operations/gegl-gtk-display.c
index 2b8d342..d17576d 100644
--- a/operations/gegl-gtk-display.c
+++ b/operations/gegl-gtk-display.c
@@ -145,13 +145,24 @@ gegl_chant_class_init(GeglChantClass *klass)
     G_OBJECT_CLASS(klass)->dispose = dispose;
 
 #ifdef HAVE_GTK2
-    operation_class->name        = "gegl-gtk2:display";
+#define OPERATION_NAME "gegl-gtk2:display"
 #else
-    operation_class->name        = "gegl-gtk3:display";
+#define OPERATION_NAME "gegl-gtk3:display"
 #endif
+
+#if GEGL_MINOR_VERSION >= 2 && GEGL_MICRO_VERSION >= 0
+    gegl_operation_class_set_keys (operation_class,
+        "name", OPERATION_NAME ,
+        "categories", "output",
+        "description", _("Displays the input buffer in an GTK window ."),
+        NULL);
+#else /* GEGL < 0.2.0 */
+    operation_class->name        = OPERATION_NAME;
     operation_class->categories  = "output";
     operation_class->description =
         _("Displays the input buffer in an GTK window .");
+#endif
+
 }
 
 #endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]