From a9a220f96cdb95a5eb2ee23eed3a42737eb52a07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20St=C3=B6sel?= Date: Tue, 19 Apr 2011 23:21:31 +0200 Subject: [PATCH] Don't destroy inspector window that will be re-used --- midori/midori-browser.c | 2 ++ midori/midori-view.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index c557179a..8958cbc8 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1262,9 +1262,11 @@ midori_view_detach_inspector_cb (GtkWidget* view, MidoriBrowser* browser) { GtkWidget* scrolled = gtk_widget_get_parent (GTK_WIDGET (inspector_view)); + GtkWidget* paned = gtk_widget_get_parent (scrolled); browser->inspector_view = gtk_viewport_new (NULL, NULL); gtk_container_remove (GTK_CONTAINER (scrolled), GTK_WIDGET (inspector_view)); gtk_container_add (GTK_CONTAINER (scrolled), browser->inspector_view); + gtk_widget_hide (paned); } static void diff --git a/midori/midori-view.c b/midori/midori-view.c index 6de6f74b..75371356 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -3736,7 +3736,7 @@ midori_view_web_inspector_close_window_cb (gpointer inspector, GtkWidget* scrolled = gtk_widget_get_parent (GTK_WIDGET (inspector_view)); if (!scrolled) return FALSE; - gtk_widget_destroy (gtk_widget_get_parent (scrolled)); + gtk_widget_hide (gtk_widget_get_parent (scrolled)); return TRUE; } -- 2.39.5