[gimp/wip/nielsdg/remove-public-gimplist-sort-func] gimplist: Don't use sort_func field directly



commit 739838d827a7d4ef8d3f83b56264ad31fa9e3bbb
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Sun May 10 15:06:16 2020 +0200

    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.

 app/core/gimpfilteredcontainer.c  | 2 +-
 app/core/gimptaggedcontainer.c    | 2 +-
 app/widgets/gimpcontainereditor.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimpfilteredcontainer.c b/app/core/gimpfilteredcontainer.c
index 500dbf47f6..4b31323226 100644
--- a/app/core/gimpfilteredcontainer.c
+++ b/app/core/gimpfilteredcontainer.c
@@ -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,
diff --git a/app/core/gimptaggedcontainer.c b/app/core/gimptaggedcontainer.c
index d1ef353da4..3646051c8c 100644
--- a/app/core/gimptaggedcontainer.c
+++ b/app/core/gimptaggedcontainer.c
@@ -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,
diff --git a/app/widgets/gimpcontainereditor.c b/app/widgets/gimpcontainereditor.c
index e402bc8c1a..87a5d6acc3 100644
--- a/app/widgets/gimpcontainereditor.c
+++ b/app/widgets/gimpcontainereditor.c
@@ -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 &&


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]