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:
parent
868dd3abf0
commit
92e23d9d4e
1 changed files with 5 additions and 0 deletions
|
@ -2385,6 +2385,11 @@ _action_tab_close_activate (GtkAction* action,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
GtkWidget* widget = midori_browser_get_current_tab (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);
|
gtk_widget_destroy (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue