[glade3/glade-3-8] * plugins/gtk+/glade-gtk.c: Removed alpha_sort_box_children(), project needs to be sorted with b
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3/glade-3-8] * plugins/gtk+/glade-gtk.c: Removed alpha_sort_box_children(), project needs to be sorted with b
- Date: Sun, 19 Dec 2010 11:02:51 +0000 (UTC)
commit b38d37e96a8bc8fcc1b5404abef02d83117cc558
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Dec 19 20:05:23 2010 +0900
* plugins/gtk+/glade-gtk.c: Removed alpha_sort_box_children(), project needs to be
sorted with box children by position, loading process depends on this.
ChangeLog | 3 +++
plugins/gtk+/glade-gtk.c | 22 +---------------------
2 files changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 51d1c99..eedb248 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
* 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).
+ * plugins/gtk+/glade-gtk.c: Removed alpha_sort_box_children(), project needs to be
+ sorted with box children by position, loading process depends on this.
+
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 80a18f0..5bd512f 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -1700,33 +1700,13 @@ sort_box_children (GtkWidget *widget_a, GtkWidget *widget_b)
return position_a - position_b;
}
-static gint
-alpha_sort_box_children (GtkWidget *a, GtkWidget *b)
-{
- GladeWidget *ga, *gb;
-
- ga = glade_widget_get_from_gobject (a);
- gb = glade_widget_get_from_gobject (b);
-
- if (!GLADE_IS_WIDGET (ga) && !GLADE_IS_WIDGET (gb))
- return 0;
-
- if (!GLADE_IS_WIDGET (ga))
- return 1;
-
- if (!GLADE_IS_WIDGET (gb))
- return -1;
-
- return strcmp (ga->name, gb->name);
-}
-
GList *
glade_gtk_box_get_children (GladeWidgetAdaptor *adaptor,
GtkContainer *container)
{
GList *children = glade_util_container_get_all_children (container);
- return g_list_sort (children, (GCompareFunc)alpha_sort_box_children);
+ return g_list_sort (children, (GCompareFunc)sort_box_children);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]