From 5b50d251d453f6e669abf8f23e633ba566ff3ab0 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Thu, 20 Nov 2003 20:14:22 +0000 Subject: [PATCH] Patch from David Hampton to fix sorting on booleans. Thu Nov 20 14:51:41 2003 Jonathan Blandford * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch from David Hampton to fix sorting on booleans. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtktreedatalist.c | 4 ++-- 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e17bda3ed..f70e827dce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 20 14:51:41 2003 Jonathan Blandford + + * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch + from David Hampton to fix sorting on booleans. + Thu Nov 20 15:48:03 2003 Soeren Sandmann * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7e17bda3ed..f70e827dce 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Thu Nov 20 14:51:41 2003 Jonathan Blandford + + * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch + from David Hampton to fix sorting on booleans. + Thu Nov 20 15:48:03 2003 Soeren Sandmann * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7e17bda3ed..f70e827dce 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Thu Nov 20 14:51:41 2003 Jonathan Blandford + + * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch + from David Hampton to fix sorting on booleans. + Thu Nov 20 15:48:03 2003 Soeren Sandmann * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7e17bda3ed..f70e827dce 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Thu Nov 20 14:51:41 2003 Jonathan Blandford + + * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch + from David Hampton to fix sorting on booleans. + Thu Nov 20 15:48:03 2003 Soeren Sandmann * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7e17bda3ed..f70e827dce 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Thu Nov 20 14:51:41 2003 Jonathan Blandford + + * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch + from David Hampton to fix sorting on booleans. + Thu Nov 20 15:48:03 2003 Soeren Sandmann * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() diff --git a/gtk/gtktreedatalist.c b/gtk/gtktreedatalist.c index c09ac0683d..b4bef80ced 100644 --- a/gtk/gtktreedatalist.c +++ b/gtk/gtktreedatalist.c @@ -314,9 +314,9 @@ gtk_tree_data_list_compare_func (GtkTreeModel *model, switch (G_TYPE_FUNDAMENTAL (type)) { case G_TYPE_BOOLEAN: - if (g_value_get_int (&a_value) < g_value_get_int (&b_value)) + if (g_value_get_boolean (&a_value) < g_value_get_boolean (&b_value)) retval = -1; - else if (g_value_get_int (&a_value) == g_value_get_int (&b_value)) + else if (g_value_get_boolean (&a_value) == g_value_get_boolean (&b_value)) retval = 0; else retval = 1;