From 187453512d114971a7c58beae3511b2d31b863db Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Sat, 4 Aug 2007 14:35:38 +0000 Subject: [PATCH] If there's only one tab, quit the window when TermView::NotifyQuit() is called. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21824 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/terminal/TermWindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/apps/terminal/TermWindow.cpp b/src/apps/terminal/TermWindow.cpp index 58bfa5d2c6..913f68f602 100644 --- a/src/apps/terminal/TermWindow.cpp +++ b/src/apps/terminal/TermWindow.cpp @@ -239,7 +239,10 @@ TermWindow::MessageReceived(BMessage *message) // Since the implementation of BTabView uses AddChild/RemoveChild on the // views, the current active tab is the only one who is attached, thus // the only one which could send a message. - delete fTabView->RemoveTab(fTabView->Selection()); + if (fTabView->CountTabs() > 1) + delete fTabView->RemoveTab(fTabView->Selection()); + else + PostMessage(B_QUIT_REQUESTED); break; }