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.
This commit is contained in:
André Stösel 2011-07-19 21:57:27 +02:00 committed by Christian Dywan
parent 868dd3abf0
commit 92e23d9d4e

View file

@ -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);
}