Patch from David Hampton to fix sorting on booleans.

Thu Nov 20 14:51:41 2003  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtktreedatalist.c (gtk_tree_data_list_compare_func): Patch
        from David Hampton to fix sorting on booleans.
This commit is contained in:
Jonathan Blandford 2003-11-20 20:14:22 +00:00 committed by Jonathan Blandford
parent fb2e12e8c8
commit 5b50d251d4
6 changed files with 27 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com>
* 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 <sandmann@daimi.au.dk> Thu Nov 20 15:48:03 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus()

View File

@ -1,3 +1,8 @@
Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com>
* 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 <sandmann@daimi.au.dk> Thu Nov 20 15:48:03 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus()

View File

@ -1,3 +1,8 @@
Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com>
* 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 <sandmann@daimi.au.dk> Thu Nov 20 15:48:03 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus()

View File

@ -1,3 +1,8 @@
Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com>
* 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 <sandmann@daimi.au.dk> Thu Nov 20 15:48:03 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus()

View File

@ -1,3 +1,8 @@
Thu Nov 20 14:51:41 2003 Jonathan Blandford <jrb@redhat.com>
* 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 <sandmann@daimi.au.dk> Thu Nov 20 15:48:03 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus() * gtk/gtksocket.c (gtk_socket_focus): Use gtk_widget_is_focus()

View File

@ -314,9 +314,9 @@ gtk_tree_data_list_compare_func (GtkTreeModel *model,
switch (G_TYPE_FUNDAMENTAL (type)) switch (G_TYPE_FUNDAMENTAL (type))
{ {
case G_TYPE_BOOLEAN: 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; 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; retval = 0;
else else
retval = 1; retval = 1;