[haiku-commits] haiku: hrev45593 - in src: apps/powerstatus apps/activitymonitor kits/shared

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 1 May 2013 13:08:39 +0200 (CEST)

hrev45593 adds 1 changeset to branch 'master'
old head: 31535ac63b726cbcd1933c5fa429543eca4e7509
new head: df2257de36ed24b46ea52c5b301d9d3861297e1b
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=df2257d+%5E31535ac

----------------------------------------------------------------------------

df2257d: Make BAboutWindow movable again.
  
  Also fix build, forgot some files in previous commit.

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45593
Commit:      df2257de36ed24b46ea52c5b301d9d3861297e1b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=df2257d
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Wed May  1 11:05:56 2013 UTC

----------------------------------------------------------------------------

3 files changed, 25 insertions(+), 35 deletions(-)
src/apps/activitymonitor/ActivityView.cpp | 25 +++++++++------------
src/apps/powerstatus/PowerStatusView.cpp  | 31 +++++++++++----------------
src/kits/shared/AboutWindow.cpp           |  4 ++--

----------------------------------------------------------------------------

diff --git a/src/apps/activitymonitor/ActivityView.cpp 
b/src/apps/activitymonitor/ActivityView.cpp
index 19f4f48..f10bd84 100644
--- a/src/apps/activitymonitor/ActivityView.cpp
+++ b/src/apps/activitymonitor/ActivityView.cpp
@@ -1107,22 +1107,17 @@ ActivityView::MessageReceived(BMessage* message)
        switch (message->what) {
                case B_ABOUT_REQUESTED:
                {
-                       bool needsInit;
-                       BAboutWindow* window = 
BAboutWindow::GetWindow(kAppName, kSignature,
-                               &needsInit);
-                       if (needsInit) {
-                               const char* authors[] = {
-                                       "Axel Dörfler",
-                                       NULL
-                               };
-
-                               window->AddCopyright(2008, "Haiku, Inc.");
-                               window->AddAuthors(authors);
-                       }
+                       BAboutWindow* window = new BAboutWindow(kAppName, 
kSignature);
+
+                       const char* authors[] = {
+                               "Axel Dörfler",
+                               NULL
+                       };
+
+                       window->AddCopyright(2008, "Haiku, Inc.");
+                       window->AddAuthors(authors);
 
-                       if (window->IsHidden())
-                               window->Show();
-                       window->Activate();
+                       window->Show();
 
                        break;
                }
diff --git a/src/apps/powerstatus/PowerStatusView.cpp 
b/src/apps/powerstatus/PowerStatusView.cpp
index 9ea6aeb..62ef64e 100644
--- a/src/apps/powerstatus/PowerStatusView.cpp
+++ b/src/apps/powerstatus/PowerStatusView.cpp
@@ -620,25 +620,20 @@ PowerStatusReplicant::MouseDown(BPoint point)
 void
 PowerStatusReplicant::_AboutRequested()
 {
-       bool needsInit;
-       BAboutWindow* window = BAboutWindow::GetWindow(
-               B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature, &needsInit);
-
-       if (needsInit) {
-               const char* authors[] = {
-                       "Axel Dörfler",
-                       "Alexander von Gluck",
-                       "Clemens Zeidler",
-                       NULL
-               };
-
-               window->AddCopyright(2006, "Haiku, Inc.");
-               window->AddAuthors(authors);
-       }
+       BAboutWindow* window = new BAboutWindow(
+               B_TRANSLATE_SYSTEM_NAME("PowerStatus"), kSignature);
+
+       const char* authors[] = {
+               "Axel Dörfler",
+               "Alexander von Gluck",
+               "Clemens Zeidler",
+               NULL
+       };
+
+       window->AddCopyright(2006, "Haiku, Inc.");
+       window->AddAuthors(authors);
 
-       if (window->IsHidden())
-               window->Show();
-       window->Activate();
+       window->Show();
 }
 
 
diff --git a/src/kits/shared/AboutWindow.cpp b/src/kits/shared/AboutWindow.cpp
index 84d17ea..0b81b02 100644
--- a/src/kits/shared/AboutWindow.cpp
+++ b/src/kits/shared/AboutWindow.cpp
@@ -360,8 +360,8 @@ AboutView::SetIcon(BBitmap* icon)
 
 BAboutWindow::BAboutWindow(const char* appName, const char* signature)
        :       BWindow(BRect(0.0, 0.0, 200.0, 200.0), appName, B_MODAL_WINDOW,
-               B_ASYNCHRONOUS_CONTROLS | B_NOT_MOVABLE | B_NOT_ZOOMABLE
-                       | B_NOT_RESIZABLE | B_AUTO_UPDATE_SIZE_LIMITS | 
B_CLOSE_ON_ESCAPE)
+               B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_NOT_RESIZABLE 
+               | B_AUTO_UPDATE_SIZE_LIMITS | B_CLOSE_ON_ESCAPE)
 {
        SetLayout(new BGroupLayout(B_VERTICAL));
 


Other related posts:

  • » [haiku-commits] haiku: hrev45593 - in src: apps/powerstatus apps/activitymonitor kits/shared - pulkomandy