From fd643d72e9d872aa17a3f5b988f32279ecffe4f1 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Tue, 11 Oct 2011 02:53:14 +0200 Subject: [PATCH] Allow last tab to close private and app mode --- midori/midori-browser.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 695398a6..0643d781 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -2452,11 +2452,15 @@ _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))) + gboolean last_tab = + gtk_notebook_get_nth_page (GTK_NOTEBOOK (browser->notebook), 1) == NULL; + if (last_tab && sokoke_is_app_or_private ()) { + gtk_widget_destroy (GTK_WIDGET (browser)); return; } + if (last_tab && midori_view_is_blank (MIDORI_VIEW (widget))) + return; gtk_widget_destroy (widget); } -- 2.39.5