Ticket #9534: 0001-activity-monitor-settings.patch

File 0001-activity-monitor-settings.patch, 2.2 KB (added by Freeman, 11 years ago)
  • src/apps/activitymonitor/ActivityWindow.cpp

    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)  
    201201                fSettingsWindow.SendMessage(&toFront);
    202202            } else {
    203203                // Open new settings window
    204                 BWindow* window = new SettingsWindow(this);
     204                BWindow* window = new SettingsWindow(this,fAlwaysOnTop);
    205205                window->Show();
    206206
    207207                fSettingsWindow = window;
  • src/apps/activitymonitor/SettingsWindow.cpp

    diff --git a/src/apps/activitymonitor/SettingsWindow.cpp b/src/apps/activitymonitor/SettingsWindow.cpp
    index 1fbed5f..ee043d4 100644
    a b private:  
    8888//  #pragma mark -
    8989
    9090
    91 SettingsWindow::SettingsWindow(ActivityWindow* target)
     91SettingsWindow::SettingsWindow(ActivityWindow* target, bool OnTop)
    9292    : BWindow(_RelativeTo(target),
    9393        B_TRANSLATE_CONTEXT("Settings", "ActivityWindow"), B_FLOATING_WINDOW,
    9494        B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS),
    SettingsWindow::SettingsWindow(ActivityWindow* target)  
    105105        .Add(fIntervalSlider)
    106106        .SetInsets(10, 10, 10, 10)
    107107    );
     108    SetFeel(OnTop ? B_MODAL_ALL_WINDOW_FEEL : B_NORMAL_WINDOW_FEEL);
    108109}
    109110
    110111
  • src/apps/activitymonitor/SettingsWindow.h

    diff --git a/src/apps/activitymonitor/SettingsWindow.h b/src/apps/activitymonitor/SettingsWindow.h
    index a057870..82195bc 100644
    a b class IntervalSlider;  
    1515
    1616class SettingsWindow : public BWindow {
    1717public:
    18                         SettingsWindow(ActivityWindow* target);
     18                        SettingsWindow(ActivityWindow* target, bool OnTop);
    1919    virtual             ~SettingsWindow();
    2020
    2121    virtual void        MessageReceived(BMessage* message);