summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-04-23 22:06:42 +0200
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2014-04-23 17:48:45 -0300
commitf268f53ba3124614e4e62d07514e0070461f213c (patch)
tree82bb0f44bb803c643e64c91b1a156f7299dc5058 /plugins
parent20d8a5ac2f89cfccd1a5ad530ae003ff64995373 (diff)
downloadglade-f268f53ba3124614e4e62d07514e0070461f213c.tar.gz
Backport 56f47169dc09cfd6ed13a24cb9752050ecb66d6f.
Thanks to Thomas Martitz for the backport. GladeProject: Changed the way we calculate graph dependencies. Instead of using glade_widget_depends() which implied N^2 invocations/iterations (where N is the numbers of objects in the project) we now calcualte dependencies based on property references. This way we only have to iterace over every object once to check the list of properties that constitute a reference to them. In a real world example, sorting objects in geany.glade decreased from 120ms to just 1ms plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk-widget.c: Removed unused glade_gtk_widget_depends() Conflicts: plugins/gtk+/glade-gtk-widget.c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtk+/glade-gtk.c12
-rw-r--r--plugins/gtk+/gtk+.xml.in1
2 files changed, 0 insertions, 13 deletions
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index d797467b..c01a1d69 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -231,18 +231,6 @@ glade_gtk_init (const gchar *name)
}
/* ----------------------------- GtkWidget ------------------------------ */
-gboolean
-glade_gtk_widget_depends (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeWidget *another)
-{
- if (GTK_IS_ICON_FACTORY (another->object) ||
- GTK_IS_ACTION (another->object) ||
- GTK_IS_ACTION_GROUP (another->object))
- return TRUE;
-
- return GWA_GET_CLASS (G_TYPE_OBJECT)->depends (adaptor, widget, another);
-}
#define GLADE_TAG_A11Y_A11Y "accessibility"
#define GLADE_TAG_A11Y_ACTION_NAME "action_name" /* We should make -/_ synonymous */
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 56482f00..27cc395a 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -16,7 +16,6 @@
<get-property-function>glade_gtk_widget_get_property</get-property-function>
<action-activate-function>glade_gtk_widget_action_activate</action-activate-function>
<action-submenu-function>glade_gtk_widget_action_submenu</action-submenu-function>
- <depends-function>glade_gtk_widget_depends</depends-function>
<read-widget-function>glade_gtk_widget_read_widget</read-widget-function>
<write-widget-function>glade_gtk_widget_write_widget</write-widget-function>
<create-editor-property-function>glade_gtk_widget_create_eprop</create-editor-property-function>