summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-08 12:58:27 +0000
committerMatthias Clasen <mclasen@redhat.com>2020-09-08 12:58:27 +0000
commitcb2b0688ca3b1558e3ebcffd8d763d4963cfaa5c (patch)
tree869e27f0d65486882f23cb6cf9fe4e802d98db57 /tests
parent45c61fdbe35a6a4519e15376967ca183c996057c (diff)
parent24389a0ef5063944aa9909a40239658c4eedb230 (diff)
downloadgtk+-cb2b0688ca3b1558e3ebcffd8d763d4963cfaa5c.tar.gz
Merge branch 'filter-constructors' into 'master'
Filter constructors See merge request GNOME/gtk!2360
Diffstat (limited to 'tests')
-rw-r--r--tests/testcolumnview.c6
-rw-r--r--tests/testlistview-animating.c2
-rw-r--r--tests/testlistview.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/testcolumnview.c b/tests/testcolumnview.c
index d38e83ce6d..aa7e769393 100644
--- a/tests/testcolumnview.c
+++ b/tests/testcolumnview.c
@@ -665,7 +665,7 @@ add_extra_columns (GtkColumnView *view,
column = gtk_column_view_column_new_with_factory (extra_columns[i].title,
gtk_builder_list_item_factory_new_from_bytes (scope, bytes));
g_bytes_unref (bytes);
- sorter = gtk_custom_sorter_new (compare_file_attribute, (gpointer) extra_columns[i].attribute, NULL);
+ sorter = GTK_SORTER (gtk_custom_sorter_new (compare_file_attribute, (gpointer) extra_columns[i].attribute, NULL));
gtk_column_view_column_set_sorter (column, sorter);
g_object_unref (sorter);
gtk_column_view_append_column (view, column);
@@ -753,10 +753,10 @@ main (int argc, char *argv[])
create_list_model_for_file_info,
NULL, NULL);
- sorter = gtk_tree_list_row_sorter_new (g_object_ref (gtk_column_view_get_sorter (GTK_COLUMN_VIEW (view))));
+ sorter = GTK_SORTER (gtk_tree_list_row_sorter_new (g_object_ref (gtk_column_view_get_sorter (GTK_COLUMN_VIEW (view)))));
sort = gtk_sort_list_model_new (G_LIST_MODEL (tree), sorter);
- custom_filter = gtk_custom_filter_new (match_file, g_object_ref (search_entry), g_object_unref);
+ custom_filter = GTK_FILTER (gtk_custom_filter_new (match_file, g_object_ref (search_entry), g_object_unref));
filter = gtk_filter_list_model_new (G_LIST_MODEL (sort), custom_filter);
g_signal_connect (search_entry, "search-changed", G_CALLBACK (search_changed_cb), custom_filter);
diff --git a/tests/testlistview-animating.c b/tests/testlistview-animating.c
index 33c69e3565..9554f6fc97 100644
--- a/tests/testlistview-animating.c
+++ b/tests/testlistview-animating.c
@@ -126,7 +126,7 @@ main (int argc,
store = g_list_store_new (G_TYPE_OBJECT);
for (i = 0; i < AVERAGE; i++)
add (store);
- sorter = gtk_numeric_sorter_new (gtk_cclosure_expression_new (G_TYPE_UINT, NULL, 0, NULL, (GCallback)get_number, NULL, NULL));
+ sorter = GTK_SORTER (gtk_numeric_sorter_new (gtk_cclosure_expression_new (G_TYPE_UINT, NULL, 0, NULL, (GCallback)get_number, NULL, NULL)));
sort = gtk_sort_list_model_new (G_LIST_MODEL (store), sorter);
win = gtk_window_new ();
diff --git a/tests/testlistview.c b/tests/testlistview.c
index 53234078b5..47e54e1023 100644
--- a/tests/testlistview.c
+++ b/tests/testlistview.c
@@ -325,7 +325,7 @@ create_list_model_for_directory (gpointer file)
return NULL;
dir = create_directory_list (file);
- sorter = gtk_string_sorter_new (gtk_cclosure_expression_new (G_TYPE_STRING, NULL, 0, NULL, (GCallback) get_file_path, NULL, NULL));
+ sorter = GTK_SORTER (gtk_string_sorter_new (gtk_cclosure_expression_new (G_TYPE_STRING, NULL, 0, NULL, (GCallback) get_file_path, NULL, NULL)));
return G_LIST_MODEL (gtk_sort_list_model_new (G_LIST_MODEL (dir), sorter));
}
@@ -629,7 +629,7 @@ main (int argc, char *argv[])
NULL, NULL);
g_object_unref (root);
- custom_filter = gtk_custom_filter_new (match_file, search_entry, NULL);
+ custom_filter = GTK_FILTER (gtk_custom_filter_new (match_file, search_entry, NULL));
filter = gtk_filter_list_model_new (G_LIST_MODEL (tree), custom_filter);
g_signal_connect (search_entry, "search-changed", G_CALLBACK (search_changed_cb), custom_filter);