diff --git a/ChangeLog b/ChangeLog index cbe9be68a7..2f56a03f03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-10 Michael Natterer + + * app/core/gimpdrawable-foreground-extract.c + * app/core/gimpdrawable-preview.c + * app/core/gimplayer-project.c: use gimp_drawable_get_colormap() + instead of gimp_image_get_colormap(). + 2008-11-09 Martin Nordholts Bug 558549 – Stroking a single-point path with a paint tool diff --git a/app/core/gimpdrawable-foreground-extract.c b/app/core/gimpdrawable-foreground-extract.c index d3818c8764..6c6cde7ed9 100644 --- a/app/core/gimpdrawable-foreground-extract.c +++ b/app/core/gimpdrawable-foreground-extract.c @@ -32,7 +32,6 @@ #include "gimpdrawable.h" #include "gimpdrawable-foreground-extract.h" #include "gimpimage.h" -#include "gimpimage-colormap.h" #include "gimpprogress.h" #include "gimp-intl.h" @@ -80,7 +79,6 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable, gint width, gint height) { - GimpImage *image; const guchar *colormap = NULL; gboolean intersect; gint offset_x; @@ -89,10 +87,8 @@ gimp_drawable_foreground_extract_siox_init (GimpDrawable *drawable, g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL); g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), NULL); - image = gimp_item_get_image (GIMP_ITEM (drawable)); - - if (gimp_image_base_type (image) == GIMP_INDEXED) - colormap = gimp_image_get_colormap (image); + if (gimp_drawable_is_indexed (drawable)) + colormap = gimp_drawable_get_colormap (drawable); gimp_item_get_offset (GIMP_ITEM (drawable), &offset_x, &offset_y); diff --git a/app/core/gimpdrawable-preview.c b/app/core/gimpdrawable-preview.c index d55af4cfb4..474a254aa1 100644 --- a/app/core/gimpdrawable-preview.c +++ b/app/core/gimpdrawable-preview.c @@ -37,7 +37,6 @@ #include "gimp.h" #include "gimpchannel.h" #include "gimpimage.h" -#include "gimpimage-colormap.h" #include "gimpdrawable-preview.h" #include "gimplayer.h" #include "gimppreviewcache.h" @@ -70,7 +69,7 @@ gimp_drawable_get_preview (GimpViewable *viewable, GimpImage *image; drawable = GIMP_DRAWABLE (viewable); - image = gimp_item_get_image (GIMP_ITEM (drawable)); + image = gimp_item_get_image (GIMP_ITEM (drawable)); if (! image->gimp->config->layer_previews) return NULL; @@ -154,7 +153,7 @@ gimp_drawable_get_sub_preview (GimpDrawable *drawable, if (GIMP_IMAGE_TYPE_BASE_TYPE (gimp_drawable_type (drawable)) == GIMP_INDEXED) return gimp_drawable_indexed_preview (drawable, - gimp_image_get_colormap (image), + gimp_drawable_get_colormap (drawable), src_x, src_y, src_width, src_height, dest_width, dest_height); diff --git a/app/core/gimplayer-project.c b/app/core/gimplayer-project.c index aff7bfa9b6..89d5f32859 100644 --- a/app/core/gimplayer-project.c +++ b/app/core/gimplayer-project.c @@ -30,7 +30,6 @@ #include "paint-funcs/paint-funcs.h" #include "gimpimage.h" -#include "gimpimage-colormap.h" #include "gimplayer.h" #include "gimplayer-project.h" #include "gimplayermask.h" @@ -108,13 +107,13 @@ gimp_layer_project_region (GimpDrawable *drawable, break; case GIMP_INDEXED_IMAGE: - colormap = gimp_image_get_colormap (image), + colormap = gimp_drawable_get_colormap (drawable), initial_mode = INITIAL_INDEXED; combination_mode = COMBINE_INTEN_A_INDEXED; break; case GIMP_INDEXEDA_IMAGE: - colormap = gimp_image_get_colormap (image), + colormap = gimp_drawable_get_colormap (drawable), initial_mode = INITIAL_INDEXED_ALPHA; combination_mode = COMBINE_INTEN_A_INDEXED_A; break;