diff options
author | Benjamin Otte <otte@redhat.com> | 2020-07-04 21:47:48 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2020-07-05 02:59:21 +0200 |
commit | 508073072822b83dccf3bc5aa642f488c967de52 (patch) | |
tree | 1ab4dd2aaab1ae3a7d1a4485f5dc4d5e9ef26a48 /gtk/gtksingleselection.c | |
parent | f75a3a0e95b31c84f41acc741d6dfb2028dbe6a2 (diff) | |
download | gtk+-508073072822b83dccf3bc5aa642f488c967de52.tar.gz |
listmodels: Stop respecting item-type
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
Diffstat (limited to 'gtk/gtksingleselection.c')
-rw-r--r-- | gtk/gtksingleselection.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk/gtksingleselection.c b/gtk/gtksingleselection.c index bd35aed782..70f0beab27 100644 --- a/gtk/gtksingleselection.c +++ b/gtk/gtksingleselection.c @@ -72,9 +72,7 @@ static GParamSpec *properties[N_PROPS] = { NULL, }; static GType gtk_single_selection_get_item_type (GListModel *list) { - GtkSingleSelection *self = GTK_SINGLE_SELECTION (list); - - return g_list_model_get_item_type (self->model); + return G_TYPE_OBJECT; } static guint |