gimplist: Don't use sort_func field directly

Ideally, we expose as little fields of our struct as possible, so we
don't have to care too much about API/ABI stability.
This commit is contained in:
Niels De Graef
2020-05-10 15:06:16 +02:00
committed by Jehan
parent 7a8a300adc
commit f4c6d4bb79
3 changed files with 3 additions and 3 deletions

View File

@ -310,7 +310,7 @@ gimp_filtered_container_new (GimpContainer *src_container,
g_return_val_if_fail (GIMP_IS_LIST (src_container), NULL);
children_type = gimp_container_get_children_type (src_container);
sort_func = GIMP_LIST (src_container)->sort_func;
sort_func = gimp_list_get_sort_func (src_container);
return g_object_new (GIMP_TYPE_FILTERED_CONTAINER,
"sort-func", sort_func,

View File

@ -268,7 +268,7 @@ gimp_tagged_container_new (GimpContainer *src_container)
g_return_val_if_fail (GIMP_IS_LIST (src_container), NULL);
children_type = gimp_container_get_children_type (src_container);
sort_func = GIMP_LIST (src_container)->sort_func;
sort_func = gimp_list_get_sort_func (src_container);
tagged_container = g_object_new (GIMP_TYPE_TAGGED_CONTAINER,
"sort-func", sort_func,

View File

@ -253,7 +253,7 @@ gimp_container_editor_constructed (GObject *object)
if (GIMP_IS_LIST (editor->priv->container))
gimp_container_view_set_reorderable (GIMP_CONTAINER_VIEW (editor->view),
! GIMP_LIST (editor->priv->container)->sort_func);
! gimp_list_get_sort_func (editor->priv->container));
if (editor->priv->menu_factory &&
editor->priv->menu_identifier &&