gimp r27391 - in branches/gimp-2-6: . app/core app/tools



Author: neo
Date: Fri Oct 24 18:39:48 2008
New Revision: 27391
URL: http://svn.gnome.org/viewvc/gimp?rev=27391&view=rev

Log:
2008-10-24  Sven Neumann  <sven gimp org>

	Bug 557705 â compatibility with GEGL > 0.0.20

	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-invert.c
	* app/tools/gimpbrightnesscontrasttool.c: choose GEGL operation
	names based on the GEGL version we are being used with.



Modified:
   branches/gimp-2-6/ChangeLog
   branches/gimp-2-6/app/core/gimpdrawable-brightness-contrast.c
   branches/gimp-2-6/app/core/gimpdrawable-invert.c
   branches/gimp-2-6/app/tools/gimpbrightnesscontrasttool.c

Modified: branches/gimp-2-6/app/core/gimpdrawable-brightness-contrast.c
==============================================================================
--- branches/gimp-2-6/app/core/gimpdrawable-brightness-contrast.c	(original)
+++ branches/gimp-2-6/app/core/gimpdrawable-brightness-contrast.c	Fri Oct 24 18:39:48 2008
@@ -25,9 +25,10 @@
 #include "base/gimplut.h"
 #include "base/lut-funcs.h"
 
+#include "gegl/gimp-gegl-utils.h"
 #include "gegl/gimpbrightnesscontrastconfig.h"
 
-/* temp */
+/* temporary */
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -60,10 +61,14 @@
 
   if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
-      GeglNode *node;
+      GeglNode    *node;
+      const gchar *name;
+
+      name = (gimp_gegl_check_version (0, 0, 21) ?
+              "gegl:brightness-contrast" : "brightness-contrast");
 
       node = g_object_new (GEGL_TYPE_NODE,
-                           "operation", "brightness-contrast",
+                           "operation", name,
                            NULL);
       gimp_brightness_contrast_config_set_node (config, node);
 

Modified: branches/gimp-2-6/app/core/gimpdrawable-invert.c
==============================================================================
--- branches/gimp-2-6/app/core/gimpdrawable-invert.c	(original)
+++ branches/gimp-2-6/app/core/gimpdrawable-invert.c	Fri Oct 24 18:39:48 2008
@@ -25,7 +25,9 @@
 #include "base/gimplut.h"
 #include "base/lut-funcs.h"
 
-/* temp */
+#include "gegl/gimp-gegl-utils.h"
+
+/* temporary */
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -48,9 +50,12 @@
 
   if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
-      GeglNode *invert;
+      GeglNode    *invert;
+      const gchar *name;
+
+      name = gimp_gegl_check_version (0, 0, 21) ? "gegl:invert" : "invert";
 
-      invert = g_object_new (GEGL_TYPE_NODE, "operation", "invert", NULL);
+      invert = g_object_new (GEGL_TYPE_NODE, "operation", name, NULL);
 
       gimp_drawable_apply_operation (drawable, progress, _("Invert"),
                                      invert, TRUE);

Modified: branches/gimp-2-6/app/tools/gimpbrightnesscontrasttool.c
==============================================================================
--- branches/gimp-2-6/app/tools/gimpbrightnesscontrasttool.c	(original)
+++ branches/gimp-2-6/app/tools/gimpbrightnesscontrasttool.c	Fri Oct 24 18:39:48 2008
@@ -31,6 +31,7 @@
 #include "base/gimplut.h"
 #include "base/lut-funcs.h"
 
+#include "gegl/gimp-gegl-utils.h"
 #include "gegl/gimpbrightnesscontrastconfig.h"
 
 #include "core/gimpdrawable.h"
@@ -196,6 +197,7 @@
                                              GObject          **config)
 {
   GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (im_tool);
+  const gchar                *name;
 
   bc_tool->config = g_object_new (GIMP_TYPE_BRIGHTNESS_CONTRAST_CONFIG, NULL);
 
@@ -205,8 +207,11 @@
                            G_CALLBACK (brightness_contrast_config_notify),
                            G_OBJECT (bc_tool), 0);
 
+  name = (gimp_gegl_check_version (0, 0, 21) ?
+          "gegl:brightness-contrast" : "brightness-contrast");
+
   return g_object_new (GEGL_TYPE_NODE,
-                       "operation", "brightness-contrast",
+                       "operation", name,
                        NULL);
 }
 



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