diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-11 14:09:19 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-06-13 12:17:07 +0200 |
commit | cc4ac1ee70e64413d83c1a866932109a95b51450 (patch) | |
tree | c0ae0a525ddb60e58d3f8ad0806e39291f776ab2 /tests/testlist.c | |
parent | 4a0b6e5479b1f678f257b28182aaa9c35151d038 (diff) | |
download | gtk+-cc4ac1ee70e64413d83c1a866932109a95b51450.tar.gz |
GtkListBox: Rename separators to headers
Diffstat (limited to 'tests/testlist.c')
-rw-r--r-- | tests/testlist.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/testlist.c b/tests/testlist.c index 0c3a43efbb..61f27cb90e 100644 --- a/tests/testlist.c +++ b/tests/testlist.c @@ -60,7 +60,7 @@ row_new (const gchar* text, gint sort_id) { static void -update_separator_cb (Row *row, Row *before, gpointer data) +update_header_cb (Row *row, Row *before, gpointer data) { GtkWidget *hbox, *l, *b; GList *children; @@ -69,29 +69,29 @@ update_separator_cb (Row *row, Row *before, gpointer data) (row->label != NULL && strcmp (gtk_label_get_text (GTK_LABEL (row->label)), "blah3") == 0)) { - /* Create separator if needed */ - if (gtk_list_box_row_get_separator (GTK_LIST_BOX_ROW (row)) == NULL) + /* Create header if needed */ + if (gtk_list_box_row_get_header (GTK_LIST_BOX_ROW (row)) == NULL) { hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); - l = gtk_label_new ("Separator"); + l = gtk_label_new ("Header"); gtk_container_add (GTK_CONTAINER (hbox), l); b = gtk_button_new_with_label ("button"); gtk_container_add (GTK_CONTAINER (hbox), b); gtk_widget_show (l); gtk_widget_show (b); - gtk_list_box_row_set_separator (GTK_LIST_BOX_ROW (row), hbox); + gtk_list_box_row_set_header (GTK_LIST_BOX_ROW (row), hbox); } - hbox = gtk_list_box_row_get_separator(GTK_LIST_BOX_ROW (row)); + hbox = gtk_list_box_row_get_header(GTK_LIST_BOX_ROW (row)); children = gtk_container_get_children (GTK_CONTAINER (hbox)); l = children->data; g_list_free (children); - gtk_label_set_text (GTK_LABEL (l), g_strdup_printf ("Separator %d", row->sort_id)); + gtk_label_set_text (GTK_LABEL (l), g_strdup_printf ("Header %d", row->sort_id)); } else { - gtk_list_box_row_set_separator(GTK_LIST_BOX_ROW (row), NULL); + gtk_list_box_row_set_header(GTK_LIST_BOX_ROW (row), NULL); } } @@ -210,7 +210,7 @@ separate_clicked_cb (GtkButton *button, { GtkListBox *list = data; - gtk_list_box_set_separator_func (list, (GtkListBoxUpdateSeparatorFunc)update_separator_cb, NULL, NULL); + gtk_list_box_set_header_func (list, (GtkListBoxUpdateHeaderFunc)update_header_cb, NULL, NULL); } static void @@ -219,7 +219,7 @@ unseparate_clicked_cb (GtkButton *button, { GtkListBox *list = data; - gtk_list_box_set_separator_func (list, NULL, NULL, NULL); + gtk_list_box_set_header_func (list, NULL, NULL, NULL); } static void |