summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2019-11-01 07:31:38 +0100
committerMatthias Clasen <mclasen@redhat.com>2020-05-30 19:26:46 -0400
commit30f09ea10bcd114451e5435fdc73eacd85176a93 (patch)
tree58d41f3f42da93f1fe58fe626419b811728a319c /tests
parentdb3e225f09fc79ed7af106c97642142c199131fd (diff)
downloadgtk+-30f09ea10bcd114451e5435fdc73eacd85176a93.tar.gz
listitem: Make this a GObject
This splits GtkListItem into 2 parts: 1. GtkListItem This is purely a GObject with public API for developers who want to populate lists. There is no chance to cause conflict with GtkWidget properties that the list implementation assumed control over and defines a clear boundary. 2. GtkListItemWidget The widget part of the listitem. This is not only fully in control of the list machinery, the machinery can also use different widget implementations for different list widgets like I inted to for GtkColumnView.
Diffstat (limited to 'tests')
-rw-r--r--tests/testlistview.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/testlistview.c b/tests/testlistview.c
index 7556730f28..927e3a1fd3 100644
--- a/tests/testlistview.c
+++ b/tests/testlistview.c
@@ -493,8 +493,6 @@ setup_widget (GtkListItem *list_item,
RowData *data;
data = g_slice_new0 (RowData);
- g_signal_connect (list_item, "notify::item", G_CALLBACK (row_data_notify_item), data);
- g_object_set_data_full (G_OBJECT (list_item), "row-data", data, row_data_free);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_list_item_set_child (list_item, box);
@@ -516,6 +514,9 @@ setup_widget (GtkListItem *list_item,
gtk_label_set_max_width_chars (GTK_LABEL (data->name), 25);
gtk_label_set_ellipsize (GTK_LABEL (data->name), PANGO_ELLIPSIZE_END);
gtk_box_append (GTK_BOX (box), data->name);
+
+ g_signal_connect (list_item, "notify::item", G_CALLBACK (row_data_notify_item), data);
+ g_object_set_data_full (G_OBJECT (list_item), "row-data", data, row_data_free);
}
static GListModel *