[glade] Push superuser state at the begining of glade_widget_rebuild() and pop it at the end.



commit 2545e6ed2c42cb4a54dedd6c8bf98234368e0006
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Mon Sep 9 17:24:58 2013 -0300

    Push superuser state at the begining of glade_widget_rebuild() and pop it at the end.

 gladeui/glade-widget.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index fe62fda..caa1d6d 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -2495,6 +2495,7 @@ glade_widget_rebuild (GladeWidget * gwidget)
    * reparenting in the process of rebuilding a widget instance
    */
   gwidget->priv->rebuilding = TRUE;
+  glade_widget_push_superuser ();
 
   adaptor = gwidget->priv->adaptor;
 
@@ -2579,9 +2580,7 @@ glade_widget_rebuild (GladeWidget * gwidget)
   /* Reparent any children of the old object to the new object
    * (this function will consume and free the child list).
    */
-  glade_widget_push_superuser ();
   glade_widget_insert_children (gwidget, children);
-  glade_widget_pop_superuser ();
 
   /* Add new object to parent
    */
@@ -2640,7 +2639,7 @@ glade_widget_rebuild (GladeWidget * gwidget)
   g_object_unref (gwidget);
 
   gwidget->priv->rebuilding = FALSE;
-
+  glade_widget_pop_superuser ();
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]