use gimp_data_list_data_compare_func(), not just strcmp(), so the ordering

2003-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdatalist.c (gimp_data_list_uniquefy_data_name): use
	gimp_data_list_data_compare_func(), not just strcmp(), so the
	ordering of internal items is correct.
This commit is contained in:
Michael Natterer
2003-03-09 17:40:56 +00:00
committed by Michael Natterer
parent 2a5e3b42f6
commit 3b02cb2e36
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2003-03-09 Michael Natterer <mitch@gimp.org>
* app/core/gimpdatalist.c (gimp_data_list_uniquefy_data_name): use
gimp_data_list_data_compare_func(), not just strcmp(), so the
ordering of internal items is correct.
2003-03-07 Sven Neumann <sven@gimp.org>
* plug-ins/common/deinterlace.c

View File

@ -257,17 +257,14 @@ gimp_data_list_uniquefy_data_name (GimpDataList *data_list,
if (object == object2)
continue;
if (strcmp (object->name, object2->name) > 0)
if (gimp_data_list_data_compare_func (object, object2) > 0)
new_index++;
else
break;
}
if (new_index != old_index)
{
gimp_container_reorder (GIMP_CONTAINER (data_list),
object, new_index);
}
gimp_container_reorder (GIMP_CONTAINER (data_list), object, new_index);
}
}
@ -289,6 +286,6 @@ gimp_data_list_data_compare_func (gconstpointer first,
if (first_data->internal != second_data->internal)
return first_data->internal ? -1 : 1;
return strcmp (((const GimpObject *) first)->name,
return strcmp (((const GimpObject *) first)->name,
((const GimpObject *) second)->name);
}