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

app/vectors/gimpstroke.c use the GIMP_TYPE_FOO macros instead of

2004-01-18  Michael Natterer  <mitch@gimp.org>

	* app/vectors/gimpstroke.c
	* app/xcf/xcf-load.c: use the GIMP_TYPE_FOO macros instead of
	gimp_foo_get_type(). Minor cleanups.
parent d528848f
2004-01-18 Michael Natterer <mitch@gimp.org>
* app/vectors/gimpstroke.c
* app/xcf/xcf-load.c: use the GIMP_TYPE_FOO macros instead of
gimp_foo_get_type(). Minor cleanups.
2004-01-18 Michael Natterer <mitch@gimp.org>
 
* app/core/gimpimage.c (gimp_image_add_layer,remove_layer): in the
......@@ -247,7 +247,7 @@ gimp_stroke_class_init (GimpStrokeClass *klass)
anchor_param_spec = g_param_spec_boxed ("gimp-anchor",
"Gimp Anchor",
"The control points of a Stroke",
gimp_anchor_get_type (),
GIMP_TYPE_ANCHOR,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY);
......@@ -291,13 +291,11 @@ gimp_stroke_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
GimpStroke *stroke;
GimpStroke *stroke = GIMP_STROKE (object);
GValueArray *val_array;
GValue *item;
gint i;
stroke = GIMP_STROKE (object);
switch (property_id)
{
case PROP_CLOSED:
......@@ -312,11 +310,11 @@ gimp_stroke_set_property (GObject *object,
if (val_array == NULL)
return;
for (i=0; i < val_array->n_values; i++)
for (i = 0; i < val_array->n_values; i++)
{
item = g_value_array_get_nth (val_array, i);
g_return_if_fail (G_VALUE_HOLDS (item, gimp_anchor_get_type ()));
g_return_if_fail (G_VALUE_HOLDS (item, GIMP_TYPE_ANCHOR));
stroke->anchors = g_list_append (stroke->anchors,
g_value_dup_boxed (item));
}
......@@ -334,9 +332,7 @@ gimp_stroke_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
GimpStroke *stroke;
stroke = GIMP_STROKE (object);
GimpStroke *stroke = GIMP_STROKE (object);
switch (property_id)
{
......@@ -368,11 +364,9 @@ static gint64
gimp_stroke_get_memsize (GimpObject *object,
gint64 *gui_size)
{
GimpStroke *stroke;
GimpStroke *stroke = GIMP_STROKE (object);
gint64 memsize = 0;
stroke = GIMP_STROKE (object);
memsize += gimp_g_list_get_memsize (stroke->anchors, sizeof (GimpAnchor));
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
......@@ -916,7 +910,7 @@ gimp_stroke_duplicate (const GimpStroke *stroke)
{
g_return_val_if_fail (GIMP_IS_STROKE (stroke), NULL);
return (GIMP_STROKE_GET_CLASS (stroke))->duplicate (stroke);
return GIMP_STROKE_GET_CLASS (stroke)->duplicate (stroke);
}
GimpStroke *
......@@ -1196,4 +1190,3 @@ gimp_stroke_real_control_points_get (const GimpStroke *stroke,
return ret_array;
}
......@@ -936,12 +936,7 @@ xcf_load_channel (XcfInfo *info,
/* attach the floating selection... */
if (add_floating_sel)
{
GimpLayer *floating_sel;
floating_sel = info->floating_sel;
floating_sel_attach (floating_sel, GIMP_DRAWABLE (channel));
}
floating_sel_attach (info->floating_sel, GIMP_DRAWABLE (channel));
if (is_qmask)
gimage->qmask_state = TRUE;
......@@ -998,12 +993,7 @@ xcf_load_layer_mask (XcfInfo *info,
/* attach the floating selection... */
if (add_floating_sel)
{
GimpLayer *floating_sel;
floating_sel = info->floating_sel;
floating_sel_attach (floating_sel, GIMP_DRAWABLE (layer_mask));
}
floating_sel_attach (info->floating_sel, GIMP_DRAWABLE (layer_mask));
return layer_mask;
......@@ -1605,7 +1595,7 @@ xcf_load_vector (XcfInfo *info,
switch (stroke_type_id)
{
case XCF_STROKETYPE_BEZIER_STROKE:
stroke_type = gimp_bezier_stroke_get_type ();
stroke_type = GIMP_TYPE_BEZIER_STROKE;
break;
default:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment