* Fixed memory leak in CPUButton: the message runner was only deleted in the

destructor, but created everytime AttachedToWindow() was called.
* Minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16184 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-02-01 15:57:45 +00:00
parent a71c960755
commit 4ccfb08661
5 changed files with 181 additions and 86 deletions
+3 -3
View File
@@ -249,13 +249,13 @@ NormalPulseView::AttachedToWindow()
CalculateFontSize();
fPreviousTime = system_time();
BMessenger messenger(Window());
mode1->SetTarget(messenger);
mode2->SetTarget(messenger);
preferences->SetTarget(messenger);
about->SetTarget(messenger);
system_info sys_info;
get_system_info(&sys_info);
if (sys_info.cpu_count >= 2) {
@@ -273,7 +273,7 @@ NormalPulseView::UpdateColors(BMessage *message)
bool fade = message->FindBool("fade");
system_info sys_info;
get_system_info(&sys_info);
for (int x = 0; x < sys_info.cpu_count; x++) {
fProgressBars[x]->UpdateColors(color, fade);
fCpuButtons[x]->UpdateColors(color);