mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-05 19:15:32 +00:00
util: Rename function to calls_find_in_model() and adjust documentation
Since it works for GListModel rename it appropriately.
It used to provide an inline implementation for g_list_store_find()
behind a glib version guard, but we bumped minimum version in
cfd3c2a7fe
so the docstring was updated and made more succinct.
This commit is contained in:
parent
0bcf3fa08e
commit
29a2059e0e
4 changed files with 6 additions and 7 deletions
|
@ -94,7 +94,7 @@ delete_call_cb (CallsCallRecord *record,
|
|||
|
||||
g_return_if_fail (CALLS_IS_CALL_RECORD (record));
|
||||
|
||||
ok = calls_find_in_store (self->model,
|
||||
ok = calls_find_in_model (self->model,
|
||||
record,
|
||||
&position);
|
||||
|
||||
|
|
|
@ -518,7 +518,7 @@ origin_found_in_any_provider (CallsManager *self,
|
|||
CallsProvider *provider = CALLS_PROVIDER (value);
|
||||
GListModel *origins = calls_provider_get_origins (provider);
|
||||
|
||||
if (origins && calls_find_in_store (origins,
|
||||
if (origins && calls_find_in_model (origins,
|
||||
origin,
|
||||
&position))
|
||||
return TRUE;
|
||||
|
|
|
@ -95,16 +95,15 @@ calls_number_is_ussd (const char *number)
|
|||
}
|
||||
|
||||
/**
|
||||
* calls_find_in_store:
|
||||
* calls_find_in_model:
|
||||
* @list: A #GListModel
|
||||
* @item: The #gpointer to find
|
||||
* @position: (out) (optional): The first position of @item, if it was found.
|
||||
*
|
||||
* Returns: Whether @list contains @item. This is mainly a convenience function
|
||||
* until we no longer support older glib versions.
|
||||
* Returns: %TRUE if @list contains @item, %FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
calls_find_in_store (GListModel *list,
|
||||
calls_find_in_model (GListModel *list,
|
||||
gpointer item,
|
||||
guint *position)
|
||||
{
|
||||
|
|
|
@ -119,7 +119,7 @@ gboolean calls_date_time_is_same_year (GDateTime *a,
|
|||
GDateTime *b);
|
||||
gboolean calls_number_is_ussd (const char *number);
|
||||
|
||||
gboolean calls_find_in_store (GListModel *list,
|
||||
gboolean calls_find_in_model (GListModel *list,
|
||||
gpointer item,
|
||||
guint *position);
|
||||
|
||||
|
|
Loading…
Reference in a new issue