Make BAboutWindow movable again.

Also fix build, forgot some files in previous commit.
This commit is contained in:
Adrien Destugues
2013-05-01 13:07:29 +02:00
parent 31535ac63b
commit df2257de36
3 changed files with 22 additions and 32 deletions
+2 -7
View File
@@ -1107,10 +1107,8 @@ ActivityView::MessageReceived(BMessage* message)
switch (message->what) { switch (message->what) {
case B_ABOUT_REQUESTED: case B_ABOUT_REQUESTED:
{ {
bool needsInit; BAboutWindow* window = new BAboutWindow(kAppName, kSignature);
BAboutWindow* window = BAboutWindow::GetWindow(kAppName, kSignature,
&needsInit);
if (needsInit) {
const char* authors[] = { const char* authors[] = {
"Axel Dörfler", "Axel Dörfler",
NULL NULL
@@ -1118,11 +1116,8 @@ ActivityView::MessageReceived(BMessage* message)
window->AddCopyright(2008, "Haiku, Inc."); window->AddCopyright(2008, "Haiku, Inc.");
window->AddAuthors(authors); window->AddAuthors(authors);
}
if (window->IsHidden())
window->Show(); window->Show();
window->Activate();
break; break;
} }
+2 -7
View File
@@ -620,11 +620,9 @@ PowerStatusReplicant::MouseDown(BPoint point)
void void
PowerStatusReplicant::_AboutRequested() PowerStatusReplicant::_AboutRequested()
{ {
bool needsInit; BAboutWindow* window = new BAboutWindow(
BAboutWindow* window = BAboutWindow::GetWindow( B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature);
B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature, &needsInit);
if (needsInit) {
const char* authors[] = { const char* authors[] = {
"Axel Dörfler", "Axel Dörfler",
"Alexander von Gluck", "Alexander von Gluck",
@@ -634,11 +632,8 @@ PowerStatusReplicant::_AboutRequested()
window->AddCopyright(2006, "Haiku, Inc."); window->AddCopyright(2006, "Haiku, Inc.");
window->AddAuthors(authors); window->AddAuthors(authors);
}
if (window->IsHidden())
window->Show(); window->Show();
window->Activate();
} }
+2 -2
View File
@@ -360,8 +360,8 @@ AboutView::SetIcon(BBitmap* icon)
BAboutWindow::BAboutWindow(const char* appName, const char* signature) BAboutWindow::BAboutWindow(const char* appName, const char* signature)
: BWindow(BRect(0.0, 0.0, 200.0, 200.0), appName, B_MODAL_WINDOW, : BWindow(BRect(0.0, 0.0, 200.0, 200.0), appName, B_MODAL_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_MOVABLE | B_NOT_ZOOMABLE B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE
| B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE) | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
{ {
SetLayout(new BGroupLayout(B_VERTICAL)); SetLayout(new BGroupLayout(B_VERTICAL));