summaryrefslogtreecommitdiff
path: root/thunar/thunar-window.c
diff options
context:
space:
mode:
Diffstat (limited to 'thunar/thunar-window.c')
-rw-r--r--thunar/thunar-window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index b38a1e70..ea3affc6 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -2537,7 +2537,9 @@ static void
thunar_window_action_close_tab (ThunarWindow *window,
GtkWidget *menu_item)
{
- if (window->view != NULL)
+ if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (window->notebook)) == 1)
+ gtk_widget_destroy (GTK_WIDGET (window));
+ else if (window->view != NULL)
gtk_widget_destroy (window->view);
}