Instead of destroying the BAboutWindow object on close, Hide() it, then on the destructor of the calling window call Quit() explicitly to destroy it.

This commit is contained in:
John Scipione
2012-11-12 23:57:30 -05:00
parent 04875296c4
commit 97a814061e
6 changed files with 21 additions and 56 deletions
+4 -10
View File
@@ -1112,22 +1112,16 @@ ActivityView::MessageReceived(BMessage* message)
switch (message->what) {
case B_ABOUT_REQUESTED:
{
bool quit = false;
if (message->FindBool("quit", &quit) == B_OK && quit) {
fAboutWindow = NULL;
break;
}
if (fAboutWindow == NULL) {
fAboutWindow = new BAboutWindow(this, kAppName, kSignature);
fAboutWindow = new BAboutWindow(kAppName, kSignature);
fAboutWindow->AddCopyright(2008, "Haiku, Inc.");
fAboutWindow->Show();
} else
} else if (fAboutWindow->IsHidden())
fAboutWindow->Show();
else
fAboutWindow->Activate();
break;
}
case kMsgUpdateResolution:
{