gliststore: Add item lookup functions

Currently, there is no quick way to find whether and element is already
part of a list store, except for manually writing a for-loop and calling
`g_list_model_get_item()` and breaking when you find the item.

This is mostly just a small API addition to support this use case.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1011
This commit is contained in:
Niels De Graef
2019-09-08 15:42:57 +02:00
committed by Niels De Graef
parent 03e3a0396e
commit 14ba521b6d
4 changed files with 163 additions and 0 deletions

View File

@@ -4654,6 +4654,8 @@ g_list_store_remove
g_list_store_remove_all
g_list_store_splice
g_list_store_sort
g_list_store_find
g_list_store_find_with_equal_func
<SUBSECTION Standard>
G_TYPE_LIST_STORE
<SUBSECTION Private>