mirror of https://github.com/GNOME/gimp.git
added a default implementation of GimpImage::mode_changed() which
2003-12-01 Michael Natterer <mitch@gimp.org> * app/core/gimpimage.c: added a default implementation of GimpImage::mode_changed() which reallocates the projection. * app/core/gimpimage-convert.c (gimp_image_convert) * app/core/gimpimage-undo-push.c (undo_pop_image_type): removed explicit calls to gimp_image_projection_allocate().
This commit is contained in:
parent
f74d5de747
commit
8842730435
|
@ -1,3 +1,12 @@
|
||||||
|
2003-12-01 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/core/gimpimage.c: added a default implementation of
|
||||||
|
GimpImage::mode_changed() which reallocates the projection.
|
||||||
|
|
||||||
|
* app/core/gimpimage-convert.c (gimp_image_convert)
|
||||||
|
* app/core/gimpimage-undo-push.c (undo_pop_image_type): removed
|
||||||
|
explicit calls to gimp_image_projection_allocate().
|
||||||
|
|
||||||
2003-12-01 Michael Natterer <mitch@gimp.org>
|
2003-12-01 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/core/gimpimage-flip.c (gimp_image_flip): no need to
|
* app/core/gimpimage-flip.c (gimp_image_flip): no need to
|
||||||
|
|
|
@ -1038,9 +1038,6 @@ gimp_image_convert (GimpImage *gimage,
|
||||||
if (quantobj)
|
if (quantobj)
|
||||||
quantobj->delete_func (quantobj);
|
quantobj->delete_func (quantobj);
|
||||||
|
|
||||||
/* Make sure the projection is up to date */
|
|
||||||
gimp_image_projection_allocate (gimage);
|
|
||||||
|
|
||||||
/* Rigor the floating selection */
|
/* Rigor the floating selection */
|
||||||
if (floating_layer)
|
if (floating_layer)
|
||||||
floating_sel_rigor (floating_layer, TRUE);
|
floating_sel_rigor (floating_layer, TRUE);
|
||||||
|
|
|
@ -361,7 +361,6 @@ undo_pop_image_type (GimpUndo *undo,
|
||||||
itu->base_type = undo->gimage->base_type;
|
itu->base_type = undo->gimage->base_type;
|
||||||
undo->gimage->base_type = tmp;
|
undo->gimage->base_type = tmp;
|
||||||
|
|
||||||
gimp_image_projection_allocate (undo->gimage);
|
|
||||||
gimp_image_colormap_changed (undo->gimage, -1);
|
gimp_image_colormap_changed (undo->gimage, -1);
|
||||||
|
|
||||||
if (itu->base_type != undo->gimage->base_type)
|
if (itu->base_type != undo->gimage->base_type)
|
||||||
|
|
|
@ -115,6 +115,7 @@ static void gimp_image_invalidate_preview (GimpViewable *viewable);
|
||||||
static void gimp_image_size_changed (GimpViewable *viewable);
|
static void gimp_image_size_changed (GimpViewable *viewable);
|
||||||
static gchar * gimp_image_get_description (GimpViewable *viewable,
|
static gchar * gimp_image_get_description (GimpViewable *viewable,
|
||||||
gchar **tooltip);
|
gchar **tooltip);
|
||||||
|
static void gimp_image_real_mode_changed (GimpImage *gimage);
|
||||||
static void gimp_image_real_colormap_changed (GimpImage *gimage,
|
static void gimp_image_real_colormap_changed (GimpImage *gimage,
|
||||||
gint ncol);
|
gint ncol);
|
||||||
static void gimp_image_real_flush (GimpImage *gimage);
|
static void gimp_image_real_flush (GimpImage *gimage);
|
||||||
|
@ -421,7 +422,7 @@ gimp_image_class_init (GimpImageClass *klass)
|
||||||
viewable_class->get_new_preview = gimp_image_get_new_preview;
|
viewable_class->get_new_preview = gimp_image_get_new_preview;
|
||||||
viewable_class->get_description = gimp_image_get_description;
|
viewable_class->get_description = gimp_image_get_description;
|
||||||
|
|
||||||
klass->mode_changed = NULL;
|
klass->mode_changed = gimp_image_real_mode_changed;
|
||||||
klass->alpha_changed = NULL;
|
klass->alpha_changed = NULL;
|
||||||
klass->floating_selection_changed = NULL;
|
klass->floating_selection_changed = NULL;
|
||||||
klass->active_layer_changed = NULL;
|
klass->active_layer_changed = NULL;
|
||||||
|
@ -742,13 +743,11 @@ gimp_image_get_memsize (GimpObject *object,
|
||||||
static void
|
static void
|
||||||
gimp_image_invalidate_preview (GimpViewable *viewable)
|
gimp_image_invalidate_preview (GimpViewable *viewable)
|
||||||
{
|
{
|
||||||
GimpImage *gimage;
|
GimpImage *gimage = GIMP_IMAGE (viewable);
|
||||||
|
|
||||||
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
|
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
|
||||||
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
|
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
|
||||||
|
|
||||||
gimage = GIMP_IMAGE (viewable);
|
|
||||||
|
|
||||||
gimage->comp_preview_valid = FALSE;
|
gimage->comp_preview_valid = FALSE;
|
||||||
|
|
||||||
if (gimage->comp_preview)
|
if (gimage->comp_preview)
|
||||||
|
@ -761,14 +760,12 @@ gimp_image_invalidate_preview (GimpViewable *viewable)
|
||||||
static void
|
static void
|
||||||
gimp_image_size_changed (GimpViewable *viewable)
|
gimp_image_size_changed (GimpViewable *viewable)
|
||||||
{
|
{
|
||||||
GimpImage *gimage;
|
GimpImage *gimage = GIMP_IMAGE (viewable);
|
||||||
GList *list;
|
GList *list;
|
||||||
|
|
||||||
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
|
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
|
||||||
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
|
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
|
||||||
|
|
||||||
gimage = GIMP_IMAGE (viewable);
|
|
||||||
|
|
||||||
gimp_container_foreach (gimage->layers,
|
gimp_container_foreach (gimage->layers,
|
||||||
(GFunc) gimp_viewable_size_changed,
|
(GFunc) gimp_viewable_size_changed,
|
||||||
NULL);
|
NULL);
|
||||||
|
@ -794,13 +791,11 @@ static gchar *
|
||||||
gimp_image_get_description (GimpViewable *viewable,
|
gimp_image_get_description (GimpViewable *viewable,
|
||||||
gchar **tooltip)
|
gchar **tooltip)
|
||||||
{
|
{
|
||||||
GimpImage *gimage;
|
GimpImage *gimage = GIMP_IMAGE (viewable);
|
||||||
const gchar *uri;
|
const gchar *uri;
|
||||||
gchar *basename;
|
gchar *basename;
|
||||||
gchar *retval;
|
gchar *retval;
|
||||||
|
|
||||||
gimage = GIMP_IMAGE (viewable);
|
|
||||||
|
|
||||||
uri = gimp_image_get_uri (GIMP_IMAGE (gimage));
|
uri = gimp_image_get_uri (GIMP_IMAGE (gimage));
|
||||||
|
|
||||||
basename = file_utils_uri_to_utf8_basename (uri);
|
basename = file_utils_uri_to_utf8_basename (uri);
|
||||||
|
@ -815,6 +810,12 @@ gimp_image_get_description (GimpViewable *viewable,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_image_real_mode_changed (GimpImage *gimage)
|
||||||
|
{
|
||||||
|
gimp_image_projection_allocate (gimage);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_image_real_colormap_changed (GimpImage *gimage,
|
gimp_image_real_colormap_changed (GimpImage *gimage,
|
||||||
gint ncol)
|
gint ncol)
|
||||||
|
|
Loading…
Reference in New Issue