added new function gimp_use_gegl().
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. svn path=/trunk/; revision=24668
This commit is contained in:

committed by
Sven Neumann

parent
14a20cc3d7
commit
64880a8107
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
2008-01-22 Michael Natterer <mitch@gimp.org>
|
2008-01-22 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gegl/Makefile.am
|
* app/gegl/Makefile.am
|
||||||
|
@ -1068,3 +1068,11 @@ gimp_message_valist (Gimp *gimp,
|
|||||||
|
|
||||||
g_free (message);
|
g_free (message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gimp_use_gegl (Gimp *gimp)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
|
||||||
|
|
||||||
|
return gimp->config->use_gegl;
|
||||||
|
}
|
||||||
|
@ -185,5 +185,7 @@ void gimp_message_valist (Gimp *gimp,
|
|||||||
const gchar *format,
|
const gchar *format,
|
||||||
va_list args);
|
va_list args);
|
||||||
|
|
||||||
|
gboolean gimp_use_gegl (Gimp *gimp);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __GIMP_H__ */
|
#endif /* __GIMP_H__ */
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "base/pixel-region.h"
|
#include "base/pixel-region.h"
|
||||||
|
|
||||||
/* temp */
|
/* temp */
|
||||||
#include "config/gimpcoreconfig.h"
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
|
|||||||
g_return_if_fail (gimp_drawable_is_rgb (drawable));
|
g_return_if_fail (gimp_drawable_is_rgb (drawable));
|
||||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (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;
|
GeglNode *desaturate;
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "base/pixel-region.h"
|
#include "base/pixel-region.h"
|
||||||
|
|
||||||
/* temp */
|
/* temp */
|
||||||
#include "config/gimpcoreconfig.h"
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ gimp_drawable_invert (GimpDrawable *drawable,
|
|||||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
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;
|
GeglNode *invert;
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include "gegl/gimplevelsconfig.h"
|
#include "gegl/gimplevelsconfig.h"
|
||||||
|
|
||||||
/* temp */
|
/* temp */
|
||||||
#include "config/gimpcoreconfig.h"
|
|
||||||
#include "gimp.h"
|
#include "gimp.h"
|
||||||
#include "gimpimage.h"
|
#include "gimpimage.h"
|
||||||
|
|
||||||
@ -87,7 +86,7 @@ gimp_drawable_levels (GimpDrawable *drawable,
|
|||||||
"high-output", high_output / 255.0,
|
"high-output", high_output / 255.0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
|
if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
|
||||||
{
|
{
|
||||||
GeglNode *levels;
|
GeglNode *levels;
|
||||||
|
|
||||||
@ -169,7 +168,7 @@ gimp_drawable_levels_stretch (GimpDrawable *drawable,
|
|||||||
|
|
||||||
gimp_histogram_free (histogram);
|
gimp_histogram_free (histogram);
|
||||||
|
|
||||||
if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
|
if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
|
||||||
{
|
{
|
||||||
GeglNode *levels;
|
GeglNode *levels;
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
#include "base/pixel-processor.h"
|
#include "base/pixel-processor.h"
|
||||||
#include "base/pixel-region.h"
|
#include "base/pixel-region.h"
|
||||||
#include "base/threshold.h"
|
#include "base/threshold.h"
|
||||||
#include "config/gimpcoreconfig.h"
|
|
||||||
#include "core/gimp.h"
|
#include "core/gimp.h"
|
||||||
#include "core/gimpcurve.h"
|
#include "core/gimpcurve.h"
|
||||||
#include "core/gimpdrawable-desaturate.h"
|
#include "core/gimpdrawable-desaturate.h"
|
||||||
@ -80,7 +79,7 @@ brightness_contrast_invoker (GimpProcedure *procedure,
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "brightness-contrast",
|
"operation", "brightness-contrast",
|
||||||
@ -254,7 +253,7 @@ posterize_invoker (GimpProcedure *procedure,
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-posterize",
|
"operation", "gimp-posterize",
|
||||||
@ -675,7 +674,7 @@ colorize_invoker (GimpProcedure *procedure,
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-colorize",
|
"operation", "gimp-colorize",
|
||||||
@ -889,7 +888,7 @@ threshold_invoker (GimpProcedure *procedure,
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-threshold",
|
"operation", "gimp-threshold",
|
||||||
|
@ -30,9 +30,6 @@
|
|||||||
|
|
||||||
#include "tools-types.h"
|
#include "tools-types.h"
|
||||||
|
|
||||||
/* temp */
|
|
||||||
#include "config/gimpcoreconfig.h"
|
|
||||||
|
|
||||||
#include "core/gimp.h"
|
#include "core/gimp.h"
|
||||||
#include "core/gimpcontext.h"
|
#include "core/gimpcontext.h"
|
||||||
#include "core/gimpdrawable.h"
|
#include "core/gimpdrawable.h"
|
||||||
@ -491,8 +488,8 @@ gimp_image_map_tool_reset (GimpImageMapTool *tool)
|
|||||||
static void
|
static void
|
||||||
gimp_image_map_tool_create_map (GimpImageMapTool *tool)
|
gimp_image_map_tool_create_map (GimpImageMapTool *tool)
|
||||||
{
|
{
|
||||||
GimpCoreConfig *config = GIMP_TOOL (tool)->tool_info->gimp->config;
|
Gimp *gimp = GIMP_TOOL (tool)->tool_info->gimp;
|
||||||
gboolean use_gegl;
|
gboolean use_gegl;
|
||||||
|
|
||||||
if (tool->image_map)
|
if (tool->image_map)
|
||||||
{
|
{
|
||||||
@ -502,7 +499,7 @@ gimp_image_map_tool_create_map (GimpImageMapTool *tool)
|
|||||||
|
|
||||||
g_assert (tool->operation || tool->apply_func);
|
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,
|
tool->image_map = gimp_image_map_new (tool->drawable,
|
||||||
GIMP_TOOL (tool)->tool_info->blurb,
|
GIMP_TOOL (tool)->tool_info->blurb,
|
||||||
|
@ -47,7 +47,7 @@ HELP
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "brightness-contrast",
|
"operation", "brightness-contrast",
|
||||||
@ -245,7 +245,7 @@ HELP
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-posterize",
|
"operation", "gimp-posterize",
|
||||||
@ -727,7 +727,7 @@ HELP
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-colorize",
|
"operation", "gimp-colorize",
|
||||||
@ -966,7 +966,7 @@ HELP
|
|||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
if (gimp->config->use_gegl)
|
if (gimp_use_gegl (gimp))
|
||||||
{
|
{
|
||||||
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
GeglNode *node = g_object_new (GEGL_TYPE_NODE,
|
||||||
"operation", "gimp-threshold",
|
"operation", "gimp-threshold",
|
||||||
@ -1021,7 +1021,6 @@ CODE
|
|||||||
"base/lut-funcs.h"
|
"base/lut-funcs.h"
|
||||||
"base/pixel-region.h"
|
"base/pixel-region.h"
|
||||||
"base/pixel-processor.h"
|
"base/pixel-processor.h"
|
||||||
"config/gimpcoreconfig.h"
|
|
||||||
"core/gimp.h"
|
"core/gimp.h"
|
||||||
"core/gimpdrawable.h"
|
"core/gimpdrawable.h"
|
||||||
"core/gimpdrawable-operation.h"
|
"core/gimpdrawable-operation.h"
|
||||||
|
Reference in New Issue
Block a user