diff options
author | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-19 17:09:22 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2010-12-19 17:09:22 +0900 |
commit | 480d402d1902f02d757ff9db30af9843e92dc84c (patch) | |
tree | 952953d79fa442ac2f9947f616f8c64469266bc7 /plugins | |
parent | 61325a5c4c3b67ad4216b83bfc5855b3fda9f7e8 (diff) | |
download | glade-480d402d1902f02d757ff9db30af9843e92dc84c.tar.gz |
* 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).
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtk+/glade-gtk.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 * |