[gimp] libgimp: use item API instead of deprecated drawable API
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: use item API instead of deprecated drawable API
- Date: Fri, 9 Jul 2010 09:30:04 +0000 (UTC)
commit ce9ea1e8d71e175ae31a2dbf285e6d28014eed99
Author: Michael Natterer <mitch gimp org>
Date: Fri Jul 9 11:29:35 2010 +0200
libgimp: use item API instead of deprecated drawable API
libgimp/gimpaspectpreview.c | 2 +-
libgimp/gimpdrawable.c | 2 +-
libgimp/gimpdrawablepreview.c | 4 ++--
libgimp/gimpexport.c | 14 +++++++-------
libgimp/gimpzoompreview.c | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/libgimp/gimpaspectpreview.c b/libgimp/gimpaspectpreview.c
index 95c4e95..2adf888 100644
--- a/libgimp/gimpaspectpreview.c
+++ b/libgimp/gimpaspectpreview.c
@@ -274,7 +274,7 @@ gimp_aspect_preview_draw_buffer (GimpPreview *preview,
GimpDrawable *drawable = GIMP_ASPECT_PREVIEW (preview)->drawable;
gint32 image_id;
- image_id = gimp_drawable_get_image (drawable->drawable_id);
+ image_id = gimp_item_get_image (drawable->drawable_id);
if (gimp_selection_is_empty (image_id))
{
diff --git a/libgimp/gimpdrawable.c b/libgimp/gimpdrawable.c
index 3fbf30a..06b4108 100644
--- a/libgimp/gimpdrawable.c
+++ b/libgimp/gimpdrawable.c
@@ -346,7 +346,7 @@ gimp_drawable_attach_new_parasite (gint32 drawable_ID,
GimpParasite *parasite = gimp_parasite_new (name, flags, size, data);
gboolean success;
- success = gimp_drawable_parasite_attach (drawable_ID, parasite);
+ success = gimp_item_parasite_attach (drawable_ID, parasite);
gimp_parasite_free (parasite);
diff --git a/libgimp/gimpdrawablepreview.c b/libgimp/gimpdrawablepreview.c
index 5f3aeaf..f69c0d2 100644
--- a/libgimp/gimpdrawablepreview.c
+++ b/libgimp/gimpdrawablepreview.c
@@ -388,7 +388,7 @@ gimp_drawable_preview_draw_area (GimpDrawablePreview *preview,
GimpDrawable *drawable = preview->drawable;
gint32 image_id;
- image_id = gimp_drawable_get_image (drawable->drawable_id);
+ image_id = gimp_item_get_image (drawable->drawable_id);
if (gimp_selection_is_empty (image_id))
{
@@ -494,7 +494,7 @@ gimp_drawable_preview_set_drawable (GimpDrawablePreview *drawable_preview,
if (gimp_drawable_is_indexed (drawable->drawable_id))
{
- guint32 image = gimp_drawable_get_image (drawable->drawable_id);
+ guint32 image = gimp_item_get_image (drawable->drawable_id);
guchar *cmap;
gint num_colors;
diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c
index 03f59ed..5db07a4 100644
--- a/libgimp/gimpexport.c
+++ b/libgimp/gimpexport.c
@@ -82,7 +82,7 @@ export_merge (gint32 image_ID,
layers = gimp_image_get_layers (image_ID, &nlayers);
for (i = 0; i < nlayers; i++)
{
- if (gimp_drawable_get_visible (layers[i]))
+ if (gimp_item_get_visible (layers[i]))
nvisible++;
}
@@ -716,16 +716,16 @@ gimp_export_image (gint32 *image_ID,
/* ask for confirmation if the user is not saving a layer (see bug #51114) */
if (format_name &&
- ! gimp_drawable_is_layer (*drawable_ID) &&
+ ! gimp_item_is_layer (*drawable_ID) &&
! (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS))
{
- if (gimp_drawable_is_layer_mask (*drawable_ID))
+ if (gimp_item_is_layer_mask (*drawable_ID))
{
retval = confirm_save_dialog
(_("You are about to save a layer mask as %s.\n"
"This will not save the visible layers."), format_name);
}
- else if (gimp_drawable_is_channel (*drawable_ID))
+ else if (gimp_item_is_channel (*drawable_ID))
{
retval = confirm_save_dialog
(_("You are about to save a channel (saved selection) as %s.\n"
@@ -762,7 +762,7 @@ gimp_export_image (gint32 *image_ID,
/* If this is the last layer, it's visible and has no alpha
* channel, then the image has a "flat" background
*/
- if (i == n_layers - 1 && gimp_drawable_get_visible (layers[i]))
+ if (i == n_layers - 1 && gimp_item_get_visible (layers[i]))
background_has_alpha = FALSE;
if (capabilities & GIMP_EXPORT_NEEDS_ALPHA)
@@ -787,8 +787,8 @@ gimp_export_image (gint32 *image_ID,
if (! added_flatten)
{
/* check if layer size != canvas size, opacity != 100%, or offsets != 0 */
- if (n_layers == 1 &&
- gimp_drawable_is_layer (*drawable_ID) &&
+ if (n_layers == 1 &&
+ gimp_item_is_layer (*drawable_ID) &&
! (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS))
{
gint offset_x;
diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c
index 6b4a4f7..77bd1eb 100644
--- a/libgimp/gimpzoompreview.c
+++ b/libgimp/gimpzoompreview.c
@@ -501,7 +501,7 @@ gimp_zoom_preview_draw_buffer (GimpPreview *preview,
GimpDrawable *drawable = priv->drawable;
gint32 image_id;
- image_id = gimp_drawable_get_image (drawable->drawable_id);
+ image_id = gimp_item_get_image (drawable->drawable_id);
if (gimp_selection_is_empty (image_id))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]