[gedit] Destroy the overlay-child is the widget inside is destroyed.



commit 2a19444a2cc503336e28f7756a990964762a6de0
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Feb 18 14:08:38 2011 +0100

    Destroy the overlay-child is the widget inside is destroyed.

 gedit/gedit-overlay.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-overlay.c b/gedit/gedit-overlay.c
index 902f13d..44fa0d9 100644
--- a/gedit/gedit-overlay.c
+++ b/gedit/gedit-overlay.c
@@ -304,6 +304,9 @@ overlay_add (GtkContainer *overlay,
 		{
 			child = gedit_overlay_child_new (widget);
 			gtk_widget_show (GTK_WIDGET (child));
+
+			g_signal_connect_swapped (widget, "destroy",
+			                          G_CALLBACK (gtk_widget_destroy), child);
 		}
 
 		add_toplevel_widget (GEDIT_OVERLAY (overlay), GTK_WIDGET (child));



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