[gtk: 64/72] stacksidebar: Set GtkListBox:show-separators
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 64/72] stacksidebar: Set GtkListBox:show-separators
- Date: Wed, 14 Oct 2020 19:08:13 +0000 (UTC)
commit 61afb0984ceffea638fa2dda35a7fe9604dbe7ea
Author: Timm Bäder <mail baedert org>
Date: Sun Oct 11 19:30:15 2020 +0200
stacksidebar: Set GtkListBox:show-separators
Instead of doing this ourselves
gtk/gtkstacksidebar.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c
index f7bbe3939e..a9f5f24c08 100644
--- a/gtk/gtkstacksidebar.c
+++ b/gtk/gtkstacksidebar.c
@@ -122,20 +122,6 @@ gtk_stack_sidebar_get_property (GObject *object,
}
}
-static void
-update_header (GtkListBoxRow *row,
- GtkListBoxRow *before,
- gpointer userdata)
-{
- GtkWidget *ret = NULL;
-
- if (before && !gtk_list_box_row_get_header (row))
- {
- ret = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_list_box_row_set_header (row, ret);
- }
-}
-
static void
gtk_stack_sidebar_row_selected (GtkListBox *box,
GtkListBoxRow *row,
@@ -164,11 +150,10 @@ gtk_stack_sidebar_init (GtkStackSidebar *self)
gtk_widget_set_parent (sw, GTK_WIDGET (self));
self->list = GTK_LIST_BOX (gtk_list_box_new ());
+ gtk_list_box_set_show_separators (GTK_LIST_BOX (self->list), TRUE);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), GTK_WIDGET (self->list));
- gtk_list_box_set_header_func (self->list, update_header, self, NULL);
-
g_signal_connect (self->list, "row-selected",
G_CALLBACK (gtk_stack_sidebar_row_selected), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]