Commit 3ef20cd8 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

major cleanup. After being finished, I decided that it needs to be

2001-06-18  Michael Natterer  <mitch@gimp.org>

	* app/nav_window.[ch]: major cleanup. After being finished, I
	decided that it needs to be factored out to a widget (see below),
	so like 90% of this file will go away soon.

	* app/apptypes.h: added opaque NavigationDialog typedef.

	* app/gdisplay.[ch]: Added gdisplay_selection_visibility() which
	is called from gdisplays_selection_visibility(). Capitalized the
	SelectionControl enum values. Cleaned up the GDisplay struct and
	it's initialisation while i was on it.

	* app/gimage.c: gimage_size_changed_handler(): removed stuff which
	is now done by GimpImage itself.

	* app/scale.c
	* app/scroll.c: also update the navigation popup, not only the
	dialog.

	* app/selection.[ch]: major indentation & cleanup attack. Maybe
	found the "Selection vanishes" bug (the timeout id was assinged to
	a gint, not a _guint_).

	* app/undo.c: s/gimp_image_size_changed/gimp_viweable_size_changed/

	* app/core/gimpdrawable.c: invalidate the image's preview from our
	"invalidate_preview" implementation. This means that the image's
	preview is invalidated way too often currently, which cries for
	some general freeze/thaw mechanism on the GimpViewable level.
	(Note that previews are rendered in the idle loop, so this is not
	really a major performance impact, it's just ugly).

	* app/core/gimpimage.[ch]: removed the "size_changed" signal...

	* app/core/gimpviewable.[ch]: ...and added it here.

	* app/core/gimplayer.c: invalidate_preview(): always chain up,
	also if it's a floating selection.

	* app/gui/info-dialog.[ch]
	* app/gui/info-window.c: minor cleanups.

	* app/gui/preferences-dialog.c: no need to invalidate the image
	after we have invalidated all it's layers.

	* app/core/gimpimage-mask.c
	* app/gui/commands.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c: capitalized the SelectionCommand enum
	values.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpnavigationpreview.[ch]: new widget.

	* app/widgets/gimppreview.[ch]: added a non-working
	non-dot-for-dot mode. Added xres/yres params to the
	gimp_preview_calc_size() helper function.

	Cache the "size" value which was passed to the simple function
	variants (gimp_preview_new() and gimp_preview_set_size()) so we
	can re-calculate the preview's extents on the underlying
	viewable's "size_changed" signal and on gimp_preview_set_viewable().

	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpimagepreview.c: changed accordingly.
parent 45ecf78e
2001-06-18 Michael Natterer <mitch@gimp.org>
* app/nav_window.[ch]: major cleanup. After being finished, I
decided that it needs to be factored out to a widget (see below),
so like 90% of this file will go away soon.
* app/apptypes.h: added opaque NavigationDialog typedef.
* app/gdisplay.[ch]: Added gdisplay_selection_visibility() which
is called from gdisplays_selection_visibility(). Capitalized the
SelectionControl enum values. Cleaned up the GDisplay struct and
it's initialisation while i was on it.
* app/gimage.c: gimage_size_changed_handler(): removed stuff which
is now done by GimpImage itself.
* app/scale.c
* app/scroll.c: also update the navigation popup, not only the
dialog.
* app/selection.[ch]: major indentation & cleanup attack. Maybe
found the "Selection vanishes" bug (the timeout id was assinged to
a gint, not a _guint_).
* app/undo.c: s/gimp_image_size_changed/gimp_viweable_size_changed/
* app/core/gimpdrawable.c: invalidate the image's preview from our
"invalidate_preview" implementation. This means that the image's
preview is invalidated way too often currently, which cries for
some general freeze/thaw mechanism on the GimpViewable level.
(Note that previews are rendered in the idle loop, so this is not
really a major performance impact, it's just ugly).
* app/core/gimpimage.[ch]: removed the "size_changed" signal...
* app/core/gimpviewable.[ch]: ...and added it here.
* app/core/gimplayer.c: invalidate_preview(): always chain up,
also if it's a floating selection.
* app/gui/info-dialog.[ch]
* app/gui/info-window.c: minor cleanups.
* app/gui/preferences-dialog.c: no need to invalidate the image
after we have invalidated all it's layers.
* app/core/gimpimage-mask.c
* app/gui/commands.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpinktool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c: capitalized the SelectionCommand enum
values.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpnavigationpreview.[ch]: new widget.
* app/widgets/gimppreview.[ch]: added a non-working
non-dot-for-dot mode. Added xres/yres params to the
gimp_preview_calc_size() helper function.
Cache the "size" value which was passed to the simple function
variants (gimp_preview_new() and gimp_preview_set_size()) so we
can re-calculate the preview's extents on the underlying
viewable's "size_changed" signal and on gimp_preview_set_viewable().
* app/widgets/gimpdrawablepreview.c
* app/widgets/gimpimagepreview.c: changed accordingly.
2001-06-18 Sven Neumann <sven@gimp.org>
* plug-ins/gfig/gfig.c
......
......@@ -592,7 +592,7 @@ view_info_window_cmd_callback (GtkWidget *widget,
if (! gimprc.info_window_follows_mouse)
{
if (! gdisp->window_info_dialog)
gdisp->window_info_dialog = info_window_create ((void *) gdisp);
gdisp->window_info_dialog = info_window_create (gdisp);
info_window_update (gdisp);
info_dialog_popup (gdisp->window_info_dialog);
......@@ -613,13 +613,13 @@ view_nav_window_cmd_callback (GtkWidget *widget,
if (gimprc.nav_window_per_display)
{
if (! gdisp->window_nav_dialog)
gdisp->window_nav_dialog = nav_window_create ((void *) gdisp);
gdisp->window_nav_dialog = nav_dialog_create (gdisp);
nav_dialog_popup (gdisp->window_nav_dialog);
}
else
{
nav_window_follow_auto ();
nav_dialog_follow_auto ();
}
}
......@@ -637,7 +637,8 @@ view_toggle_selection_cmd_callback (GtkWidget *widget,
/* hidden == TRUE corresponds to the menu toggle being FALSE */
if (new_val == gdisp->select->hidden)
{
selection_hide (gdisp->select, (void *) gdisp);
selection_toggle (gdisp->select);
gdisplays_flush ();
}
}
......
......@@ -47,6 +47,8 @@ typedef struct _ImageMap ImageMap;
typedef struct _InfoDialog InfoDialog;
typedef struct _NavigationDialog NavigationDialog;
typedef struct _Path Path;
typedef struct _PathPoint PathPoint;
typedef struct _PathList PathList;
......
......@@ -312,7 +312,7 @@ gimp_drawable_invalidate_preview (GimpViewable *viewable)
gimage = gimp_drawable_gimage (drawable);
if (gimage)
gimage->comp_preview_valid = FALSE;
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (gimage));
}
void
......
......@@ -74,6 +74,7 @@ static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_name_changed (GimpObject *object);
static void gimp_image_invalidate_preview (GimpViewable *viewable);
static void gimp_image_size_changed (GimpViewable *viewable);
static void gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol);
static TempBuf *gimp_image_get_preview (GimpViewable *gimage,
......@@ -160,7 +161,6 @@ enum
{
MODE_CHANGED,
ALPHA_CHANGED,
SIZE_CHANGED,
FLOATING_SELECTION_CHANGED,
ACTIVE_LAYER_CHANGED,
ACTIVE_CHANNEL_CHANGED,
......@@ -242,15 +242,6 @@ gimp_image_class_init (GimpImageClass *klass)
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[SIZE_CHANGED] =
gtk_signal_new ("size_changed",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GimpImageClass,
size_changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[FLOATING_SELECTION_CHANGED] =
gtk_signal_new ("floating_selection_changed",
GTK_RUN_FIRST,
......@@ -365,12 +356,12 @@ gimp_image_class_init (GimpImageClass *klass)
gimp_object_class->name_changed = gimp_image_name_changed;
viewable_class->invalidate_preview = gimp_image_invalidate_preview;
viewable_class->size_changed = gimp_image_size_changed;
viewable_class->get_preview = gimp_image_get_preview;
viewable_class->get_new_preview = gimp_image_get_new_preview;
klass->mode_changed = NULL;
klass->alpha_changed = NULL;
klass->size_changed = NULL;
klass->floating_selection_changed = NULL;
klass->active_layer_changed = NULL;
klass->active_channel_changed = NULL;
......@@ -525,20 +516,29 @@ static void
gimp_image_invalidate_preview (GimpViewable *viewable)
{
GimpImage *gimage;
GimpLayer *layer;
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
gimage = GIMP_IMAGE (viewable);
/* Invalidate the floating sel if it exists */
if ((layer = gimp_image_floating_sel (gimage)))
floating_sel_invalidate (layer);
gimage->comp_preview_valid = FALSE;
}
static void
gimp_image_size_changed (GimpViewable *viewable)
{
GimpImage *gimage;
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
gimage = GIMP_IMAGE (viewable);
gimp_image_invalidate_layer_previews (gimage);
gimp_image_invalidate_channel_previews (gimage);
}
static void
gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol)
......@@ -841,7 +841,7 @@ gimp_image_resize (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -969,7 +969,7 @@ gimp_image_scale (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -1726,14 +1726,6 @@ gimp_image_alpha_changed (GimpImage *gimage)
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[ALPHA_CHANGED]);
}
void
gimp_image_size_changed (GimpImage *gimage)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[SIZE_CHANGED]);
}
void
gimp_image_floating_selection_changed (GimpImage *gimage)
{
......
......@@ -137,7 +137,6 @@ struct _GimpImageClass
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* size_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
......@@ -280,7 +279,6 @@ void gimp_image_colormap_changed (GimpImage *gimage,
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_size_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
......
......@@ -143,7 +143,7 @@ gimage_mask_invalidate (GimpImage *gimage)
GimpChannel *mask;
/* Turn the current selection off */
gdisplays_selection_visibility (gimage, SelectionOff);
gdisplays_selection_visibility (gimage, SELECTION_OFF);
mask = gimp_image_get_mask (gimage);
mask->boundary_known = FALSE;
......
......@@ -74,6 +74,7 @@ static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_name_changed (GimpObject *object);
static void gimp_image_invalidate_preview (GimpViewable *viewable);
static void gimp_image_size_changed (GimpViewable *viewable);
static void gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol);
static TempBuf *gimp_image_get_preview (GimpViewable *gimage,
......@@ -160,7 +161,6 @@ enum
{
MODE_CHANGED,
ALPHA_CHANGED,
SIZE_CHANGED,
FLOATING_SELECTION_CHANGED,
ACTIVE_LAYER_CHANGED,
ACTIVE_CHANNEL_CHANGED,
......@@ -242,15 +242,6 @@ gimp_image_class_init (GimpImageClass *klass)
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[SIZE_CHANGED] =
gtk_signal_new ("size_changed",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GimpImageClass,
size_changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[FLOATING_SELECTION_CHANGED] =
gtk_signal_new ("floating_selection_changed",
GTK_RUN_FIRST,
......@@ -365,12 +356,12 @@ gimp_image_class_init (GimpImageClass *klass)
gimp_object_class->name_changed = gimp_image_name_changed;
viewable_class->invalidate_preview = gimp_image_invalidate_preview;
viewable_class->size_changed = gimp_image_size_changed;
viewable_class->get_preview = gimp_image_get_preview;
viewable_class->get_new_preview = gimp_image_get_new_preview;
klass->mode_changed = NULL;
klass->alpha_changed = NULL;
klass->size_changed = NULL;
klass->floating_selection_changed = NULL;
klass->active_layer_changed = NULL;
klass->active_channel_changed = NULL;
......@@ -525,20 +516,29 @@ static void
gimp_image_invalidate_preview (GimpViewable *viewable)
{
GimpImage *gimage;
GimpLayer *layer;
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
gimage = GIMP_IMAGE (viewable);
/* Invalidate the floating sel if it exists */
if ((layer = gimp_image_floating_sel (gimage)))
floating_sel_invalidate (layer);
gimage->comp_preview_valid = FALSE;
}
static void
gimp_image_size_changed (GimpViewable *viewable)
{
GimpImage *gimage;
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
gimage = GIMP_IMAGE (viewable);
gimp_image_invalidate_layer_previews (gimage);
gimp_image_invalidate_channel_previews (gimage);
}
static void
gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol)
......@@ -841,7 +841,7 @@ gimp_image_resize (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -969,7 +969,7 @@ gimp_image_scale (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -1726,14 +1726,6 @@ gimp_image_alpha_changed (GimpImage *gimage)
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[ALPHA_CHANGED]);
}
void
gimp_image_size_changed (GimpImage *gimage)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[SIZE_CHANGED]);
}
void
gimp_image_floating_selection_changed (GimpImage *gimage)
{
......
......@@ -137,7 +137,6 @@ struct _GimpImageClass
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* size_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
......@@ -280,7 +279,6 @@ void gimp_image_colormap_changed (GimpImage *gimage,
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_size_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
......
......@@ -74,6 +74,7 @@ static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_name_changed (GimpObject *object);
static void gimp_image_invalidate_preview (GimpViewable *viewable);
static void gimp_image_size_changed (GimpViewable *viewable);
static void gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol);
static TempBuf *gimp_image_get_preview (GimpViewable *gimage,
......@@ -160,7 +161,6 @@ enum
{
MODE_CHANGED,
ALPHA_CHANGED,
SIZE_CHANGED,
FLOATING_SELECTION_CHANGED,
ACTIVE_LAYER_CHANGED,
ACTIVE_CHANNEL_CHANGED,
......@@ -242,15 +242,6 @@ gimp_image_class_init (GimpImageClass *klass)
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[SIZE_CHANGED] =
gtk_signal_new ("size_changed",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GimpImageClass,
size_changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[FLOATING_SELECTION_CHANGED] =
gtk_signal_new ("floating_selection_changed",
GTK_RUN_FIRST,
......@@ -365,12 +356,12 @@ gimp_image_class_init (GimpImageClass *klass)
gimp_object_class->name_changed = gimp_image_name_changed;
viewable_class->invalidate_preview = gimp_image_invalidate_preview;
viewable_class->size_changed = gimp_image_size_changed;
viewable_class->get_preview = gimp_image_get_preview;
viewable_class->get_new_preview = gimp_image_get_new_preview;
klass->mode_changed = NULL;
klass->alpha_changed = NULL;
klass->size_changed = NULL;
klass->floating_selection_changed = NULL;
klass->active_layer_changed = NULL;
klass->active_channel_changed = NULL;
......@@ -525,20 +516,29 @@ static void
gimp_image_invalidate_preview (GimpViewable *viewable)
{
GimpImage *gimage;
GimpLayer *layer;
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
gimage = GIMP_IMAGE (viewable);
/* Invalidate the floating sel if it exists */
if ((layer = gimp_image_floating_sel (gimage)))
floating_sel_invalidate (layer);
gimage->comp_preview_valid = FALSE;
}
static void
gimp_image_size_changed (GimpViewable *viewable)
{
GimpImage *gimage;
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
gimage = GIMP_IMAGE (viewable);
gimp_image_invalidate_layer_previews (gimage);
gimp_image_invalidate_channel_previews (gimage);
}
static void
gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol)
......@@ -841,7 +841,7 @@ gimp_image_resize (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -969,7 +969,7 @@ gimp_image_scale (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -1726,14 +1726,6 @@ gimp_image_alpha_changed (GimpImage *gimage)
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[ALPHA_CHANGED]);
}
void
gimp_image_size_changed (GimpImage *gimage)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[SIZE_CHANGED]);
}
void
gimp_image_floating_selection_changed (GimpImage *gimage)
{
......
......@@ -137,7 +137,6 @@ struct _GimpImageClass
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* size_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
......@@ -280,7 +279,6 @@ void gimp_image_colormap_changed (GimpImage *gimage,
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_size_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
......
......@@ -74,6 +74,7 @@ static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_name_changed (GimpObject *object);
static void gimp_image_invalidate_preview (GimpViewable *viewable);
static void gimp_image_size_changed (GimpViewable *viewable);
static void gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol);
static TempBuf *gimp_image_get_preview (GimpViewable *gimage,
......@@ -160,7 +161,6 @@ enum
{
MODE_CHANGED,
ALPHA_CHANGED,
SIZE_CHANGED,
FLOATING_SELECTION_CHANGED,
ACTIVE_LAYER_CHANGED,
ACTIVE_CHANNEL_CHANGED,
......@@ -242,15 +242,6 @@ gimp_image_class_init (GimpImageClass *klass)
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[SIZE_CHANGED] =
gtk_signal_new ("size_changed",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GimpImageClass,
size_changed),
gtk_signal_default_marshaller,
GTK_TYPE_NONE, 0);
gimp_image_signals[FLOATING_SELECTION_CHANGED] =
gtk_signal_new ("floating_selection_changed",
GTK_RUN_FIRST,
......@@ -365,12 +356,12 @@ gimp_image_class_init (GimpImageClass *klass)
gimp_object_class->name_changed = gimp_image_name_changed;
viewable_class->invalidate_preview = gimp_image_invalidate_preview;
viewable_class->size_changed = gimp_image_size_changed;
viewable_class->get_preview = gimp_image_get_preview;
viewable_class->get_new_preview = gimp_image_get_new_preview;
klass->mode_changed = NULL;
klass->alpha_changed = NULL;
klass->size_changed = NULL;
klass->floating_selection_changed = NULL;
klass->active_layer_changed = NULL;
klass->active_channel_changed = NULL;
......@@ -525,20 +516,29 @@ static void
gimp_image_invalidate_preview (GimpViewable *viewable)
{
GimpImage *gimage;
GimpLayer *layer;
if (GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview)
GIMP_VIEWABLE_CLASS (parent_class)->invalidate_preview (viewable);
gimage = GIMP_IMAGE (viewable);
/* Invalidate the floating sel if it exists */
if ((layer = gimp_image_floating_sel (gimage)))
floating_sel_invalidate (layer);
gimage->comp_preview_valid = FALSE;
}
static void
gimp_image_size_changed (GimpViewable *viewable)
{
GimpImage *gimage;
if (GIMP_VIEWABLE_CLASS (parent_class)->size_changed)
GIMP_VIEWABLE_CLASS (parent_class)->size_changed (viewable);
gimage = GIMP_IMAGE (viewable);
gimp_image_invalidate_layer_previews (gimage);
gimp_image_invalidate_channel_previews (gimage);
}
static void
gimp_image_real_colormap_changed (GimpImage *gimage,
gint ncol)
......@@ -841,7 +841,7 @@ gimp_image_resize (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -969,7 +969,7 @@ gimp_image_scale (GimpImage *gimage,
undo_push_group_end (gimage);
gimp_image_size_changed (gimage);
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
gimp_unset_busy ();
}
......@@ -1726,14 +1726,6 @@ gimp_image_alpha_changed (GimpImage *gimage)
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[ALPHA_CHANGED]);
}
void
gimp_image_size_changed (GimpImage *gimage)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gtk_signal_emit (GTK_OBJECT (gimage), gimp_image_signals[SIZE_CHANGED]);