[gtk+/wip/combo] Properly manage list separators
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/combo] Properly manage list separators
- Date: Wed, 7 Jan 2015 05:23:20 +0000 (UTC)
commit e2923434408041ebecc7c682444a87078e60927d
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 6 06:37:32 2015 -0500
Properly manage list separators
If we never unset separators, the stick around at the top of the
list during filtering.
gtk/gtkcombo.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcombo.c b/gtk/gtkcombo.c
index 20a0349..259dd6d 100644
--- a/gtk/gtkcombo.c
+++ b/gtk/gtkcombo.c
@@ -828,12 +828,14 @@ list_header_func (GtkListBoxRow *row,
GtkListBoxRow *before,
gpointer data)
{
- GtkWidget *ret = NULL;
-
- if (before && !gtk_list_box_row_get_header (row))
+ if (before != NULL)
{
- ret = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_list_box_row_set_header (row, ret);
+ if (gtk_list_box_row_get_header (row) == NULL)
+ gtk_list_box_row_set_header (row, gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
+ }
+ else
+ {
+ gtk_list_box_row_set_header (row, NULL);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]