gimp r24668 - in trunk: . app/core app/pdb app/tools tools/pdbgen/pdb



Author: neo
Date: Tue Jan 22 11:28:48 2008
New Revision: 24668
URL: http://svn.gnome.org/viewvc/gimp?rev=24668&view=rev

Log:
2008-01-22  Sven Neumann  <sven gimp org>

	* app/core/gimp.[ch]: added new function gimp_use_gegl().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-invert.c
	* app/tools/gimpimagemaptool.c
	* app/pdb/color_cmds.c
	* tools/pdbgen/pdb/color.pdb: use it instead of accessing the
	GimpCoreConfig struct directly.


Modified:
   trunk/ChangeLog
   trunk/app/core/gimp.c
   trunk/app/core/gimp.h
   trunk/app/core/gimpdrawable-desaturate.c
   trunk/app/core/gimpdrawable-invert.c
   trunk/app/core/gimpdrawable-levels.c
   trunk/app/pdb/color_cmds.c
   trunk/app/tools/gimpimagemaptool.c
   trunk/tools/pdbgen/pdb/color.pdb

Modified: trunk/app/core/gimp.c
==============================================================================
--- trunk/app/core/gimp.c	(original)
+++ trunk/app/core/gimp.c	Tue Jan 22 11:28:48 2008
@@ -1068,3 +1068,11 @@
 
   g_free (message);
 }
+
+gboolean
+gimp_use_gegl (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
+
+  return gimp->config->use_gegl;
+}

Modified: trunk/app/core/gimp.h
==============================================================================
--- trunk/app/core/gimp.h	(original)
+++ trunk/app/core/gimp.h	Tue Jan 22 11:28:48 2008
@@ -185,5 +185,7 @@
                                           const gchar         *format,
                                           va_list              args);
 
+gboolean       gimp_use_gegl             (Gimp                *gimp);
+
 
 #endif  /* __GIMP_H__ */

Modified: trunk/app/core/gimpdrawable-desaturate.c
==============================================================================
--- trunk/app/core/gimpdrawable-desaturate.c	(original)
+++ trunk/app/core/gimpdrawable-desaturate.c	Tue Jan 22 11:28:48 2008
@@ -28,7 +28,6 @@
 #include "base/pixel-region.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -60,7 +59,7 @@
   g_return_if_fail (gimp_drawable_is_rgb (drawable));
   g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *desaturate;
 

Modified: trunk/app/core/gimpdrawable-invert.c
==============================================================================
--- trunk/app/core/gimpdrawable-invert.c	(original)
+++ trunk/app/core/gimpdrawable-invert.c	Tue Jan 22 11:28:48 2008
@@ -28,7 +28,6 @@
 #include "base/pixel-region.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -48,7 +47,7 @@
   g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
   g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *invert;
 

Modified: trunk/app/core/gimpdrawable-levels.c
==============================================================================
--- trunk/app/core/gimpdrawable-levels.c	(original)
+++ trunk/app/core/gimpdrawable-levels.c	Tue Jan 22 11:28:48 2008
@@ -31,7 +31,6 @@
 #include "gegl/gimplevelsconfig.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -87,7 +86,7 @@
                 "high-output", high_output / 255.0,
                 NULL);
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *levels;
 
@@ -169,7 +168,7 @@
 
   gimp_histogram_free (histogram);
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *levels;
 

Modified: trunk/app/pdb/color_cmds.c
==============================================================================
--- trunk/app/pdb/color_cmds.c	(original)
+++ trunk/app/pdb/color_cmds.c	Tue Jan 22 11:28:48 2008
@@ -39,7 +39,6 @@
 #include "base/pixel-processor.h"
 #include "base/pixel-region.h"
 #include "base/threshold.h"
-#include "config/gimpcoreconfig.h"
 #include "core/gimp.h"
 #include "core/gimpcurve.h"
 #include "core/gimpdrawable-desaturate.h"
@@ -80,7 +79,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation",  "brightness-contrast",
@@ -254,7 +253,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-posterize",
@@ -675,7 +674,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-colorize",
@@ -889,7 +888,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-threshold",

Modified: trunk/app/tools/gimpimagemaptool.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool.c	(original)
+++ trunk/app/tools/gimpimagemaptool.c	Tue Jan 22 11:28:48 2008
@@ -30,9 +30,6 @@
 
 #include "tools-types.h"
 
-/* temp */
-#include "config/gimpcoreconfig.h"
-
 #include "core/gimp.h"
 #include "core/gimpcontext.h"
 #include "core/gimpdrawable.h"
@@ -491,8 +488,8 @@
 static void
 gimp_image_map_tool_create_map (GimpImageMapTool *tool)
 {
-  GimpCoreConfig *config = GIMP_TOOL (tool)->tool_info->gimp->config;
-  gboolean        use_gegl;
+  Gimp     *gimp = GIMP_TOOL (tool)->tool_info->gimp;
+  gboolean  use_gegl;
 
   if (tool->image_map)
     {
@@ -502,7 +499,7 @@
 
   g_assert (tool->operation || tool->apply_func);
 
-  use_gegl = (config->use_gegl || ! tool->apply_func);
+  use_gegl = gimp_use_gegl (gimp) || ! tool->apply_func;
 
   tool->image_map = gimp_image_map_new (tool->drawable,
                                         GIMP_TOOL (tool)->tool_info->blurb,

Modified: trunk/tools/pdbgen/pdb/color.pdb
==============================================================================
--- trunk/tools/pdbgen/pdb/color.pdb	(original)
+++ trunk/tools/pdbgen/pdb/color.pdb	Tue Jan 22 11:28:48 2008
@@ -47,7 +47,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation",  "brightness-contrast",
@@ -245,7 +245,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-posterize",
@@ -727,7 +727,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-colorize",
@@ -966,7 +966,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-threshold",
@@ -1021,7 +1021,6 @@
               "base/lut-funcs.h"
               "base/pixel-region.h"
               "base/pixel-processor.h"
-              "config/gimpcoreconfig.h"
               "core/gimp.h"
               "core/gimpdrawable.h"
               "core/gimpdrawable-operation.h"



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