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
@@ -1112,6 +1112,13 @@ 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->AddCopyright(2008, "Haiku, Inc.");
@@ -1120,10 +1127,7 @@ ActivityView::MessageReceived(BMessage* message)
fAboutWindow->Activate();
break;
case kAboutWindowClosed:
fAboutWindow = NULL;
break;
}
case kMsgUpdateResolution:
{