From fd19c7366df2134106131c370c99c3ed7f38757f Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Tue, 30 Apr 2013 21:50:24 +0200 Subject: [PATCH] Fix BAboutWindow lifecycle BAboutWindow returned false in QuitRequested in order to hide instead of closing. Not only this keeps a BLooper running for a rarely used window, but it also prevents quitting an application in the window was not destroyed first. * Remove aforementioned QuitRequested method, * Add a static GetWindow method that returns the existing about window, if there is one, or creates one if there is not. A boolean can be set to tell the caller what happened, * Adjust all callers to use that new method, instead of managing the window themselves. --- headers/private/shared/AboutWindow.h | 7 ++-- src/apps/activitymonitor/ActivityView.cpp | 28 +++++++-------- src/apps/activitymonitor/ActivityView.h | 3 -- src/apps/deskcalc/CalcView.cpp | 30 ++++++++-------- src/apps/deskcalc/CalcView.h | 4 --- src/apps/networkstatus/NetworkStatusView.cpp | 26 +++++++------- src/apps/networkstatus/NetworkStatusView.h | 2 -- src/apps/powerstatus/PowerStatusView.cpp | 29 +++++++-------- src/apps/powerstatus/PowerStatusView.h | 2 -- .../processcontroller/ProcessController.cpp | 27 +++++++------- .../processcontroller/ProcessController.h | 2 -- src/apps/webpositive/BrowserApp.cpp | 28 +++++++-------- src/apps/webpositive/BrowserApp.h | 3 -- src/apps/workspaces/Workspaces.cpp | 33 ++++++++--------- src/kits/shared/AboutWindow.cpp | 35 +++++++++++++------ src/preferences/locale/LocalePreflet.cpp | 31 ++++++++-------- 16 files changed, 135 insertions(+), 155 deletions(-) diff --git a/headers/private/shared/AboutWindow.h b/headers/private/shared/AboutWindow.h index 16a9f429c2..55829c03e4 100644 --- a/headers/private/shared/AboutWindow.h +++ b/headers/private/shared/AboutWindow.h @@ -18,7 +18,6 @@ class AboutView; class BBitmap; class BPoint; -class BHandler; class BAboutWindow : public BWindow { public: @@ -26,7 +25,6 @@ class BAboutWindow : public BWindow { const char* signature); virtual ~BAboutWindow(); - virtual bool QuitRequested(); virtual void Show(); BPoint AboutPosition(float width, float height); @@ -48,9 +46,12 @@ class BAboutWindow : public BWindow { const char* Version(); void SetVersion(const char* version); + static BAboutWindow* GetWindow(const char* appName, + const char* signature, bool* needsInit = NULL); private: AboutView* fAboutView; - BHandler* fCaller; + + static BAboutWindow* sAboutWindow; }; #endif // B_ABOUT_WINDOW_H diff --git a/src/apps/activitymonitor/ActivityView.cpp b/src/apps/activitymonitor/ActivityView.cpp index ad6e5cd3a7..19f4f48d7f 100644 --- a/src/apps/activitymonitor/ActivityView.cpp +++ b/src/apps/activitymonitor/ActivityView.cpp @@ -600,10 +600,6 @@ ActivityView::~ActivityView() { delete fOffscreen; delete fSystemInfoHandler; - - // replicant deleted, destroy the about window - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } @@ -647,8 +643,6 @@ ActivityView::_Init(const BMessage* settings) const char* name; for (int32 i = 0; settings->FindString("source", i, &name) == B_OK; i++) AddDataSource(DataSource::FindSource(name), settings); - - fAboutWindow = NULL; } @@ -1112,22 +1106,26 @@ ActivityView::MessageReceived(BMessage* message) switch (message->what) { case B_ABOUT_REQUESTED: - if (fAboutWindow == NULL) { + { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow(kAppName, kSignature, + &needsInit); + if (needsInit) { const char* authors[] = { "Axel Dörfler", NULL }; - fAboutWindow = new BAboutWindow(kAppName, kSignature); - fAboutWindow->AddCopyright(2008, "Haiku, Inc."); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2008, "Haiku, Inc."); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); break; + } case kMsgUpdateResolution: { diff --git a/src/apps/activitymonitor/ActivityView.h b/src/apps/activitymonitor/ActivityView.h index 0e1ccf6520..17ac4f89d1 100644 --- a/src/apps/activitymonitor/ActivityView.h +++ b/src/apps/activitymonitor/ActivityView.h @@ -17,7 +17,6 @@ #include "DataSource.h" -class BAboutWindow; class BBitmap; class BMessageRunner; class Scale; @@ -146,8 +145,6 @@ private: int32 fOriginalResolution; SystemInfoHandler* fSystemInfoHandler; std::map fScales; - - BAboutWindow* fAboutWindow; }; #endif // ACTIVITY_VIEW_H diff --git a/src/apps/deskcalc/CalcView.cpp b/src/apps/deskcalc/CalcView.cpp index db300550c3..8af748eaec 100644 --- a/src/apps/deskcalc/CalcView.cpp +++ b/src/apps/deskcalc/CalcView.cpp @@ -183,10 +183,6 @@ CalcView::~CalcView() delete fKeypad; delete fOptions; free(fKeypadDescription); - - // replicant deleted, destroy the about window - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } @@ -270,7 +266,12 @@ CalcView::MessageReceived(BMessage* message) // (replicant) about box requested case B_ABOUT_REQUESTED: - if (fAboutWindow == NULL) { + { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow(kAppName, + kSignature, &needsInit); + + if (needsInit) { // create the about window const char* extraCopyrights[] = { "1997, 1998 R3 Software Ltd.", @@ -285,17 +286,16 @@ CalcView::MessageReceived(BMessage* message) NULL }; - fAboutWindow = new BAboutWindow(kAppName, kSignature); - fAboutWindow->AddCopyright(2006, "Haiku, Inc.", - extraCopyrights); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2006, "Haiku, Inc.", extraCopyrights); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); break; + } case MSG_UNFLASH_KEY: { @@ -1006,8 +1006,6 @@ CalcView::_Init(BMessage* settings) // fetch the calc icon for compact view _FetchAppIcon(fCalcIcon); - - fAboutWindow = NULL; } diff --git a/src/apps/deskcalc/CalcView.h b/src/apps/deskcalc/CalcView.h index 446d44dfd9..1dd1cff296 100644 --- a/src/apps/deskcalc/CalcView.h +++ b/src/apps/deskcalc/CalcView.h @@ -31,7 +31,6 @@ static const float kMaximumWidthBasic = 400.0f; static const float kMinimumHeightBasic = 130.0f; static const float kMaximumHeightBasic = 400.0f; -class BAboutWindow; class BString; class BMenuItem; class BMessage; @@ -161,9 +160,6 @@ class CalcView : public BView { // calculator options. CalcOptions* fOptions; - - // about window for replicant - BAboutWindow* fAboutWindow; }; #endif // _CALC_VIEW_H diff --git a/src/apps/networkstatus/NetworkStatusView.cpp b/src/apps/networkstatus/NetworkStatusView.cpp index 8738aace42..faef66b63c 100644 --- a/src/apps/networkstatus/NetworkStatusView.cpp +++ b/src/apps/networkstatus/NetworkStatusView.cpp @@ -139,16 +139,12 @@ NetworkStatusView::NetworkStatusView(BMessage* archive) NetworkStatusView::~NetworkStatusView() { - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } void NetworkStatusView::_Init() { - fAboutWindow = NULL; - for (int i = 0; i < kStatusCount; i++) { fTrayIcons[i] = NULL; fNotifyIcons[i] = NULL; @@ -508,22 +504,24 @@ NetworkStatusView::MouseDown(BPoint point) void NetworkStatusView::_AboutRequested() { - if (fAboutWindow == NULL) { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow( + B_TRANSLATE_SYSTEM_NAME("NetworkStatus"), kSignature, &needsInit); + + if (needsInit) { const char* authors[] = { "Axel Dörfler", "Hugo Santos", NULL }; - fAboutWindow = new BAboutWindow( - B_TRANSLATE_SYSTEM_NAME("NetworkStatus"), kSignature); - fAboutWindow->AddCopyright(2007, "Haiku, Inc."); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2007, "Haiku, Inc."); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); } diff --git a/src/apps/networkstatus/NetworkStatusView.h b/src/apps/networkstatus/NetworkStatusView.h index 53e6b3ab37..543bdcf6f0 100644 --- a/src/apps/networkstatus/NetworkStatusView.h +++ b/src/apps/networkstatus/NetworkStatusView.h @@ -17,7 +17,6 @@ #include -class BAboutWindow; class BMessageRunner; class BNetworkInterface; @@ -66,7 +65,6 @@ class NetworkStatusView : public BView { std::map fInterfaceStatuses; - BAboutWindow* fAboutWindow; bool fInDeskbar; BBitmap* fTrayIcons[kStatusCount]; BBitmap* fNotifyIcons[kStatusCount]; diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp index d8c23bae59..9ea6aeb870 100644 --- a/src/apps/powerstatus/PowerStatusView.cpp +++ b/src/apps/powerstatus/PowerStatusView.cpp @@ -77,8 +77,6 @@ PowerStatusView::PowerStatusView(BMessage* archive) PowerStatusView::~PowerStatusView() { - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } @@ -98,8 +96,6 @@ PowerStatusView::_Init() { SetViewColor(B_TRANSPARENT_COLOR); - fAboutWindow = NULL; - fShowLabel = true; fShowTime = false; fShowStatusIcon = true; @@ -514,9 +510,6 @@ PowerStatusReplicant::~PowerStatusReplicant() fDriverInterface->Disconnect(); fDriverInterface->ReleaseReference(); - if (fAboutWindow != NULL) - fAboutWindow->Quit(); - _SaveSettings(); } @@ -627,7 +620,11 @@ PowerStatusReplicant::MouseDown(BPoint point) void PowerStatusReplicant::_AboutRequested() { - if (fAboutWindow == NULL) { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow( + B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature, &needsInit); + + if (needsInit) { const char* authors[] = { "Axel Dörfler", "Alexander von Gluck", @@ -635,15 +632,13 @@ PowerStatusReplicant::_AboutRequested() NULL }; - fAboutWindow = new BAboutWindow( - B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature); - fAboutWindow->AddCopyright(2006, "Haiku, Inc."); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2006, "Haiku, Inc."); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); } diff --git a/src/apps/powerstatus/PowerStatusView.h b/src/apps/powerstatus/PowerStatusView.h index 6661b47504..837bb2d3e1 100644 --- a/src/apps/powerstatus/PowerStatusView.h +++ b/src/apps/powerstatus/PowerStatusView.h @@ -15,7 +15,6 @@ #include "DriverInterface.h" -class BAboutWindow; class BFile; @@ -54,7 +53,6 @@ private: protected: PowerStatusDriverInterface* fDriverInterface; - BAboutWindow* fAboutWindow; bool fShowLabel; bool fShowTime; diff --git a/src/apps/processcontroller/ProcessController.cpp b/src/apps/processcontroller/ProcessController.cpp index 5a4b2ff8e0..b7fe26e24e 100644 --- a/src/apps/processcontroller/ProcessController.cpp +++ b/src/apps/processcontroller/ProcessController.cpp @@ -204,10 +204,6 @@ ProcessController::~ProcessController() delete fMessageRunner; gPCView = NULL; - - // replicant deleted, destroy the about window - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } @@ -221,7 +217,6 @@ ProcessController::Init() memset(fCPUTimes, 0, sizeof(fCPUTimes)); memset(fPrevActive, 0, sizeof(fPrevActive)); fPrevTime = 0; - fAboutWindow = NULL; } @@ -438,7 +433,11 @@ ProcessController::MessageReceived(BMessage *message) void ProcessController::AboutRequested() { - if (fAboutWindow == NULL) { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow( + B_TRANSLATE_SYSTEM_NAME("ProcessController"), kSignature, &needsInit); + + if (needsInit) { const char* extraCopyrights[] = { "2004 beunited.org", "1997-2001 Georges-Edouard Berenger", @@ -450,15 +449,13 @@ ProcessController::AboutRequested() NULL }; - fAboutWindow = new BAboutWindow( - B_TRANSLATE_SYSTEM_NAME("ProcessController"), kSignature); - fAboutWindow->AddCopyright(2007, "Haiku, Inc.", extraCopyrights); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2007, "Haiku, Inc.", extraCopyrights); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); } diff --git a/src/apps/processcontroller/ProcessController.h b/src/apps/processcontroller/ProcessController.h index 78d1212741..f51142784d 100644 --- a/src/apps/processcontroller/ProcessController.h +++ b/src/apps/processcontroller/ProcessController.h @@ -26,7 +26,6 @@ #include -class BAboutWindow; class BMessageRunner; class ThreadBarMenu; @@ -60,7 +59,6 @@ class ProcessController : public BView { private: void Init(); - BAboutWindow* fAboutWindow; bool fTemp; float fMemoryUsage; float fLastBarHeight[B_MAX_CPU_COUNT]; diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index fe99ec9e5f..cc1b35b0fa 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -77,7 +77,6 @@ BrowserApp::BrowserApp() fCookieJar(NULL), fDownloadWindow(NULL), fSettingsWindow(NULL), - fAboutWindow(NULL) { } @@ -88,16 +87,17 @@ BrowserApp::~BrowserApp() delete fSettings; delete fCookies; delete fCookieJar; - - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } void BrowserApp::AboutRequested() { - if (fAboutWindow == NULL) { + bool needsInit; + BAboutWindow window = BAboutWindow::GetWindow(kApplicationName, + kApplicationSignature, &needsInit); + + if (needsInit) { // create the about window const char* authors[] = { @@ -117,16 +117,14 @@ BrowserApp::AboutRequested() aboutText << "\nWebKit " << WebKitInfo::WebKitVersion(); aboutText << " (" << WebKitInfo::WebKitRevision() << ")"; - fAboutWindow = new BAboutWindow(kApplicationName, - kApplicationSignature); - fAboutWindow->AddCopyright(2007, "Haiku, Inc."); - fAboutWindow->AddAuthors(authors); - fAboutWindow->AddExtraInfo(aboutText.String()); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddCopyright(2007, "Haiku, Inc."); + window->AddAuthors(authors); + window->AddExtraInfo(aboutText.String()); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); } diff --git a/src/apps/webpositive/BrowserApp.h b/src/apps/webpositive/BrowserApp.h index 19e4860969..2836627eb3 100644 --- a/src/apps/webpositive/BrowserApp.h +++ b/src/apps/webpositive/BrowserApp.h @@ -34,7 +34,6 @@ #include -class BAboutWindow; class BNetworkCookieJar; class DownloadWindow; class BrowserWindow; @@ -79,8 +78,6 @@ private: DownloadWindow* fDownloadWindow; SettingsWindow* fSettingsWindow; - - BAboutWindow* fAboutWindow; }; diff --git a/src/apps/workspaces/Workspaces.cpp b/src/apps/workspaces/Workspaces.cpp index 3dd2af7b0a..3f87647c3c 100644 --- a/src/apps/workspaces/Workspaces.cpp +++ b/src/apps/workspaces/Workspaces.cpp @@ -119,7 +119,6 @@ class WorkspacesView : public BView { BView* fParentWhichDrawsOnChildren; BRect fCurrentFrame; - BAboutWindow* fAboutWindow; }; class WorkspacesWindow : public BWindow { @@ -342,8 +341,7 @@ WorkspacesView::WorkspacesView(BRect frame, bool showDragger=true) BView(frame, kDeskbarItemName, B_FOLLOW_ALL, kWorkspacesViewFlag | B_FRAME_EVENTS), fParentWhichDrawsOnChildren(NULL), - fCurrentFrame(frame), - fAboutWindow(NULL) + fCurrentFrame(frame) { if(showDragger) { frame.OffsetTo(B_ORIGIN); @@ -360,8 +358,7 @@ WorkspacesView::WorkspacesView(BMessage* archive) : BView(archive), fParentWhichDrawsOnChildren(NULL), - fCurrentFrame(Frame()), - fAboutWindow(NULL) + fCurrentFrame(Frame()) { // Just in case we are instantiated from an older archive... SetFlags(Flags() | B_FRAME_EVENTS); @@ -374,8 +371,6 @@ WorkspacesView::WorkspacesView(BMessage* archive) WorkspacesView::~WorkspacesView() { - if (fAboutWindow != NULL && fAboutWindow->Lock()) - fAboutWindow->Quit(); } @@ -405,7 +400,11 @@ WorkspacesView::Archive(BMessage* archive, bool deep) const void WorkspacesView::_AboutRequested() { - if (fAboutWindow == NULL) { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow( + B_TRANSLATE_SYSTEM_NAME("Workspaces"), kSignature, &needsInit); + + if (needsInit) { const char* authors[] = { "Axel Dörfler", "Oliver \"Madison\" Kohl", @@ -422,17 +421,15 @@ WorkspacesView::_AboutRequested() const char* extraInfo = "Send windows behind using the Option key. " "Move windows to front using the Control key.\n"; - fAboutWindow = new BAboutWindow( - B_TRANSLATE_SYSTEM_NAME("Workspaces"), kSignature); - fAboutWindow->AddCopyright(2002, "Haiku, Inc.", + window->AddCopyright(2002, "Haiku, Inc.", extraCopyrights); - fAboutWindow->AddAuthors(authors); - fAboutWindow->AddExtraInfo(extraInfo); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window->AddAuthors(authors); + window->AddExtraInfo(extraInfo); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); } diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp index 81e5139589..f2d6d50e5c 100644 --- a/src/kits/shared/AboutWindow.cpp +++ b/src/kits/shared/AboutWindow.cpp @@ -356,13 +356,15 @@ BAboutWindow::BAboutWindow(const char* appName, const char* signature) B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE) { + sAboutWindow = this; + SetLayout(new BGroupLayout(B_VERTICAL)); - const char* about = B_TRANSLATE_MARK("About"); + const char* about = B_TRANSLATE_MARK("About %app%"); about = gSystemCatalog.GetString(about, "AboutWindow"); BString title(about); - title << " " << appName; + title.ReplaceFirst("%app%", appName); SetTitle(title.String()); fAboutView = new AboutView(appName, signature); @@ -374,6 +376,8 @@ BAboutWindow::BAboutWindow(const char* appName, const char* signature) BAboutWindow::~BAboutWindow() { + sAboutWindow = NULL; + fAboutView->RemoveSelf(); delete fAboutView; fAboutView = NULL; @@ -383,15 +387,6 @@ BAboutWindow::~BAboutWindow() // #pragma mark - BAboutWindow virtual methods -bool -BAboutWindow::QuitRequested() -{ - Hide(); - - return false; -} - - void BAboutWindow::Show() { @@ -617,3 +612,21 @@ BAboutWindow::SetIcon(BBitmap* icon) { fAboutView->SetIcon(icon); } + +/* static */ BAboutWindow* +BAboutWindow::GetWindow(const char* appName, const char* signature, + bool* needsInit) +{ + if(needsInit != NULL) + *needsInit = (sAboutWindow == NULL); + + if(sAboutWindow == NULL) { + new BAboutWindow(appName, signature); + } + + return sAboutWindow; +} + + +/* static */ BAboutWindow* +BAboutWindow::sAboutWindow = NULL; diff --git a/src/preferences/locale/LocalePreflet.cpp b/src/preferences/locale/LocalePreflet.cpp index 65eb3003f1..39768898a4 100644 --- a/src/preferences/locale/LocalePreflet.cpp +++ b/src/preferences/locale/LocalePreflet.cpp @@ -36,7 +36,6 @@ private: status_t _RestartApp(const char* signature) const; LocaleWindow* fLocaleWindow; - BAboutWindow* fAboutWindow; }; @@ -46,8 +45,7 @@ private: LocalePreflet::LocalePreflet() : BApplication(kSignature), - fLocaleWindow(new LocaleWindow()), - fAboutWindow(NULL) + fLocaleWindow(new LocaleWindow()) { fLocaleWindow->Show(); } @@ -55,9 +53,6 @@ LocalePreflet::LocalePreflet() LocalePreflet::~LocalePreflet() { - // replicant deleted, destroy the about window - if (fAboutWindow != NULL) - fAboutWindow->Quit(); } @@ -78,7 +73,12 @@ LocalePreflet::MessageReceived(BMessage* message) break; case B_ABOUT_REQUESTED: - if (fAboutWindow == NULL) { + { + bool needsInit; + BAboutWindow* window = BAboutWindow::GetWindow(kAppName, + kSignature, &needsInit); + + if (needsInit) { const char* authors[] = { "Axel Dörfler", "Adrien Destugues", @@ -86,16 +86,17 @@ LocalePreflet::MessageReceived(BMessage* message) NULL }; - fAboutWindow = new BAboutWindow(kAppName, kSignature); - fAboutWindow->AddCopyright(2005, "Haiku, Inc."); - fAboutWindow->AddAuthors(authors); - fAboutWindow->Show(); - } else if (fAboutWindow->IsHidden()) - fAboutWindow->Show(); - else - fAboutWindow->Activate(); + window = new BAboutWindow(kAppName, kSignature); + window->AddCopyright(2005, "Haiku, Inc."); + window->AddAuthors(authors); + } + + if (window->IsHidden()) + window->Show(); + window->Activate(); break; + } default: BApplication::MessageReceived(message);