hrev45344 adds 2 changesets to branch 'master' old head: c5469c39398f17b4e96ff71702788e0cfc72c0ec new head: b58ffb0b4af5504e251c09b30885823cd384fcd4 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=b58ffb0+%5Ec5469c3 ---------------------------------------------------------------------------- 6cf270f: Added "Always on top" menu to the ActivityMonitor. Signed-off-by: Matt Madia <mattmadia@xxxxxxxxx> [ Dancsó Róbert <dancso.robert@xxxxxxxxxxxxx> ] b58ffb0: Automatic whitespace cleanup. No functional change. [ Matt Madia <mattmadia@xxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 13 insertions(+) src/apps/activitymonitor/ActivityWindow.cpp | 11 +++++++++++ src/apps/activitymonitor/ActivityWindow.h | 2 ++ ############################################################################ Commit: 6cf270f88e7c79ef2fc4c31b76eb79f9085bb9ca URL: http://cgit.haiku-os.org/haiku/commit/?id=6cf270f Author: Dancsó Róbert <dancso.robert@xxxxxxxxxxxxx> Date: Sun Feb 10 18:42:36 2013 UTC Committer: Matt Madia <mattmadia@xxxxxxxxx> Commit-Date: Wed Mar 6 22:24:54 2013 UTC Added "Always on top" menu to the ActivityMonitor. Signed-off-by: Matt Madia <mattmadia@xxxxxxxxx> ---------------------------------------------------------------------------- diff --git a/src/apps/activitymonitor/ActivityWindow.cpp b/src/apps/activitymonitor/ActivityWindow.cpp index 1882891..ea1bd21 100644 --- a/src/apps/activitymonitor/ActivityWindow.cpp +++ b/src/apps/activitymonitor/ActivityWindow.cpp @@ -31,6 +31,7 @@ static const uint32 kMsgAddView = 'advw'; static const uint32 kMsgShowSettings = 'shst'; +static const uint32 kMsgAlwaysOnTop = 'alot'; ActivityWindow::ActivityWindow() @@ -131,6 +132,9 @@ ActivityWindow::ActivityWindow() menu = new BMenu(B_TRANSLATE("Settings")); menu->AddItem(new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS), new BMessage(kMsgShowSettings))); + menu->AddSeparatorItem(); + fAlwaysOnTop = new BMenuItem(B_TRANSLATE("Always on top"), new BMessage(kMsgAlwaysOnTop)); + menu->AddItem(fAlwaysOnTop); menu->SetTargetForItems(this); menuBar->AddItem(menu); } @@ -200,6 +204,13 @@ ActivityWindow::MessageReceived(BMessage* message) } break; } + + case kMsgAlwaysOnTop: + { + SetFeel(this->IsFloating() ? B_NORMAL_WINDOW_FEEL : B_FLOATING_ALL_WINDOW_FEEL); + fAlwaysOnTop->SetMarked(!fAlwaysOnTop->IsMarked()); + break; + } case kMsgTimeIntervalUpdated: BroadcastToActivityViews(message); diff --git a/src/apps/activitymonitor/ActivityWindow.h b/src/apps/activitymonitor/ActivityWindow.h index aa218af..e7a97d2 100644 --- a/src/apps/activitymonitor/ActivityWindow.h +++ b/src/apps/activitymonitor/ActivityWindow.h @@ -31,6 +31,8 @@ public: bigtime_t RefreshInterval() const; private: + BMenuItem* fAlwaysOnTop; + status_t _OpenSettings(BFile& file, uint32 mode); status_t _LoadSettings(BMessage& settings); status_t _SaveSettings(); ############################################################################ Revision: hrev45344 Commit: b58ffb0b4af5504e251c09b30885823cd384fcd4 URL: http://cgit.haiku-os.org/haiku/commit/?id=b58ffb0 Author: Matt Madia <mattmadia@xxxxxxxxx> Date: Wed Mar 6 22:25:32 2013 UTC Automatic whitespace cleanup. No functional change. ---------------------------------------------------------------------------- diff --git a/src/apps/activitymonitor/ActivityWindow.cpp b/src/apps/activitymonitor/ActivityWindow.cpp index ea1bd21..f74a907 100644 --- a/src/apps/activitymonitor/ActivityWindow.cpp +++ b/src/apps/activitymonitor/ActivityWindow.cpp @@ -204,7 +204,7 @@ ActivityWindow::MessageReceived(BMessage* message) } break; } - + case kMsgAlwaysOnTop: { SetFeel(this->IsFloating() ? B_NORMAL_WINDOW_FEEL : B_FLOATING_ALL_WINDOW_FEEL);