ActivityMonitor: Settings now modal when always on top enabled.

* #9534

Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
Freeman Lou
2013-12-02 17:39:01 +01:00
committed by Jérôme Duval
parent 043ffc015a
commit 89e0a7fb84
3 changed files with 10 additions and 1 deletions
@@ -253,6 +253,13 @@ ActivityWindow::ActivityViewAt(int32 index) const
}
bool
ActivityWindow::IsAlwaysOnTop() const
{
return fAlwaysOnTop->IsMarked();
}
void
ActivityWindow::BroadcastToActivityViews(BMessage* message, BView* exceptToView)
{
@@ -29,6 +29,7 @@ public:
BView* exceptToView = NULL);
bigtime_t RefreshInterval() const;
bool IsAlwaysOnTop() const;
private:
status_t _OpenSettings(BFile& file, uint32 mode);
+2 -1
View File
@@ -105,6 +105,8 @@ SettingsWindow::SettingsWindow(ActivityWindow* target)
.Add(fIntervalSlider)
.SetInsets(10, 10, 10, 10)
);
if (target->IsAlwaysOnTop())
SetFeel(B_MODAL_ALL_WINDOW_FEEL);
}
@@ -151,4 +153,3 @@ SettingsWindow::_RelativeTo(BWindow* window)
return BRect(frame.right - 150, frame.top + frame.Height() / 4,
frame.right + 200, frame.top + frame.Height() / 4 + 50);
}