Give unnamed items proper names

Use the item class' default name unstead of "Unnamed" so they
will be called "Layer", "Channel" and "Path".
This commit is contained in:
Michael Natterer 2010-02-07 19:22:02 +01:00
parent 5de2482526
commit 3514271fde
1 changed files with 3 additions and 2 deletions

View File

@ -661,10 +661,11 @@ gimp_item_configure (GimpItem *item,
gimp_item_set_offset (item, offset_x, offset_y);
if (name)
if (name && strlen (name))
gimp_object_set_name (GIMP_OBJECT (item), name);
else
gimp_object_set_static_name (GIMP_OBJECT (item), _("Unnamed"));
gimp_object_set_static_name (GIMP_OBJECT (item),
GIMP_ITEM_GET_CLASS (item)->default_name);
g_object_thaw_notify (G_OBJECT (item));
}