From eee6f40b8bc0f5ced0d141628559625bb51b881f Mon Sep 17 00:00:00 2001 From: Alexandre Deckner Date: Mon, 6 Apr 2009 20:30:21 +0000 Subject: [PATCH] * Archive/Unarchive refresh interval * Minor style fix git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29976 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/activitymonitor/ActivityView.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/apps/activitymonitor/ActivityView.cpp b/src/apps/activitymonitor/ActivityView.cpp index fddf1fc3c6..c82eb31b7c 100644 --- a/src/apps/activitymonitor/ActivityView.cpp +++ b/src/apps/activitymonitor/ActivityView.cpp @@ -555,7 +555,7 @@ ActivityView::ActivityView(const char* name, const BMessage* settings) #ifdef __HAIKU__ : BView(name, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS), #else - : BView(BRect(0,0,300,200), name, B_FOLLOW_NONE, + : BView(BRect(0, 0, 300, 200), name, B_FOLLOW_NONE, B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_FRAME_EVENTS), #endif fSourcesLock("data sources") @@ -600,13 +600,16 @@ ActivityView::_Init(const BMessage* settings) #endif SetViewColor(B_TRANSPARENT_COLOR); - fRefreshInterval = kInitialRefreshInterval; fLastRefresh = 0; fDrawResolution = 1; fZooming = false; fSystemInfoHandler = new SystemInfoHandler; + if (settings == NULL + || settings->FindInt64("refresh interval", &fRefreshInterval) != B_OK) + fRefreshInterval = kInitialRefreshInterval; + if (settings == NULL || settings->FindBool("show legend", &fShowLegend) != B_OK) fShowLegend = true; @@ -666,6 +669,10 @@ ActivityView::SaveState(BMessage& state) const if (status != B_OK) return status; + status = state.AddInt64("refresh interval", fRefreshInterval); + if (status != B_OK) + return status; + status = state.AddData("history background color", B_RGB_COLOR_TYPE, &fHistoryBackgroundColor, sizeof(rgb_color)); if (status != B_OK)