From 92e23d9d4edf0efff8e5234d0c92f07aa41dfcf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20St=C3=B6sel?= Date: Tue, 19 Jul 2011 21:57:27 +0200 Subject: [PATCH] Don't destroy the current tab if it is last and blank If you hit the shortcut for closing tabs over a long time (to close all tabs), Midori hangs for some seconds. --- midori/midori-browser.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 8df0c6ce..3f962100 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -2385,6 +2385,11 @@ _action_tab_close_activate (GtkAction* action, MidoriBrowser* browser) { GtkWidget* widget = midori_browser_get_current_tab (browser); + if (gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), 1) == NULL && + midori_view_is_blank (MIDORI_VIEW (widget))) + { + return; + } gtk_widget_destroy (widget); }