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:
@@ -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:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user