Commit c3448b2c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

It makes more sense to have GimpData::dirty indicate a name change than to

2006-05-23  Sven Neumann  <sven@gimp.org>

	It makes more sense to have GimpData::dirty indicate a name change
	than to invalidate the previews whenever the name changes.

	* app/core/gimpdata.c: call gimp_object_name_changed() from
	gimp_data_real_dirty() instead of implementing
	GimpObject::name-changed and calling gimp_data_dirty() from there.

	* app/core/gimpbrushclipboard.c
	* app/core/gimppalette.c
	* app/core/gimppatternclipboard.c: call gimp_data_dirty() in place
	of gimp_object_name_changed().

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_dirty):
	chain up unconditionally.
parent bb342e89
2006-05-23 Sven Neumann <sven@gimp.org>
It makes more sense to have GimpData::dirty indicate a name change
than to invalidate the previews whenever the name changes.
* app/core/gimpdata.c: call gimp_object_name_changed() from
gimp_data_real_dirty() instead of implementing
GimpObject::name-changed and calling gimp_data_dirty() from there.
* app/core/gimpbrushclipboard.c
* app/core/gimppalette.c
* app/core/gimppatternclipboard.c: call gimp_data_dirty() in place
of gimp_object_name_changed().
* app/core/gimpbrushgenerated.c (gimp_brush_generated_dirty):
chain up unconditionally.
2006-05-23 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/drawable_transform.pdb
......
......@@ -285,6 +285,5 @@ gimp_brush_clipboard_buffer_changed (Gimp *gimp,
brush->y_axis.x = 0;
brush->y_axis.y = height / 2;
/* emit "name-changed" so the description is updated (emits "dirty" too) */
gimp_object_name_changed (GIMP_OBJECT (brush));
gimp_data_dirty (GIMP_DATA (brush));
}
......@@ -497,8 +497,7 @@ gimp_brush_generated_dirty (GimpData *data)
g_free (lookup);
if (GIMP_DATA_CLASS (parent_class)->dirty)
GIMP_DATA_CLASS (parent_class)->dirty (data);
GIMP_DATA_CLASS (parent_class)->dirty (data);
}
GimpData *
......
......@@ -497,8 +497,7 @@ gimp_brush_generated_dirty (GimpData *data)
g_free (lookup);
if (GIMP_DATA_CLASS (parent_class)->dirty)
GIMP_DATA_CLASS (parent_class)->dirty (data);
GIMP_DATA_CLASS (parent_class)->dirty (data);
}
GimpData *
......
......@@ -497,8 +497,7 @@ gimp_brush_generated_dirty (GimpData *data)
g_free (lookup);
if (GIMP_DATA_CLASS (parent_class)->dirty)
GIMP_DATA_CLASS (parent_class)->dirty (data);
GIMP_DATA_CLASS (parent_class)->dirty (data);
}
GimpData *
......
......@@ -79,7 +79,6 @@ static void gimp_data_get_property (GObject *object,
GValue *value,
GParamSpec *pspec);
static void gimp_data_name_changed (GimpObject *object);
static gint64 gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size);
......@@ -141,7 +140,6 @@ gimp_data_class_init (GimpDataClass *klass)
object_class->set_property = gimp_data_set_property;
object_class->get_property = gimp_data_get_property;
gimp_object_class->name_changed = gimp_data_name_changed;
gimp_object_class->get_memsize = gimp_data_get_memsize;
klass->dirty = gimp_data_real_dirty;
......@@ -292,15 +290,6 @@ gimp_data_constructor (GType type,
return object;
}
static void
gimp_data_name_changed (GimpObject *object)
{
if (GIMP_OBJECT_CLASS (parent_class)->name_changed)
GIMP_OBJECT_CLASS (parent_class)->name_changed (object);
gimp_data_dirty (GIMP_DATA (object));
}
static gint64
gimp_data_get_memsize (GimpObject *object,
gint64 *gui_size)
......@@ -321,6 +310,8 @@ gimp_data_real_dirty (GimpData *data)
data->dirty = TRUE;
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (data));
gimp_object_name_changed (GIMP_OBJECT (data));
}
/**
......
......@@ -611,8 +611,7 @@ gimp_palette_add_entry (GimpPalette *palette,
palette->n_colors += 1;
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
return entry;
}
......@@ -645,8 +644,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
entry->position = pos++;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
}
}
......
......@@ -611,8 +611,7 @@ gimp_palette_add_entry (GimpPalette *palette,
palette->n_colors += 1;
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
return entry;
}
......@@ -645,8 +644,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
entry->position = pos++;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
}
}
......
......@@ -611,8 +611,7 @@ gimp_palette_add_entry (GimpPalette *palette,
palette->n_colors += 1;
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
return entry;
}
......@@ -645,8 +644,7 @@ gimp_palette_delete_entry (GimpPalette *palette,
entry->position = pos++;
}
/* will make the palette dirty too */
gimp_object_name_changed (GIMP_OBJECT (palette));
gimp_data_dirty (GIMP_DATA (palette));
}
}
......
......@@ -224,6 +224,5 @@ gimp_pattern_clipboard_buffer_changed (Gimp *gimp,
pattern->mask = temp_buf_new (16, 16, 3, 0, 0, color);
}
/* emit "name-changed" so the description is updated (emits "dirty" too) */
gimp_object_name_changed (GIMP_OBJECT (pattern));
gimp_data_dirty (GIMP_DATA (pattern));
}
Markdown is supported
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