[gimp] app: remove non-cut/copy/paste functions from gimp-edit.[ch]
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove non-cut/copy/paste functions from gimp-edit.[ch]
- Date: Wed, 18 Apr 2018 21:48:51 +0000 (UTC)
commit 428110f63f419ff4b88dfa26bd9707e7c51afe68
Author: Michael Natterer <mitch gimp org>
Date: Wed Apr 18 23:44:34 2018 +0200
app: remove non-cut/copy/paste functions from gimp-edit.[ch]
Move them to the new files gimpdrawable-edit.[ch] and
gimpimage-fade.[ch].
app/actions/edit-commands.c | 5 +-
app/core/Makefile.am | 4 +
app/core/gimp-edit.c | 119 ------------------------------------
app/core/gimp-edit.h | 11 ---
app/core/gimpdrawable-edit.c | 94 ++++++++++++++++++++++++++++
app/core/gimpdrawable-edit.h | 29 +++++++++
app/core/gimpimage-fade.c | 78 +++++++++++++++++++++++
app/core/gimpimage-fade.h | 26 ++++++++
app/core/gimpselection.c | 4 +-
app/dialogs/fade-dialog.c | 4 +-
app/display/gimpdisplayshell-dnd.c | 3 +-
app/pdb/drawable-edit-cmds.c | 9 +--
app/pdb/edit-cmds.c | 12 ++--
app/tools/gimpbucketfilltool.c | 4 +-
app/widgets/gimpdrawabletreeview.c | 16 +++---
pdb/groups/drawable_edit.pdb | 9 +--
pdb/groups/edit.pdb | 12 ++--
po/POTFILES.in | 1 +
18 files changed, 267 insertions(+), 173 deletions(-)
---
diff --git a/app/actions/edit-commands.c b/app/actions/edit-commands.c
index 0c6d75d..fb60dbb 100644
--- a/app/actions/edit-commands.c
+++ b/app/actions/edit-commands.c
@@ -32,6 +32,7 @@
#include "core/gimpbuffer.h"
#include "core/gimpcontainer.h"
#include "core/gimpdrawable.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimpfilloptions.h"
#include "core/gimplayer.h"
#include "core/gimplayer-new.h"
@@ -480,7 +481,7 @@ edit_clear_cmd_callback (GtkAction *action,
GimpDrawable *drawable;
return_if_no_drawable (image, drawable, data);
- gimp_edit_clear (image, drawable, action_data_get_context (data));
+ gimp_drawable_edit_clear (drawable, action_data_get_context (data));
gimp_image_flush (image);
}
@@ -504,7 +505,7 @@ edit_fill_cmd_callback (GtkAction *action,
action_data_get_context (data),
fill_type, &error))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
gimp_image_flush (image);
}
else
diff --git a/app/core/Makefile.am b/app/core/Makefile.am
index b644685..1d4855f 100644
--- a/app/core/Makefile.am
+++ b/app/core/Makefile.am
@@ -154,6 +154,8 @@ libappcore_a_sources = \
gimpdrawable-bucket-fill.h \
gimpdrawable-combine.c \
gimpdrawable-combine.h \
+ gimpdrawable-edit.c \
+ gimpdrawable-edit.h \
gimpdrawable-equalize.c \
gimpdrawable-equalize.h \
gimpdrawable-fill.c \
@@ -251,6 +253,8 @@ libappcore_a_sources = \
gimpimage-crop.h \
gimpimage-duplicate.c \
gimpimage-duplicate.h \
+ gimpimage-fade.c \
+ gimpimage-fade.h \
gimpimage-flip.c \
gimpimage-flip.h \
gimpimage-grid.h \
diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c
index 36662a6..d60aea0 100644
--- a/app/core/gimp-edit.c
+++ b/app/core/gimp-edit.c
@@ -17,8 +17,6 @@
#include "config.h"
-#include <stdlib.h>
-
#include <cairo.h>
#include <gegl.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
@@ -28,16 +26,10 @@
#include "core-types.h"
-#include "gegl/gimp-gegl-utils.h"
-
#include "gimp.h"
#include "gimp-edit.h"
-#include "gimp-utils.h"
#include "gimpbuffer.h"
-#include "gimpchannel.h"
#include "gimpcontext.h"
-#include "gimpfilloptions.h"
-#include "gimpdrawableundo.h"
#include "gimpimage.h"
#include "gimpimage-duplicate.h"
#include "gimpimage-new.h"
@@ -48,7 +40,6 @@
#include "gimplist.h"
#include "gimppickable.h"
#include "gimpselection.h"
-#include "gimptempbuf.h"
#include "gimp-intl.h"
@@ -700,116 +691,6 @@ gimp_edit_named_copy_visible (GimpImage *image,
return NULL;
}
-void
-gimp_edit_clear (GimpImage *image,
- GimpDrawable *drawable,
- GimpContext *context)
-{
- GimpFillOptions *options;
-
- g_return_if_fail (GIMP_IS_IMAGE (image));
- g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
- g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
- g_return_if_fail (GIMP_IS_CONTEXT (context));
-
- options = gimp_fill_options_new (context->gimp, NULL, FALSE);
-
- if (gimp_drawable_has_alpha (drawable))
- gimp_fill_options_set_by_fill_type (options, context,
- GIMP_FILL_TRANSPARENT, NULL);
- else
- gimp_fill_options_set_by_fill_type (options, context,
- GIMP_FILL_BACKGROUND, NULL);
-
- gimp_edit_fill (image, drawable, options, C_("undo-type", "Clear"));
-
- g_object_unref (options);
-}
-
-void
-gimp_edit_fill (GimpImage *image,
- GimpDrawable *drawable,
- GimpFillOptions *options,
- const gchar *undo_desc)
-{
- GeglBuffer *buffer;
- gint x, y, width, height;
-
- g_return_if_fail (GIMP_IS_IMAGE (image));
- g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
- g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
- g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
-
- if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
- return; /* nothing to do, but the fill succeeded */
-
- buffer = gimp_fill_options_create_buffer (options, drawable,
- GEGL_RECTANGLE (0, 0,
- width, height));
-
- if (! undo_desc)
- undo_desc = gimp_fill_options_get_undo_desc (options);
-
- gimp_drawable_apply_buffer (drawable, buffer,
- GEGL_RECTANGLE (0, 0, width, height),
- TRUE, undo_desc,
- gimp_context_get_opacity (GIMP_CONTEXT (options)),
- gimp_context_get_paint_mode (GIMP_CONTEXT (options)),
- GIMP_LAYER_COLOR_SPACE_AUTO,
- GIMP_LAYER_COLOR_SPACE_AUTO,
- GIMP_LAYER_COMPOSITE_AUTO,
- NULL, x, y);
-
- g_object_unref (buffer);
-
- gimp_drawable_update (drawable, x, y, width, height);
-}
-
-gboolean
-gimp_edit_fade (GimpImage *image,
- GimpContext *context)
-{
- GimpDrawableUndo *undo;
-
- g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
- g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
-
- undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image));
-
- if (undo && undo->applied_buffer)
- {
- GimpDrawable *drawable;
- GeglBuffer *buffer;
-
- drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
-
- g_object_ref (undo);
- buffer = g_object_ref (undo->applied_buffer);
-
- gimp_image_undo (image);
-
- gimp_drawable_apply_buffer (drawable, buffer,
- GEGL_RECTANGLE (0, 0,
- gegl_buffer_get_width (undo->buffer),
- gegl_buffer_get_height (undo->buffer)),
- TRUE,
- gimp_object_get_name (undo),
- gimp_context_get_opacity (context),
- gimp_context_get_paint_mode (context),
- GIMP_LAYER_COLOR_SPACE_AUTO,
- GIMP_LAYER_COLOR_SPACE_AUTO,
- GIMP_LAYER_COMPOSITE_AUTO,
- NULL, undo->x, undo->y);
-
- g_object_unref (buffer);
- g_object_unref (undo);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
/* private functions */
diff --git a/app/core/gimp-edit.h b/app/core/gimp-edit.h
index dc8b6ac..d29f913 100644
--- a/app/core/gimp-edit.h
+++ b/app/core/gimp-edit.h
@@ -57,16 +57,5 @@ const gchar * gimp_edit_named_copy_visible (GimpImage *image,
GimpContext *context,
GError **error);
-void gimp_edit_clear (GimpImage *image,
- GimpDrawable *drawable,
- GimpContext *context);
-void gimp_edit_fill (GimpImage *image,
- GimpDrawable *drawable,
- GimpFillOptions *options,
- const gchar *undo_desc);
-
-gboolean gimp_edit_fade (GimpImage *image,
- GimpContext *context);
-
#endif /* __GIMP_EDIT_H__ */
diff --git a/app/core/gimpdrawable-edit.c b/app/core/gimpdrawable-edit.c
new file mode 100644
index 0000000..c3073ac
--- /dev/null
+++ b/app/core/gimpdrawable-edit.c
@@ -0,0 +1,94 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "core-types.h"
+
+#include "gimpdrawable.h"
+#include "gimpdrawable-edit.h"
+#include "gimpcontext.h"
+#include "gimpfilloptions.h"
+
+#include "gimp-intl.h"
+
+
+/* public functions */
+
+void
+gimp_drawable_edit_clear (GimpDrawable *drawable,
+ GimpContext *context)
+{
+ GimpFillOptions *options;
+
+ g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
+ g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
+ g_return_if_fail (GIMP_IS_CONTEXT (context));
+
+ options = gimp_fill_options_new (context->gimp, NULL, FALSE);
+
+ if (gimp_drawable_has_alpha (drawable))
+ gimp_fill_options_set_by_fill_type (options, context,
+ GIMP_FILL_TRANSPARENT, NULL);
+ else
+ gimp_fill_options_set_by_fill_type (options, context,
+ GIMP_FILL_BACKGROUND, NULL);
+
+ gimp_drawable_edit_fill (drawable, options, C_("undo-type", "Clear"));
+
+ g_object_unref (options);
+}
+
+void
+gimp_drawable_edit_fill (GimpDrawable *drawable,
+ GimpFillOptions *options,
+ const gchar *undo_desc)
+{
+ GeglBuffer *buffer;
+ gint x, y, width, height;
+
+ g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
+ g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
+ g_return_if_fail (GIMP_IS_FILL_OPTIONS (options));
+
+ if (! gimp_item_mask_intersect (GIMP_ITEM (drawable), &x, &y, &width, &height))
+ return; /* nothing to do, but the fill succeeded */
+
+ buffer = gimp_fill_options_create_buffer (options, drawable,
+ GEGL_RECTANGLE (0, 0,
+ width, height));
+
+ if (! undo_desc)
+ undo_desc = gimp_fill_options_get_undo_desc (options);
+
+ gimp_drawable_apply_buffer (drawable, buffer,
+ GEGL_RECTANGLE (0, 0, width, height),
+ TRUE, undo_desc,
+ gimp_context_get_opacity (GIMP_CONTEXT (options)),
+ gimp_context_get_paint_mode (GIMP_CONTEXT (options)),
+ GIMP_LAYER_COLOR_SPACE_AUTO,
+ GIMP_LAYER_COLOR_SPACE_AUTO,
+ GIMP_LAYER_COMPOSITE_AUTO,
+ NULL, x, y);
+
+ g_object_unref (buffer);
+
+ gimp_drawable_update (drawable, x, y, width, height);
+}
diff --git a/app/core/gimpdrawable-edit.h b/app/core/gimpdrawable-edit.h
new file mode 100644
index 0000000..b8bfc04
--- /dev/null
+++ b/app/core/gimpdrawable-edit.h
@@ -0,0 +1,29 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_DRAWABLE_EDIT_H__
+#define __GIMP_DRAWABLE_EDIT_H__
+
+
+void gimp_drawable_edit_clear (GimpDrawable *drawable,
+ GimpContext *context);
+void gimp_drawable_edit_fill (GimpDrawable *drawable,
+ GimpFillOptions *options,
+ const gchar *undo_desc);
+
+
+#endif /* __GIMP_DRAWABLE_EDIT_H__ */
diff --git a/app/core/gimpimage-fade.c b/app/core/gimpimage-fade.c
new file mode 100644
index 0000000..52ccf62
--- /dev/null
+++ b/app/core/gimpimage-fade.c
@@ -0,0 +1,78 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "core-types.h"
+
+#include "gimpcontext.h"
+#include "gimpdrawable.h"
+#include "gimpdrawableundo.h"
+#include "gimpimage.h"
+#include "gimpimage-fade.h"
+#include "gimpimage-undo.h"
+
+
+/* public functions */
+
+gboolean
+gimp_image_fade (GimpImage *image,
+ GimpContext *context)
+{
+ GimpDrawableUndo *undo;
+
+ g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
+ g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
+
+ undo = GIMP_DRAWABLE_UNDO (gimp_image_undo_get_fadeable (image));
+
+ if (undo && undo->applied_buffer)
+ {
+ GimpDrawable *drawable;
+ GeglBuffer *buffer;
+
+ drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
+
+ g_object_ref (undo);
+ buffer = g_object_ref (undo->applied_buffer);
+
+ gimp_image_undo (image);
+
+ gimp_drawable_apply_buffer (drawable, buffer,
+ GEGL_RECTANGLE (0, 0,
+ gegl_buffer_get_width (undo->buffer),
+ gegl_buffer_get_height (undo->buffer)),
+ TRUE,
+ gimp_object_get_name (undo),
+ gimp_context_get_opacity (context),
+ gimp_context_get_paint_mode (context),
+ GIMP_LAYER_COLOR_SPACE_AUTO,
+ GIMP_LAYER_COLOR_SPACE_AUTO,
+ GIMP_LAYER_COMPOSITE_AUTO,
+ NULL, undo->x, undo->y);
+
+ g_object_unref (buffer);
+ g_object_unref (undo);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
diff --git a/app/core/gimpimage-fade.h b/app/core/gimpimage-fade.h
new file mode 100644
index 0000000..d934b3f
--- /dev/null
+++ b/app/core/gimpimage-fade.h
@@ -0,0 +1,26 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_IMAGE_FADE_H__
+#define __GIMP_IMAGE_FADE_H__
+
+
+gboolean gimp_image_fade (GimpImage *image,
+ GimpContext *context);
+
+
+#endif /* __GIMP_IMAGE_FADE_H__ */
diff --git a/app/core/gimpselection.c b/app/core/gimpselection.c
index 1f69301..1d7ac16 100644
--- a/app/core/gimpselection.c
+++ b/app/core/gimpselection.c
@@ -29,8 +29,8 @@
#include "gegl/gimp-gegl-apply-operation.h"
#include "gimp.h"
-#include "gimp-edit.h"
#include "gimpcontext.h"
+#include "gimpdrawable-edit.h"
#include "gimpdrawable-private.h"
#include "gimperror.h"
#include "gimpimage.h"
@@ -751,7 +751,7 @@ gimp_selection_extract (GimpSelection *selection,
if (cut_image)
{
- gimp_edit_clear (image, GIMP_DRAWABLE (pickable), context);
+ gimp_drawable_edit_clear (GIMP_DRAWABLE (pickable), context);
}
}
else if (cut_image)
diff --git a/app/dialogs/fade-dialog.c b/app/dialogs/fade-dialog.c
index f603a86..d5df6f3 100644
--- a/app/dialogs/fade-dialog.c
+++ b/app/dialogs/fade-dialog.c
@@ -25,9 +25,9 @@
#include "dialogs-types.h"
-#include "core/gimp-edit.h"
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
+#include "core/gimpimage-fade.h"
#include "core/gimpimage-undo.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawableundo.h"
@@ -206,7 +206,7 @@ fade_dialog_response (GtkWidget *dialog,
static void
fade_dialog_context_changed (FadeDialog *private)
{
- if (gimp_edit_fade (private->image, private->context))
+ if (gimp_image_fade (private->image, private->context))
{
private->applied = TRUE;
gimp_image_flush (private->image);
diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c
index e45ac1b..767b265 100644
--- a/app/display/gimpdisplayshell-dnd.c
+++ b/app/display/gimpdisplayshell-dnd.c
@@ -30,6 +30,7 @@
#include "core/gimp.h"
#include "core/gimp-edit.h"
#include "core/gimpbuffer.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimpfilloptions.h"
#include "core/gimpimage.h"
#include "core/gimpimage-new.h"
@@ -385,7 +386,7 @@ gimp_display_shell_dnd_fill (GimpDisplayShell *shell,
}
else
{
- gimp_edit_fill (image, drawable, options, undo_desc);
+ gimp_drawable_edit_fill (drawable, options, undo_desc);
}
gimp_display_shell_dnd_flush (shell, image);
diff --git a/app/pdb/drawable-edit-cmds.c b/app/pdb/drawable-edit-cmds.c
index d9106e4..7553392 100644
--- a/app/pdb/drawable-edit-cmds.c
+++ b/app/pdb/drawable-edit-cmds.c
@@ -29,11 +29,11 @@
#include "pdb-types.h"
-#include "core/gimp-edit.h"
#include "core/gimp-gradients.h"
#include "core/gimp.h"
#include "core/gimpbuffer.h"
#include "core/gimpdrawable-bucket-fill.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimpdrawable-gradient.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
@@ -71,9 +71,7 @@ drawable_edit_clear_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
-
- gimp_edit_clear (image, drawable, context);
+ gimp_drawable_edit_clear (drawable, context);
}
else
success = FALSE;
@@ -104,7 +102,6 @@ drawable_edit_fill_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
gimp_context_set_opacity (GIMP_CONTEXT (options),
@@ -115,7 +112,7 @@ drawable_edit_fill_invoker (GimpProcedure *procedure,
if (gimp_fill_options_set_by_fill_type (options, context,
fill_type, error))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
success = FALSE;
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index ddf8894..f3dfd0b 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -35,6 +35,7 @@
#include "core/gimpbuffer.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-bucket-fill.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimpdrawable-gradient.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
@@ -524,9 +525,7 @@ edit_clear_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
-
- gimp_edit_clear (image, drawable, context);
+ gimp_drawable_edit_clear (drawable, context);
}
else
success = FALSE;
@@ -557,13 +556,12 @@ edit_fill_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
if (gimp_fill_options_set_by_fill_type (options, context,
fill_type, error))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
success = FALSE;
@@ -625,7 +623,7 @@ edit_bucket_fill_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
{
@@ -702,7 +700,7 @@ edit_bucket_fill_full_invoker (GimpProcedure *procedure,
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
{
diff --git a/app/tools/gimpbucketfilltool.c b/app/tools/gimpbucketfilltool.c
index 52c5526..546e53d 100644
--- a/app/tools/gimpbucketfilltool.c
+++ b/app/tools/gimpbucketfilltool.c
@@ -25,8 +25,8 @@
#include "tools-types.h"
#include "core/gimp.h"
-#include "core/gimp-edit.h"
#include "core/gimpdrawable-bucket-fill.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimperror.h"
#include "core/gimpfilloptions.h"
#include "core/gimpimage.h"
@@ -191,7 +191,7 @@ gimp_bucket_fill_tool_button_release (GimpTool *tool,
if (options->fill_selection)
{
- gimp_edit_fill (image, drawable, fill_options, NULL);
+ gimp_drawable_edit_fill (drawable, fill_options, NULL);
}
else
{
diff --git a/app/widgets/gimpdrawabletreeview.c b/app/widgets/gimpdrawabletreeview.c
index 5efd134..5452c7c 100644
--- a/app/widgets/gimpdrawabletreeview.c
+++ b/app/widgets/gimpdrawabletreeview.c
@@ -28,8 +28,8 @@
#include "widgets-types.h"
#include "core/gimp.h"
-#include "core/gimp-edit.h"
#include "core/gimpdrawable.h"
+#include "core/gimpdrawable-edit.h"
#include "core/gimpfilloptions.h"
#include "core/gimpimage.h"
#include "core/gimpimage-undo.h"
@@ -242,9 +242,9 @@ gimp_drawable_tree_view_drop_viewable (GimpContainerTreeView *view,
gimp_context_set_pattern (GIMP_CONTEXT (options),
GIMP_PATTERN (src_viewable));
- gimp_edit_fill (image, GIMP_DRAWABLE (dest_viewable),
- options,
- C_("undo-type", "Drop pattern to layer"));
+ gimp_drawable_edit_fill (GIMP_DRAWABLE (dest_viewable),
+ options,
+ C_("undo-type", "Drop pattern to layer"));
g_object_unref (options);
@@ -272,9 +272,9 @@ gimp_drawable_tree_view_drop_color (GimpContainerTreeView *view,
gimp_fill_options_set_style (options, GIMP_FILL_STYLE_SOLID);
gimp_context_set_foreground (GIMP_CONTEXT (options), color);
- gimp_edit_fill (image, GIMP_DRAWABLE (dest_viewable),
- options,
- C_("undo-type", "Drop color to layer"));
+ gimp_drawable_edit_fill (GIMP_DRAWABLE (dest_viewable),
+ options,
+ C_("undo-type", "Drop color to layer"));
g_object_unref (options);
@@ -333,7 +333,7 @@ gimp_drawable_tree_view_new_dropped (GimpItemTreeView *view,
item = GIMP_ITEM_TREE_VIEW_GET_CLASS (view)->new_item (image);
if (item)
- gimp_edit_fill (image, GIMP_DRAWABLE (item), options, undo_desc);
+ gimp_drawable_edit_fill (GIMP_DRAWABLE (item), options, undo_desc);
gimp_image_undo_group_end (image);
diff --git a/pdb/groups/drawable_edit.pdb b/pdb/groups/drawable_edit.pdb
index 87d10ff..eba491e 100644
--- a/pdb/groups/drawable_edit.pdb
+++ b/pdb/groups/drawable_edit.pdb
@@ -45,9 +45,7 @@ HELP
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
-
- gimp_edit_clear (image, drawable, context);
+ gimp_drawable_edit_clear (drawable, context);
}
else
success = FALSE;
@@ -91,7 +89,6 @@ HELP
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
gimp_context_set_opacity (GIMP_CONTEXT (options),
@@ -102,7 +99,7 @@ HELP
if (gimp_fill_options_set_by_fill_type (options, context,
fill_type, error))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
success = FALSE;
@@ -426,7 +423,7 @@ CODE
@headers = qw("libgimpconfig/gimpconfig.h"
"paint/gimppaintoptions.h"
"core/gimp.h"
- "core/gimp-edit.h"
+ "core/gimpdrawable-edit.h"
"core/gimpbuffer.h"
"core/gimpimage.h"
"core/gimpprogress.h"
diff --git a/pdb/groups/edit.pdb b/pdb/groups/edit.pdb
index 3b04b04..d0d8987 100644
--- a/pdb/groups/edit.pdb
+++ b/pdb/groups/edit.pdb
@@ -533,9 +533,7 @@ HELP
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
-
- gimp_edit_clear (image, drawable, context);
+ gimp_drawable_edit_clear (drawable, context);
}
else
success = FALSE;
@@ -577,13 +575,12 @@ HELP
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GimpImage *image = gimp_item_get_image (GIMP_ITEM (drawable));
GimpFillOptions *options = gimp_fill_options_new (gimp, NULL, FALSE);
if (gimp_fill_options_set_by_fill_type (options, context,
fill_type, error))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
success = FALSE;
@@ -672,7 +669,7 @@ HELP
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
{
@@ -780,7 +777,7 @@ HELP
if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
{
- gimp_edit_fill (image, drawable, options, NULL);
+ gimp_drawable_edit_fill (drawable, options, NULL);
}
else
{
@@ -1043,6 +1040,7 @@ CODE
@headers = qw("libgimpconfig/gimpconfig.h"
"core/gimp.h"
"core/gimp-edit.h"
+ "core/gimpdrawable-edit.h"
"core/gimpbuffer.h"
"core/gimpimage.h"
"core/gimpprogress.h"
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e1d300e..a536bc7 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -132,6 +132,7 @@ app/core/gimpdata.c
app/core/gimpdatafactory.c
app/core/gimpdrawable.c
app/core/gimpdrawable-bucket-fill.c
+app/core/gimpdrawable-edit.c
app/core/gimpdrawable-equalize.c
app/core/gimpdrawable-floating-selection.c
app/core/gimpdrawable-foreground-extract.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]