Commit 5e74fa37 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

fsck^^^ -- lovely autofoo wants "changequote([,])dnl"

2001-08-11  Michael Natterer  <mitch@gimp.org>

	* configure.in: fsck^^^ -- lovely autofoo wants "changequote([,])dnl"

	* app/core/gimpcontext.[ch]: lots of GObject porting.

	* app/core/gimpobject.[ch]: added a "disconnect" signal, which
	like gtk's "destroy" is emitted in dispose(). This is ugly but
	I don't see another "clean" way to implement weak containers.

	* app/core/gimpcontainer.c: connect to the "disconnect" signal of
	the children of weak containes.

	* app/core/gimpimage.[ch]: replaced the "destroy" implementation
	with "dispose" + "finalize". Removed gimage->undo_history.

	* app/devices.c
	* app/gui/dialogs-constructors.c
	* app/gui/tools-commands.c
	* app/tools/tool_manager.c
	* app/widgets/gimpimagedock.c: changed accordingly.
parent eb50191b
2001-08-11 Michael Natterer <mitch@gimp.org>
* configure.in: fsck^^^ -- lovely autofoo wants "changequote([,])dnl"
* app/core/gimpcontext.[ch]: lots of GObject porting.
* app/core/gimpobject.[ch]: added a "disconnect" signal, which
like gtk's "destroy" is emitted in dispose(). This is ugly but
I don't see another "clean" way to implement weak containers.
* app/core/gimpcontainer.c: connect to the "disconnect" signal of
the children of weak containes.
* app/core/gimpimage.[ch]: replaced the "destroy" implementation
with "dispose" + "finalize". Removed gimage->undo_history.
* app/devices.c
* app/gui/dialogs-constructors.c
* app/gui/tools-commands.c
* app/tools/tool_manager.c
* app/widgets/gimpimagedock.c: changed accordingly.
2001-08-11 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c: made border work and fixed render offsets.
......
......@@ -69,15 +69,15 @@ tools_swap_contexts_cmd_callback (GtkWidget *widget,
NULL);
}
gimp_context_copy_args (gimp_get_user_context (the_gimp),
temp_context,
GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (swap_context,
gimp_get_user_context (the_gimp),
GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (temp_context,
swap_context,
GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_properties (gimp_get_user_context (the_gimp),
temp_context,
GIMP_CONTEXT_ALL_PROPS_MASK);
gimp_context_copy_properties (swap_context,
gimp_get_user_context (the_gimp),
GIMP_CONTEXT_ALL_PROPS_MASK);
gimp_context_copy_properties (temp_context,
swap_context,
GIMP_CONTEXT_ALL_PROPS_MASK);
}
void
......
......@@ -55,7 +55,7 @@ enum
static void gimp_container_init (GimpContainer *container);
static void gimp_container_class_init (GimpContainerClass *klass);
static void gimp_container_dispose (GObject *object);
static void gimp_container_child_destroy_callback (GtkObject *object,
static void gimp_container_disconnect_callback (GimpObject *object,
gpointer data);
......@@ -193,14 +193,14 @@ gimp_container_dispose (GObject *object)
}
static void
gimp_container_child_destroy_callback (GtkObject *object,
gpointer data)
gimp_container_disconnect_callback (GimpObject *object,
gpointer data)
{
GimpContainer *container;
container = GIMP_CONTAINER (data);
gimp_container_remove (container, GIMP_OBJECT (object));
gimp_container_remove (container, object);
}
GType
......@@ -268,8 +268,8 @@ gimp_container_add (GimpContainer *container,
break;
case GIMP_CONTAINER_POLICY_WEAK:
g_signal_connect (G_OBJECT (object), "destroy",
G_CALLBACK (gimp_container_child_destroy_callback),
g_signal_connect (G_OBJECT (object), "disconnect",
G_CALLBACK (gimp_container_disconnect_callback),
container);
break;
}
......@@ -327,7 +327,7 @@ gimp_container_remove (GimpContainer *container,
case GIMP_CONTAINER_POLICY_WEAK:
g_signal_handlers_disconnect_by_func
(G_OBJECT (object),
G_CALLBACK (gimp_container_child_destroy_callback),
G_CALLBACK (gimp_container_disconnect_callback),
container);
break;
}
......
This diff is collapsed.
......@@ -28,20 +28,20 @@
typedef enum
{
GIMP_CONTEXT_ARG_IMAGE,
GIMP_CONTEXT_ARG_DISPLAY,
GIMP_CONTEXT_ARG_TOOL,
GIMP_CONTEXT_ARG_FOREGROUND,
GIMP_CONTEXT_ARG_BACKGROUND,
GIMP_CONTEXT_ARG_OPACITY,
GIMP_CONTEXT_ARG_PAINT_MODE,
GIMP_CONTEXT_ARG_BRUSH,
GIMP_CONTEXT_ARG_PATTERN,
GIMP_CONTEXT_ARG_GRADIENT,
GIMP_CONTEXT_ARG_PALETTE,
GIMP_CONTEXT_ARG_BUFFER,
GIMP_CONTEXT_NUM_ARGS
} GimpContextArgType;
GIMP_CONTEXT_PROP_IMAGE,
GIMP_CONTEXT_PROP_DISPLAY,
GIMP_CONTEXT_PROP_TOOL,
GIMP_CONTEXT_PROP_FOREGROUND,
GIMP_CONTEXT_PROP_BACKGROUND,
GIMP_CONTEXT_PROP_OPACITY,
GIMP_CONTEXT_PROP_PAINT_MODE,
GIMP_CONTEXT_PROP_BRUSH,
GIMP_CONTEXT_PROP_PATTERN,
GIMP_CONTEXT_PROP_GRADIENT,
GIMP_CONTEXT_PROP_PALETTE,
GIMP_CONTEXT_PROP_BUFFER,
GIMP_CONTEXT_NUM_PROPS
} GimpContextPropType;
typedef enum
{
......@@ -59,20 +59,20 @@ typedef enum
GIMP_CONTEXT_BUFFER_MASK = 1 << 11,
/* aliases */
GIMP_CONTEXT_PAINT_ARGS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_BRUSH_MASK |
GIMP_CONTEXT_PATTERN_MASK |
GIMP_CONTEXT_GRADIENT_MASK),
GIMP_CONTEXT_ALL_ARGS_MASK = (GIMP_CONTEXT_IMAGE_MASK |
GIMP_CONTEXT_DISPLAY_MASK |
GIMP_CONTEXT_TOOL_MASK |
GIMP_CONTEXT_PALETTE_MASK |
GIMP_CONTEXT_BUFFER_MASK |
GIMP_CONTEXT_PAINT_ARGS_MASK)
} GimpContextArgMask;
GIMP_CONTEXT_PAINT_PROPS_MASK = (GIMP_CONTEXT_FOREGROUND_MASK |
GIMP_CONTEXT_BACKGROUND_MASK |
GIMP_CONTEXT_OPACITY_MASK |
GIMP_CONTEXT_PAINT_MODE_MASK |
GIMP_CONTEXT_BRUSH_MASK |
GIMP_CONTEXT_PATTERN_MASK |
GIMP_CONTEXT_GRADIENT_MASK),
GIMP_CONTEXT_ALL_PROPS_MASK = (GIMP_CONTEXT_IMAGE_MASK |
GIMP_CONTEXT_DISPLAY_MASK |
GIMP_CONTEXT_TOOL_MASK |
GIMP_CONTEXT_PALETTE_MASK |
GIMP_CONTEXT_BUFFER_MASK |
GIMP_CONTEXT_PAINT_PROPS_MASK)
} GimpContextPropMask;
#define GIMP_TYPE_CONTEXT (gimp_context_get_type ())
......@@ -93,7 +93,7 @@ struct _GimpContext
GimpContext *parent;
guint32 defined_args;
guint32 defined_props;
GimpImage *image;
GDisplay *display;
......@@ -170,35 +170,35 @@ void gimp_context_set_parent (GimpContext *context,
GimpContext *parent);
void gimp_context_unset_parent (GimpContext *context);
/* define / undefinine context arguments
/* define / undefinine context properties
*
* the value of an undefined argument will be taken from the parent context.
* the value of an undefined property will be taken from the parent context.
*/
void gimp_context_define_arg (GimpContext *context,
GimpContextArgType arg,
gboolean defined);
void gimp_context_define_property (GimpContext *context,
GimpContextPropType prop,
gboolean defined);
gboolean gimp_context_arg_defined (GimpContext *context,
GimpContextArgType arg);
gboolean gimp_context_property_defined (GimpContext *context,
GimpContextPropType prop);
void gimp_context_define_args (GimpContext *context,
GimpContextArgMask args_mask,
gboolean defined);
void gimp_context_define_properties (GimpContext *context,
GimpContextPropMask props_mask,
gboolean defined);
/* copying context arguments
/* copying context properties
*/
void gimp_context_copy_arg (GimpContext *src,
GimpContext *dest,
GimpContextArgType arg);
void gimp_context_copy_property (GimpContext *src,
GimpContext *dest,
GimpContextPropType prop);
void gimp_context_copy_args (GimpContext *src,
GimpContext *dest,
GimpContextArgMask args_mask);
void gimp_context_copy_properties (GimpContext *src,
GimpContext *dest,
GimpContextPropMask props_mask);
/* manipulate by GType */
GimpContextArgType gimp_context_type_to_arg (GType type);
const gchar * gimp_context_type_to_signal_name (GType type);
GimpContextPropType gimp_context_type_to_property (GType type);
const gchar * gimp_context_type_to_signal_name (GType type);
GimpObject * gimp_context_get_by_type (GimpContext *context,
GType type);
......
......@@ -68,7 +68,10 @@
/* Local function declarations */
static void gimp_image_class_init (GimpImageClass *klass);
static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_dispose (GObject *object);
static void gimp_image_finalize (GObject *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);
......@@ -215,13 +218,13 @@ gimp_image_get_type (void)
static void
gimp_image_class_init (GimpImageClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
GimpViewableClass *viewable_class;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -350,7 +353,8 @@ gimp_image_class_init (GimpImageClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
object_class->destroy = gimp_image_destroy;
object_class->dispose = gimp_image_dispose;
object_class->finalize = gimp_image_finalize;
gimp_object_class->name_changed = gimp_image_name_changed;
......@@ -442,7 +446,6 @@ gimp_image_init (GimpImage *gimage)
gimage->undo_levels = 0;
gimage->group_count = 0;
gimage->pushing_undo_group = UNDO_NULL;
gimage->undo_history = NULL;
gimage->new_undo_stack = gimp_undo_stack_new (gimage);
gimage->new_redo_stack = gimp_undo_stack_new (gimage);
......@@ -452,7 +455,19 @@ gimp_image_init (GimpImage *gimage)
}
static void
gimp_image_destroy (GtkObject *object)
gimp_image_dispose (GObject *object)
{
GimpImage *gimage;
gimage = GIMP_IMAGE (object);
undo_free (gimage);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_image_finalize (GObject *object)
{
GimpImage *gimage;
......@@ -518,8 +533,6 @@ gimp_image_destroy (GtkObject *object)
gimage->guides = NULL;
}
undo_free (gimage);
if (gimage->new_undo_stack)
{
g_object_unref (G_OBJECT (gimage->new_undo_stack));
......@@ -531,8 +544,7 @@ gimp_image_destroy (GtkObject *object)
gimage->new_redo_stack = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
......
......@@ -122,7 +122,6 @@ struct _GimpImage
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
......
......@@ -68,7 +68,10 @@
/* Local function declarations */
static void gimp_image_class_init (GimpImageClass *klass);
static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_dispose (GObject *object);
static void gimp_image_finalize (GObject *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);
......@@ -215,13 +218,13 @@ gimp_image_get_type (void)
static void
gimp_image_class_init (GimpImageClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
GimpViewableClass *viewable_class;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -350,7 +353,8 @@ gimp_image_class_init (GimpImageClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
object_class->destroy = gimp_image_destroy;
object_class->dispose = gimp_image_dispose;
object_class->finalize = gimp_image_finalize;
gimp_object_class->name_changed = gimp_image_name_changed;
......@@ -442,7 +446,6 @@ gimp_image_init (GimpImage *gimage)
gimage->undo_levels = 0;
gimage->group_count = 0;
gimage->pushing_undo_group = UNDO_NULL;
gimage->undo_history = NULL;
gimage->new_undo_stack = gimp_undo_stack_new (gimage);
gimage->new_redo_stack = gimp_undo_stack_new (gimage);
......@@ -452,7 +455,19 @@ gimp_image_init (GimpImage *gimage)
}
static void
gimp_image_destroy (GtkObject *object)
gimp_image_dispose (GObject *object)
{
GimpImage *gimage;
gimage = GIMP_IMAGE (object);
undo_free (gimage);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_image_finalize (GObject *object)
{
GimpImage *gimage;
......@@ -518,8 +533,6 @@ gimp_image_destroy (GtkObject *object)
gimage->guides = NULL;
}
undo_free (gimage);
if (gimage->new_undo_stack)
{
g_object_unref (G_OBJECT (gimage->new_undo_stack));
......@@ -531,8 +544,7 @@ gimp_image_destroy (GtkObject *object)
gimage->new_redo_stack = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
......
......@@ -122,7 +122,6 @@ struct _GimpImage
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
......
......@@ -68,7 +68,10 @@
/* Local function declarations */
static void gimp_image_class_init (GimpImageClass *klass);
static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_dispose (GObject *object);
static void gimp_image_finalize (GObject *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);
......@@ -215,13 +218,13 @@ gimp_image_get_type (void)
static void
gimp_image_class_init (GimpImageClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
GimpViewableClass *viewable_class;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -350,7 +353,8 @@ gimp_image_class_init (GimpImageClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
object_class->destroy = gimp_image_destroy;
object_class->dispose = gimp_image_dispose;
object_class->finalize = gimp_image_finalize;
gimp_object_class->name_changed = gimp_image_name_changed;
......@@ -442,7 +446,6 @@ gimp_image_init (GimpImage *gimage)
gimage->undo_levels = 0;
gimage->group_count = 0;
gimage->pushing_undo_group = UNDO_NULL;
gimage->undo_history = NULL;
gimage->new_undo_stack = gimp_undo_stack_new (gimage);
gimage->new_redo_stack = gimp_undo_stack_new (gimage);
......@@ -452,7 +455,19 @@ gimp_image_init (GimpImage *gimage)
}
static void
gimp_image_destroy (GtkObject *object)
gimp_image_dispose (GObject *object)
{
GimpImage *gimage;
gimage = GIMP_IMAGE (object);
undo_free (gimage);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_image_finalize (GObject *object)
{
GimpImage *gimage;
......@@ -518,8 +533,6 @@ gimp_image_destroy (GtkObject *object)
gimage->guides = NULL;
}
undo_free (gimage);
if (gimage->new_undo_stack)
{
g_object_unref (G_OBJECT (gimage->new_undo_stack));
......@@ -531,8 +544,7 @@ gimp_image_destroy (GtkObject *object)
gimage->new_redo_stack = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
......
......@@ -122,7 +122,6 @@ struct _GimpImage
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
......
......@@ -68,7 +68,10 @@
/* Local function declarations */
static void gimp_image_class_init (GimpImageClass *klass);
static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_dispose (GObject *object);
static void gimp_image_finalize (GObject *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);
......@@ -215,13 +218,13 @@ gimp_image_get_type (void)
static void
gimp_image_class_init (GimpImageClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
GimpViewableClass *viewable_class;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -350,7 +353,8 @@ gimp_image_class_init (GimpImageClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
object_class->destroy = gimp_image_destroy;
object_class->dispose = gimp_image_dispose;
object_class->finalize = gimp_image_finalize;
gimp_object_class->name_changed = gimp_image_name_changed;
......@@ -442,7 +446,6 @@ gimp_image_init (GimpImage *gimage)
gimage->undo_levels = 0;
gimage->group_count = 0;
gimage->pushing_undo_group = UNDO_NULL;
gimage->undo_history = NULL;
gimage->new_undo_stack = gimp_undo_stack_new (gimage);
gimage->new_redo_stack = gimp_undo_stack_new (gimage);
......@@ -452,7 +455,19 @@ gimp_image_init (GimpImage *gimage)
}
static void
gimp_image_destroy (GtkObject *object)
gimp_image_dispose (GObject *object)
{
GimpImage *gimage;
gimage = GIMP_IMAGE (object);
undo_free (gimage);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_image_finalize (GObject *object)
{
GimpImage *gimage;
......@@ -518,8 +533,6 @@ gimp_image_destroy (GtkObject *object)
gimage->guides = NULL;
}
undo_free (gimage);
if (gimage->new_undo_stack)
{
g_object_unref (G_OBJECT (gimage->new_undo_stack));
......@@ -531,8 +544,7 @@ gimp_image_destroy (GtkObject *object)
gimage->new_redo_stack = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
......
......@@ -122,7 +122,6 @@ struct _GimpImage
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
GtkWidget *undo_history; /* history viewer, or NULL */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
......
......@@ -68,7 +68,10 @@
/* Local function declarations */
static void gimp_image_class_init (GimpImageClass *klass);
static void gimp_image_init (GimpImage *gimage);
static void gimp_image_destroy (GtkObject *object);
static void gimp_image_dispose (GObject *object);
static void gimp_image_finalize (GObject *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);
......@@ -215,13 +218,13 @@ gimp_image_get_type (void)
static void
gimp_image_class_init (GimpImageClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
GimpViewableClass *viewable_class;
object_class = (GtkObjectClass *) klass;
gimp_object_class = (GimpObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -350,7 +353,8 @@ gimp_image_class_init (GimpImageClass *klass)
G_TYPE_NONE, 1,
G_TYPE_INT);
object_class->destroy = gimp_image_destroy;
object_class->dispose = gimp_image_dispose;
object_class->finalize = gimp_image_finalize;
gimp_object_class->name_changed = gimp_image_name_changed;
......@@ -442,7 +446,6 @@ gimp_image_init (GimpImage *gimage)
gimage->undo_levels = 0;
gimage->group_count = 0;
gimage->pushing_undo_group = UNDO_NULL;
gimage->undo_history = NULL;
gimage->new_undo_stack = gimp_undo_stack_new (gimage);
gimage->new_redo_stack = gimp_undo_stack_new (gimage);
......@@ -452,7 +455,19 @@ gimp_image_init (GimpImage *gimage)
}
static void
gimp_image_destroy (GtkObject *object)
gimp_image_dispose (GObject *object)
{
GimpImage *gimage;
gimage = GIMP_IMAGE (object);
undo_free (gimage);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
gimp_image_finalize (GObject *object)
{
GimpImage *gimage;
......@@ -518,8 +533,6 @@ gimp_image_destroy (GtkObject *object)
gimage->guides = NULL;
}
undo_free (gimage);
if (gimage->new_undo_stack)
{
g_object_unref (G_OBJECT (gimage->new_undo_stack));
......@@ -531,8 +544,7 @@ gimp_image_destroy (GtkObject *object)