[gtk/wip/matthiasc/popup4: 31/105] scale button: Adapt to new popover lifecycle



commit bcb81f0202741340813aebe6a0733d5b42d71c68
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 21 22:13:41 2019 -0400

    scale button: Adapt to new popover lifecycle
    
    Unparent the popover in dispose.

 gtk/gtkscalebutton.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 61a0ed011b..7e76ea9fdd 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -491,11 +491,7 @@ gtk_scale_button_dispose (GObject *object)
   GtkScaleButton *button = GTK_SCALE_BUTTON (object);
   GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
 
-  if (priv->dock)
-    {
-      gtk_widget_destroy (priv->dock);
-      priv->dock = NULL;
-    }
+  g_clear_pointer (&priv->dock, gtk_widget_unparent);
 
   if (priv->click_id != 0)
     {


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