Use a quit bool in B_ABOUT_REQUESTED to indicate that the about window has quit instead of using kAboutWindowClosed message. This prevents message signature clashes.

This commit is contained in:
John Scipione
2012-11-12 23:57:27 -05:00
parent 3fdab58446
commit 12a9a71db6
6 changed files with 38 additions and 20 deletions
+8 -4
View File
@@ -270,6 +270,13 @@ CalcView::MessageReceived(BMessage* message)
// (replicant) about box requested
case B_ABOUT_REQUESTED:
{
bool quit = false;
if (message->FindBool("quit", &quit) == B_OK && quit) {
fAboutWindow = NULL;
break;
}
if (fAboutWindow == NULL) {
// create the about window
const char* extraCopyrights[] = {
@@ -285,10 +292,7 @@ CalcView::MessageReceived(BMessage* message)
fAboutWindow->Activate();
break;
case kAboutWindowClosed:
fAboutWindow = NULL;
break;
}
case MSG_UNFLASH_KEY:
{