[gnome-builder/wip/tree-menu: 40/44] project-selector: add header func to new dialog
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/tree-menu: 40/44] project-selector: add header func to new dialog
- Date: Fri, 3 Apr 2015 21:11:13 +0000 (UTC)
commit b0415be7dbbbfa2b291c470c4ed9ed4d828df066
Author: Christian Hergert <christian hergert me>
Date: Thu Apr 2 21:48:54 2015 -0700
project-selector: add header func to new dialog
src/dialogs/gb-new-project-dialog.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/dialogs/gb-new-project-dialog.c b/src/dialogs/gb-new-project-dialog.c
index 64284cc..e4d5d79 100644
--- a/src/dialogs/gb-new-project-dialog.c
+++ b/src/dialogs/gb-new-project-dialog.c
@@ -211,6 +211,26 @@ gb_new_project_dialog_close (GbNewProjectDialog *self)
}
static void
+gb_new_project_dialog__open_list_box_header_func (GtkListBoxRow *row,
+ GtkListBoxRow *before,
+ gpointer user_data)
+{
+ g_assert (GTK_IS_LIST_BOX_ROW (row));
+ g_assert (!before || GTK_IS_LIST_BOX_ROW (before));
+
+ if (before != NULL)
+ {
+ 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_new_project_dialog_finalize (GObject *object)
{
GbNewProjectDialog *self = (GbNewProjectDialog *)object;
@@ -364,5 +384,9 @@ gb_new_project_dialog_init (GbNewProjectDialog *self)
self,
G_CONNECT_SWAPPED);
+ gtk_list_box_set_header_func (self->open_list_box,
+ gb_new_project_dialog__open_list_box_header_func,
+ NULL, NULL);
+
g_object_notify (G_OBJECT (self->stack), "visible-child");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]