diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | plugins/gtk+/glade-gtk.c | 12 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2010-12-19 Tristan Van Berkom <tristanvb@openismus.com> + + * plugins/gtk+/glade-gtk.c: Fix alpha_sort_box_children() to give a consistent + order to placeholders (bug 637534 fix by Marco Diego Aurélio Mesquita). + 2010-12-18 Tristan Van Berkom <tristanvb@openismus.com> * src/Makefile.am, gladeui/Makefile.am, plugins/gtk+/Makefile.am, plugins/gnome/Makefile.am: diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c index 3fc67785..80a18f00 100644 --- a/plugins/gtk+/glade-gtk.c +++ b/plugins/gtk+/glade-gtk.c @@ -1708,10 +1708,16 @@ alpha_sort_box_children (GtkWidget *a, GtkWidget *b) ga = glade_widget_get_from_gobject (a); gb = glade_widget_get_from_gobject (b); - if (!ga || !gb) + if (!GLADE_IS_WIDGET (ga) && !GLADE_IS_WIDGET (gb)) + return 0; + + if (!GLADE_IS_WIDGET (ga)) return 1; - else - return strcmp (ga->name, gb->name); + + if (!GLADE_IS_WIDGET (gb)) + return -1; + + return strcmp (ga->name, gb->name); } GList * |