[haiku-commits] haiku: hrev46477 - src/apps/activitymonitor

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 2 Dec 2013 19:42:29 +0100 (CET)

hrev46477 adds 1 changeset to branch 'master'
old head: 89e0a7fb849124f2cb25a80410de15ba2f43eb38
new head: 2031159e73cc6506c6a60f4caec806b852a69e20
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=2031159+%5E89e0a7f

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

2031159: ActivityMonitor: completes hrev46476
  
  * set the settings window feel to modal when going always on top.
  * fix the settings window activation when already opened.

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

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

Revision:    hrev46477
Commit:      2031159e73cc6506c6a60f4caec806b852a69e20
URL:         http://cgit.haiku-os.org/haiku/commit/?id=2031159
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Mon Dec  2 18:40:29 2013 UTC

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

1 file changed, 8 insertions(+), 3 deletions(-)
src/apps/activitymonitor/ActivityWindow.cpp | 11 ++++++++---

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

diff --git a/src/apps/activitymonitor/ActivityWindow.cpp 
b/src/apps/activitymonitor/ActivityWindow.cpp
index 1a3d07f..449c775 100644
--- a/src/apps/activitymonitor/ActivityWindow.cpp
+++ b/src/apps/activitymonitor/ActivityWindow.cpp
@@ -196,7 +196,6 @@ ActivityWindow::MessageReceived(BMessage* message)
                                // Just bring the window to front (via 
scripting)
                                BMessage toFront(B_SET_PROPERTY);
                                toFront.AddSpecifier("Active");
-                               toFront.AddSpecifier("Window", 
B_TRANSLATE("Settings"));
                                toFront.AddBool("data", true);
                                fSettingsWindow.SendMessage(&toFront);
                        } else {
@@ -256,7 +255,7 @@ ActivityWindow::ActivityViewAt(int32 index) const
 bool
 ActivityWindow::IsAlwaysOnTop() const
 {
-       return fAlwaysOnTop->IsMarked();        
+       return fAlwaysOnTop->IsMarked();
 }
 
 
@@ -399,5 +398,11 @@ ActivityWindow::_SetAlwaysOnTop(bool alwaysOnTop)
 {
        SetFeel(alwaysOnTop ? B_FLOATING_ALL_WINDOW_FEEL : 
B_NORMAL_WINDOW_FEEL);
        fAlwaysOnTop->SetMarked(alwaysOnTop);
+       if (fSettingsWindow.IsValid() && alwaysOnTop) {
+               // Change the settings window feel to modal (via scripting)
+               BMessage toFront(B_SET_PROPERTY);
+               toFront.AddSpecifier("Feel");
+               toFront.AddInt32("data", B_MODAL_ALL_WINDOW_FEEL);
+               fSettingsWindow.SendMessage(&toFront);
+       }
 }
-


Other related posts:

  • » [haiku-commits] haiku: hrev46477 - src/apps/activitymonitor - korli