Commit 357f463d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added a TODO entry about additional image/file info.

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

	* TODO.xml: added a TODO entry about additional image/file info.

	* app/file-save.c: #include "core/gimpdocuments.h"

	* app/core/gimpcontainer.[ch]: made virtual functions out of some
	signals.

	* app/core/*.[ch]: more GObject stuff: ported all
	gimp_foo_get_type() functions and replaced almost all "destroy"
	implementations with either "finalize" or "dispose" functions.
parent fec97c49
2001-08-11 Michael Natterer <mitch@gimp.org>
* TODO.xml: added a TODO entry about additional image/file info.
* app/file-save.c: #include "core/gimpdocuments.h"
* app/core/gimpcontainer.[ch]: made virtual functions out of some
signals.
* app/core/*.[ch]: more GObject stuff: ported all
gimp_foo_get_type() functions and replaced almost all "destroy"
implementations with either "finalize" or "dispose" functions.
2001-08-11 Seth Burgess <sjburges@gimp.org>
* plug-ins/common/colortoalpha.c: set nparams != 4 for
......@@ -30,8 +43,13 @@
* app/widgets/gimpdnd.[ch]: make it DND-able.
<<<<<<< ChangeLog
* app/widgets/gimppreview.c: fix preview rendering correctly this
time.
=======
* app/widgets/gimppreview.c: fix preview rendering correctly this
time.
>>>>>>> 1.3709
2001-08-10 Sven Neumann <sven@gimp.org>
......
......@@ -88,6 +88,24 @@
</contact>
</entry>
<entry size="small" difficulty="easy" status="0%" target="1.4">
<title>Image/File Information</title>
<description>
<p>
Additionally to the image comment, GIMP should save & manage
File Information like "description", "keywords",
"copyright", "year", etc.
</p>
<p>
File Info data sets should be saveable separately and
importable from standard formats.
</p>
</description>
<contact>
GIMP Developer List &lt;gimp-developer@xcf.berkeley.edu&gt;
</contact>
</entry>
</section> <!-- General -->
<section>
......
......@@ -67,26 +67,29 @@ static void gimp_context_destroy_callback (GimpContext *context,
static GimpObjectClass *parent_class = NULL;
GtkType
GType
gimp_get_type (void)
{
static GtkType object_type = 0;
static GType object_type = 0;
if (! object_type)
{
GtkTypeInfo object_info =
static const GTypeInfo object_info =
{
"Gimp",
sizeof (Gimp),
sizeof (GimpClass),
(GtkClassInitFunc) gimp_class_init,
(GtkObjectInitFunc) gimp_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (Gimp),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_init,
};
object_type = gtk_type_unique (GIMP_TYPE_OBJECT, &object_info);
object_type = g_type_register_static (GIMP_TYPE_OBJECT,
"Gimp",
&object_info, 0);
}
return object_type;
......@@ -170,10 +173,14 @@ gimp_destroy (GtkObject *object)
gimp = GIMP (object);
gimp_set_current_context (gimp, NULL);
if (gimp->current_context)
gimp_set_current_context (gimp, NULL);
if (gimp->user_context)
gimp_set_user_context (gimp, NULL);
gimp_set_user_context (gimp, NULL);
gimp_set_default_context (gimp, NULL);
if (gimp->default_context)
gimp_set_default_context (gimp, NULL);
if (gimp->standard_context)
{
......@@ -181,9 +188,11 @@ gimp_destroy (GtkObject *object)
gimp->standard_context = NULL;
}
gimp_image_new_exit (gimp);
if (gimp->image_base_type_names)
gimp_image_new_exit (gimp);
gimp_documents_exit (gimp);
if (gimp->documents)
gimp_documents_exit (gimp);
if (gimp->tool_info_list)
{
......@@ -191,7 +200,8 @@ gimp_destroy (GtkObject *object)
gimp->tool_info_list = NULL;
}
procedural_db_free (gimp);
if (gimp->procedural_ht)
procedural_db_free (gimp);
if (gimp->brush_factory)
{
......@@ -251,9 +261,11 @@ gimp_destroy (GtkObject *object)
gimp->images = NULL;
}
gimp_parasites_exit (gimp);
if (gimp->parasites)
gimp_parasites_exit (gimp);
gimp_units_exit (gimp);
if (gimp->user_units)
gimp_units_exit (gimp);
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
......
......@@ -107,7 +107,8 @@ struct _GimpClass
};
GtkType gimp_get_type (void);
GType gimp_get_type (void);
Gimp * gimp_new (void);
void gimp_initialize (Gimp *gimp);
......
......@@ -67,7 +67,9 @@ enum
static void gimp_brush_class_init (GimpBrushClass *klass);
static void gimp_brush_init (GimpBrush *brush);
static void gimp_brush_destroy (GtkObject *object);
static void gimp_brush_finalize (GObject *object);
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint width,
gint height);
......@@ -85,37 +87,41 @@ static GimpDataClass *parent_class = NULL;
GType
gimp_brush_get_type (void)
{
static GType type = 0;
static GType brush_type = 0;
if (! type)
if (! brush_type)
{
static const GtkTypeInfo info =
static const GTypeInfo brush_info =
{
"GimpBrush",
sizeof (GimpBrush),
sizeof (GimpBrushClass),
(GtkClassInitFunc) gimp_brush_class_init,
(GtkObjectInitFunc) gimp_brush_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_brush_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpBrush),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_brush_init,
};
type = gtk_type_unique (GIMP_TYPE_DATA, &info);
brush_type = g_type_register_static (GIMP_TYPE_DATA,
"GimpBrush",
&brush_info, 0);
}
return type;
return brush_type;
}
static void
gimp_brush_class_init (GimpBrushClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpViewableClass *viewable_class;
GimpDataClass *data_class;
object_class = (GtkObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
data_class = (GimpDataClass *) klass;
object_class = G_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
data_class = GIMP_DATA_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -128,7 +134,7 @@ gimp_brush_class_init (GimpBrushClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->destroy = gimp_brush_destroy;
object_class->finalize = gimp_brush_finalize;
viewable_class->get_new_preview = gimp_brush_get_new_preview;
......@@ -141,31 +147,36 @@ gimp_brush_class_init (GimpBrushClass *klass)
static void
gimp_brush_init (GimpBrush *brush)
{
brush->mask = NULL;
brush->pixmap = NULL;
brush->spacing = 20;
brush->x_axis.x = 15.0;
brush->x_axis.y = 0.0;
brush->y_axis.x = 0.0;
brush->y_axis.y = 15.0;
brush->mask = NULL;
brush->pixmap = NULL;
brush->spacing = 20;
brush->x_axis.x = 15.0;
brush->x_axis.y = 0.0;
brush->y_axis.x = 0.0;
brush->y_axis.y = 15.0;
}
static void
gimp_brush_destroy (GtkObject *object)
gimp_brush_finalize (GObject *object)
{
GimpBrush *brush;
brush = GIMP_BRUSH (object);
if (brush->mask)
temp_buf_free (brush->mask);
{
temp_buf_free (brush->mask);
brush->mask = NULL;
}
if (brush->pixmap)
temp_buf_free (brush->pixmap);
{
temp_buf_free (brush->pixmap);
brush->pixmap = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static TempBuf *
......
......@@ -67,7 +67,9 @@ enum
static void gimp_brush_class_init (GimpBrushClass *klass);
static void gimp_brush_init (GimpBrush *brush);
static void gimp_brush_destroy (GtkObject *object);
static void gimp_brush_finalize (GObject *object);
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
gint width,
gint height);
......@@ -85,37 +87,41 @@ static GimpDataClass *parent_class = NULL;
GType
gimp_brush_get_type (void)
{
static GType type = 0;
static GType brush_type = 0;
if (! type)
if (! brush_type)
{
static const GtkTypeInfo info =
static const GTypeInfo brush_info =
{
"GimpBrush",
sizeof (GimpBrush),
sizeof (GimpBrushClass),
(GtkClassInitFunc) gimp_brush_class_init,
(GtkObjectInitFunc) gimp_brush_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_brush_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpBrush),
0, /* n_preallocs */
(GInstanceInitFunc) gimp_brush_init,
};
type = gtk_type_unique (GIMP_TYPE_DATA, &info);
brush_type = g_type_register_static (GIMP_TYPE_DATA,
"GimpBrush",
&brush_info, 0);
}
return type;
return brush_type;
}
static void
gimp_brush_class_init (GimpBrushClass *klass)
{
GtkObjectClass *object_class;
GObjectClass *object_class;
GimpViewableClass *viewable_class;
GimpDataClass *data_class;
object_class = (GtkObjectClass *) klass;
viewable_class = (GimpViewableClass *) klass;
data_class = (GimpDataClass *) klass;
object_class = G_OBJECT_CLASS (klass);
viewable_class = GIMP_VIEWABLE_CLASS (klass);
data_class = GIMP_DATA_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -128,7 +134,7 @@ gimp_brush_class_init (GimpBrushClass *klass)
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->destroy = gimp_brush_destroy;
object_class->finalize = gimp_brush_finalize;
viewable_class->get_new_preview = gimp_brush_get_new_preview;
......@@ -141,31 +147,36 @@ gimp_brush_class_init (GimpBrushClass *klass)
static void
gimp_brush_init (GimpBrush *brush)
{
brush->mask = NULL;
brush->pixmap = NULL;
brush->spacing = 20;
brush->x_axis.x = 15.0;
brush->x_axis.y = 0.0;
brush->y_axis.x = 0.0;
brush->y_axis.y = 15.0;
brush->mask = NULL;
brush->pixmap = NULL;
brush->spacing = 20;
brush->x_axis.x = 15.0;
brush->x_axis.y = 0.0;
brush->y_axis.x = 0.0;
brush->y_axis.y = 15.0;
}
static void
gimp_brush_destroy (GtkObject *object)
gimp_brush_finalize (GObject *object)
{
GimpBrush *brush;
brush = GIMP_BRUSH (object);
if (brush->mask)
temp_buf_free (brush->mask);
{
temp_buf_free (brush->mask);
brush->mask = NULL;
}
if (brush->pixmap)
temp_buf_free (brush->pixmap);
{
temp_buf_free (brush->pixmap);
brush->pixmap = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static TempBuf *
......
......@@ -50,7 +50,6 @@
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
static void gimp_brush_generated_destroy (GtkObject *object);
static gboolean gimp_brush_generated_save (GimpData *data);
static void gimp_brush_generated_dirty (GimpData *data);
static gchar * gimp_brush_generated_get_extension (GimpData *data);
......@@ -60,44 +59,43 @@ static GimpData * gimp_brush_generated_duplicate (GimpData *data);
static GimpBrushClass *parent_class = NULL;
GtkType
GType
gimp_brush_generated_get_type (void)
{
static GtkType type = 0;
static GType brush_type = 0;
if (!type)
if (! brush_type)
{
GtkTypeInfo info =
static const GTypeInfo brush_info =
{
"GimpBrushGenerated",
sizeof (GimpBrushGeneratedClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_brush_generated_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpBrushGenerated),
sizeof (GimpBrushGeneratedClass),
(GtkClassInitFunc) gimp_brush_generated_class_init,
(GtkObjectInitFunc) gimp_brush_generated_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL
0, /* n_preallocs */
(GInstanceInitFunc) gimp_brush_generated_init,
};
type = gtk_type_unique (GIMP_TYPE_BRUSH, &info);
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
"GimpBrushGenerated",
&brush_info, 0);
}
return type;
return brush_type;
}
static void
gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
{
GtkObjectClass *object_class;
GimpDataClass *data_class;
GimpDataClass *data_class;
object_class = (GtkObjectClass *) klass;
data_class = (GimpDataClass *) klass;
data_class = GIMP_DATA_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->destroy = gimp_brush_generated_destroy;
data_class->save = gimp_brush_generated_save;
data_class->dirty = gimp_brush_generated_dirty;
data_class->get_extension = gimp_brush_generated_get_extension;
......@@ -114,13 +112,6 @@ gimp_brush_generated_init (GimpBrushGenerated *brush)
brush->freeze = 0;
}
static void
gimp_brush_generated_destroy (GtkObject *object)
{
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static gboolean
gimp_brush_generated_save (GimpData *data)
{
......
......@@ -50,7 +50,6 @@
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
static void gimp_brush_generated_destroy (GtkObject *object);
static gboolean gimp_brush_generated_save (GimpData *data);
static void gimp_brush_generated_dirty (GimpData *data);
static gchar * gimp_brush_generated_get_extension (GimpData *data);
......@@ -60,44 +59,43 @@ static GimpData * gimp_brush_generated_duplicate (GimpData *data);
static GimpBrushClass *parent_class = NULL;
GtkType
GType
gimp_brush_generated_get_type (void)
{
static GtkType type = 0;
static GType brush_type = 0;
if (!type)
if (! brush_type)
{
GtkTypeInfo info =
static const GTypeInfo brush_info =
{
"GimpBrushGenerated",
sizeof (GimpBrushGeneratedClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_brush_generated_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpBrushGenerated),
sizeof (GimpBrushGeneratedClass),
(GtkClassInitFunc) gimp_brush_generated_class_init,
(GtkObjectInitFunc) gimp_brush_generated_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL
0, /* n_preallocs */
(GInstanceInitFunc) gimp_brush_generated_init,
};
type = gtk_type_unique (GIMP_TYPE_BRUSH, &info);
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,
"GimpBrushGenerated",
&brush_info, 0);
}
return type;
return brush_type;
}
static void
gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass)
{
GtkObjectClass *object_class;
GimpDataClass *data_class;
GimpDataClass *data_class;
object_class = (GtkObjectClass *) klass;
data_class = (GimpDataClass *) klass;
data_class = GIMP_DATA_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->destroy = gimp_brush_generated_destroy;
data_class->save = gimp_brush_generated_save;
data_class->dirty = gimp_brush_generated_dirty;
data_class->get_extension = gimp_brush_generated_get_extension;
......@@ -114,13 +112,6 @@ gimp_brush_generated_init (GimpBrushGenerated *brush)
brush->freeze = 0;
}
static void
gimp_brush_generated_destroy (GtkObject *object)
{
if (GTK_OBJECT_CLASS (parent_class)->destroy)
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
static gboolean
gimp_brush_generated_save (GimpData *data)
{
......
......@@ -50,7 +50,6 @@
static void gimp_brush_generated_class_init (GimpBrushGeneratedClass *klass);
static void gimp_brush_generated_init (GimpBrushGenerated *brush);
static void gimp_brush_generated_destroy (GtkObject *object);
static gboolean gimp_brush_generated_save (GimpData *data);
static void gimp_brush_generated_dirty (GimpData *data);
static gchar * gimp_brush_generated_get_extension (GimpData *data);
......@@ -60,44 +59,43 @@ static GimpData * gimp_brush_generated_duplicate (GimpData *data);
static GimpBrushClass *parent_class = NULL;
GtkType
GType
gimp_brush_generated_get_type (void)
{
static GtkType type = 0;
static GType brush_type = 0;
if (!type)
if (! brush_type)
{
GtkTypeInfo info =
static const GTypeInfo brush_info =
{
"GimpBrushGenerated",
sizeof (GimpBrushGeneratedClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) gimp_brush_generated_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GimpBrushGenerated),
sizeof (GimpBrushGeneratedClass),
(GtkClassInitFunc) gimp_brush_generated_class_init,
(GtkObjectInitFunc) gimp_brush_generated_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL
0, /* n_preallocs */
(GInstanceInitFunc) gimp_brush_generated_init,
};
type = gtk_type_unique (GIMP_TYPE_BRUSH, &info);
brush_type = g_type_register_static (GIMP_TYPE_BRUSH,