[gnome-logs/wip/gl-journal] Only show category separator above "applications"
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-logs/wip/gl-journal] Only show category separator above "applications"
- Date: Thu, 3 Oct 2013 14:11:04 +0000 (UTC)
commit 4a8cb2a26560d5203408e6853cb8e959390dc82e
Author: David King <davidk gnome org>
Date: Thu Oct 3 14:56:32 2013 +0100
Only show category separator above "applications"
https://bugzilla.gnome.org/show_bug.cgi?id=709291
src/gl-categorylist.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/gl-categorylist.c b/src/gl-categorylist.c
index eb0ebf1..1d3fd4b 100644
--- a/src/gl-categorylist.c
+++ b/src/gl-categorylist.c
@@ -151,9 +151,10 @@ gl_category_list_class_init (GlCategoryListClass *klass)
static void
gl_category_list_header_func (GtkListBoxRow *row,
GtkListBoxRow *before,
- gpointer user_data)
+ GtkListBoxRow *applications)
{
- if (before != NULL && (gtk_list_box_row_get_header (row) == NULL))
+ if (before != NULL && (gtk_list_box_row_get_header (row) == NULL)
+ && row == applications)
{
gtk_list_box_row_set_header (row,
gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
@@ -166,9 +167,10 @@ gl_category_list_init (GlCategoryList *list)
GlCategoryListPrivate *priv;
gtk_widget_init_template (GTK_WIDGET (list));
- gtk_list_box_set_header_func (GTK_LIST_BOX (list),
- gl_category_list_header_func, NULL, NULL);
priv = gl_category_list_get_instance_private (list);
+ gtk_list_box_set_header_func (GTK_LIST_BOX (list),
+ (GtkListBoxUpdateHeaderFunc)gl_category_list_header_func,
+ priv->applications, NULL);
gtk_list_box_select_row (GTK_LIST_BOX (list),
GTK_LIST_BOX_ROW (priv->all));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]