[gnome-builder/search] GbSearchDisplay: set row separator
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/search] GbSearchDisplay: set row separator
- Date: Tue, 16 Dec 2014 23:54:54 +0000 (UTC)
commit 028a877f7b210c6a5d90f50acb2faab00136eae5
Author: Christian Hergert <christian hergert me>
Date: Tue Dec 16 15:14:35 2014 -0800
GbSearchDisplay: set row separator
src/search/gb-search-display.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/search/gb-search-display.c b/src/search/gb-search-display.c
index 71e360c..12dde01 100644
--- a/src/search/gb-search-display.c
+++ b/src/search/gb-search-display.c
@@ -245,6 +245,23 @@ gb_search_display_grab_focus (GtkWidget *widget)
}
static void
+gb_search_display_header_func (GtkListBoxRow *row,
+ GtkListBoxRow *before,
+ gpointer user_data)
+{
+ if (before)
+ {
+ GtkWidget *header;
+
+ header = g_object_new (GTK_TYPE_SEPARATOR,
+ "orientation", GTK_ORIENTATION_HORIZONTAL,
+ "visible", TRUE,
+ NULL);
+ gtk_list_box_row_set_header (row, header);
+ }
+}
+
+static void
gb_search_display_constructed (GObject *object)
{
GbSearchDisplay *self = (GbSearchDisplay *)object;
@@ -253,6 +270,11 @@ gb_search_display_constructed (GObject *object)
G_OBJECT_CLASS (gb_search_display_parent_class)->constructed (object);
+ gtk_list_box_set_header_func (self->priv->list_box,
+ gb_search_display_header_func,
+ NULL, NULL);
+
+
g_signal_connect_object (self->priv->list_box,
"row-activated",
G_CALLBACK (gb_search_display_row_activated),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]