From: André Stösel Date: Tue, 19 Jul 2011 19:57:27 +0000 (+0200) Subject: Don't destroy the current tab if it is last and blank X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92e23d9d4edf0efff8e5234d0c92f07aa41dfcf0;p=midori 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. --- 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); }