From 26e058b7622953fe11419993a2f8f96380ea7a3b Mon Sep 17 00:00:00 2001
From: Freeman Lou <freemanlou2430@Yahoo.com>
Date: Sun, 1 Dec 2013 16:26:47 +0000
Subject: [PATCH] activity monitor settings
---
src/apps/activitymonitor/ActivityWindow.cpp | 2 +-
src/apps/activitymonitor/SettingsWindow.cpp | 3 ++-
src/apps/activitymonitor/SettingsWindow.h | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/apps/activitymonitor/ActivityWindow.cpp b/src/apps/activitymonitor/ActivityWindow.cpp
index f635ec6..622a373 100644
a
|
b
|
ActivityWindow::MessageReceived(BMessage* message)
|
201 | 201 | fSettingsWindow.SendMessage(&toFront); |
202 | 202 | } else { |
203 | 203 | // Open new settings window |
204 | | BWindow* window = new SettingsWindow(this); |
| 204 | BWindow* window = new SettingsWindow(this,fAlwaysOnTop); |
205 | 205 | window->Show(); |
206 | 206 | |
207 | 207 | fSettingsWindow = window; |
diff --git a/src/apps/activitymonitor/SettingsWindow.cpp b/src/apps/activitymonitor/SettingsWindow.cpp
index 1fbed5f..ee043d4 100644
a
|
b
|
private:
|
88 | 88 | // #pragma mark - |
89 | 89 | |
90 | 90 | |
91 | | SettingsWindow::SettingsWindow(ActivityWindow* target) |
| 91 | SettingsWindow::SettingsWindow(ActivityWindow* target, bool OnTop) |
92 | 92 | : BWindow(_RelativeTo(target), |
93 | 93 | B_TRANSLATE_CONTEXT("Settings", "ActivityWindow"), B_FLOATING_WINDOW, |
94 | 94 | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS), |
… |
… |
SettingsWindow::SettingsWindow(ActivityWindow* target)
|
105 | 105 | .Add(fIntervalSlider) |
106 | 106 | .SetInsets(10, 10, 10, 10) |
107 | 107 | ); |
| 108 | SetFeel(OnTop ? B_MODAL_ALL_WINDOW_FEEL : B_NORMAL_WINDOW_FEEL); |
108 | 109 | } |
109 | 110 | |
110 | 111 | |
diff --git a/src/apps/activitymonitor/SettingsWindow.h b/src/apps/activitymonitor/SettingsWindow.h
index a057870..82195bc 100644
a
|
b
|
class IntervalSlider;
|
15 | 15 | |
16 | 16 | class SettingsWindow : public BWindow { |
17 | 17 | public: |
18 | | SettingsWindow(ActivityWindow* target); |
| 18 | SettingsWindow(ActivityWindow* target, bool OnTop); |
19 | 19 | virtual ~SettingsWindow(); |
20 | 20 | |
21 | 21 | virtual void MessageReceived(BMessage* message); |