From 508073072822b83dccf3bc5aa642f488c967de52 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 4 Jul 2020 21:47:48 +0200 Subject: 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. --- gtk/gtkpagesetupunixdialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gtk/gtkpagesetupunixdialog.c') diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c index 5e2679affd..2e353c0033 100644 --- a/gtk/gtkpagesetupunixdialog.c +++ b/gtk/gtkpagesetupunixdialog.c @@ -306,7 +306,7 @@ gtk_page_setup_unix_dialog_init (GtkPageSetupUnixDialog *dialog) g_list_store_append (store, dialog->page_setup_list); g_list_store_append (store, dialog->custom_paper_list); g_list_store_append (store, dialog->manage_papers_list); - paper_size_list = G_LIST_MODEL (gtk_flatten_list_model_new (GTK_TYPE_PAGE_SETUP, G_LIST_MODEL (store))); + paper_size_list = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (store))); gtk_drop_down_set_model (GTK_DROP_DOWN (dialog->paper_size_combo), paper_size_list); g_object_unref (store); g_object_unref (paper_size_list); @@ -321,7 +321,7 @@ gtk_page_setup_unix_dialog_init (GtkPageSetupUnixDialog *dialog) g_list_store_append (printer_list_list, printer_list); g_object_unref (printer_list); - full_list = G_LIST_MODEL (gtk_flatten_list_model_new (GTK_TYPE_PRINTER, G_LIST_MODEL (printer_list_list))); + full_list = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (printer_list_list))); filter = gtk_custom_filter_new (match_func, NULL, NULL); dialog->printer_list = G_LIST_MODEL (gtk_filter_list_model_new (full_list, filter)); -- cgit v1.2.1