[gtk+/wip/matthiasc/listbox-grid-lines: 3/3] stack sidebar: Drop separator widgets
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/matthiasc/listbox-grid-lines: 3/3] stack sidebar: Drop separator widgets
- Date: Tue, 28 Jul 2015 02:06:07 +0000 (UTC)
commit 59b3a04eb3827020f68845a83d62a08bf28aca61
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 27 19:27:46 2015 -0400
stack sidebar: Drop separator widgets
We have all the css machinery to do these with css now, so drop
the use of GtkSeparator widgets and use GtkListBox grid lines
instead.
gtk/gtkstacksidebar.c | 16 +---------------
1 files changed, 1 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c
index df96f37..7e7a863 100644
--- a/gtk/gtkstacksidebar.c
+++ b/gtk/gtkstacksidebar.c
@@ -103,20 +103,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 gint
sort_list (GtkListBoxRow *row1,
GtkListBoxRow *row2,
@@ -200,7 +186,7 @@ gtk_stack_sidebar_init (GtkStackSidebar *sidebar)
gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (priv->list));
- gtk_list_box_set_header_func (priv->list, update_header, sidebar, NULL);
+ gtk_list_box_set_grid_lines (priv->list, TRUE);
gtk_list_box_set_sort_func (priv->list, sort_list, sidebar, NULL);
g_signal_connect (priv->list, "row-selected",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]