diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-12-17 16:05:14 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2013-12-17 23:52:13 -0300 |
commit | 1401a4bb43a3e56d642c34d5dc7d5ee86217cb3d (patch) | |
tree | 8a925ef2ef3f1894e669f8f9659d81ba9d650691 /gladeui/glade-widget.c | |
parent | dbf7f22564f32ee23f2747bd54803dcc4cefcdf9 (diff) | |
download | glade-1401a4bb43a3e56d642c34d5dc7d5ee86217cb3d.tar.gz |
GladeWidget: Removed get_toplevel() cache.
This micro optimization in no longer needed and it was incomplete.
Diffstat (limited to 'gladeui/glade-widget.c')
-rw-r--r-- | gladeui/glade-widget.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c index bd140434..1fbe6050 100644 --- a/gladeui/glade-widget.c +++ b/gladeui/glade-widget.c @@ -149,8 +149,6 @@ struct _GladeWidgetPrivate { GtkTreeModel *signal_model; /* Signal model (or NULL if not yet requested) */ - GladeWidget *cached_toplevel; /* Used to speed up glade_widget_get_toplevel */ - /* Construct parameters: */ GladeWidget *construct_template; GladeCreateReason construct_reason; @@ -3643,9 +3641,6 @@ glade_widget_set_parent (GladeWidget * widget, GladeWidget * parent) old_parent = widget->priv->parent; widget->priv->parent = parent; - /* unset toplevel cache used in glade_widget_get_toplevel() */ - widget->priv->cached_toplevel = NULL; - /* Set packing props only if the object is actually parented by 'parent' * (a subsequent call should come from glade_command after parenting). */ @@ -3757,14 +3752,9 @@ glade_widget_get_toplevel (GladeWidget * widget) GladeWidget *toplevel = widget; g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL); - if (widget->priv->cached_toplevel) - return widget->priv->cached_toplevel; - while (toplevel->priv->parent) toplevel = toplevel->priv->parent; - widget->priv->cached_toplevel = toplevel; - return toplevel; } |