Make ordering for overridden interface properties consistent

g_object_class_list_properties tries to sort the returned list of
paramspecs by 'type depth' and param_id. But all the overridden
interface properties have a param_id of 0, so they come out in
a random order.

Bug 628253.
This commit is contained in:
Matthias Clasen 2010-09-03 14:52:16 -04:00
parent 6ddef375c8
commit c75429d0a0

View File

@ -1144,7 +1144,13 @@ pspec_compare_id (gconstpointer a,
{
const GParamSpec *pspec1 = a, *pspec2 = b;
return pspec1->param_id < pspec2->param_id ? -1 : pspec1->param_id > pspec2->param_id;
if (pspec1->param_id < pspec2->param_id)
return -1;
if (pspec1->param_id > pspec2->param_id)
return 1;
return strcmp (pspec1->name, pspec2->name);
}
static inline GSList*