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
This commit is contained in:
Stefano Ceccherini 2007-08-04 14:35:38 +00:00
parent 2671c0bf0a
commit 187453512d

View File

@ -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.
if (fTabView->CountTabs() > 1)
delete fTabView->RemoveTab(fTabView->Selection());
else
PostMessage(B_QUIT_REQUESTED);
break;
}