Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
c3d757f6
Commit
c3d757f6
authored
May 09, 2006
by
Hisham Muhammad
Browse files
Enable "All CPUs" option
parent
7d930a21
Changes
2
Hide whitespace changes
Inline
Side-by-side
AvailableMetersListBox.c
View file @
c3d757f6
...
...
@@ -37,7 +37,7 @@ AvailableMetersListBox* AvailableMetersListBox_new(Settings* settings, ListBox*
ListBox_setHeader
(
super
,
"Available meters"
);
for
(
int
i
=
1
;
Meter_types
[
i
];
i
++
)
{
MeterType
*
type
=
Meter_types
[
i
];
if
(
type
!=
&
CPUMeter
&&
type
!=
&
AllCPUsMeter
)
{
if
(
type
!=
&
CPUMeter
)
{
ListBox_add
(
super
,
(
Object
*
)
ListItem_new
(
type
->
uiName
,
i
<<
16
));
}
}
...
...
Meter.c
View file @
c3d757f6
...
...
@@ -219,7 +219,7 @@ inline static void Meter_displayToStringBuffer(Meter* this, char* buffer) {
}
void
Meter_setMode
(
Meter
*
this
,
int
modeIndex
)
{
if
(
modeIndex
==
this
->
mode
)
if
(
modeIndex
>
0
&&
modeIndex
==
this
->
mode
)
return
;
if
(
!
modeIndex
)
modeIndex
=
1
;
...
...
@@ -227,15 +227,14 @@ void Meter_setMode(Meter* this, int modeIndex) {
if
(
this
->
type
->
mode
==
0
)
{
this
->
draw
=
this
->
type
->
draw
;
}
else
{
if
(
modeIndex
>=
1
)
{
if
(
this
->
drawBuffer
)
free
(
this
->
drawBuffer
);
this
->
drawBuffer
=
NULL
;
MeterMode
*
mode
=
Meter_modes
[
modeIndex
];
this
->
draw
=
mode
->
draw
;
this
->
h
=
mode
->
h
;
}
assert
(
modeIndex
>=
1
);
if
(
this
->
drawBuffer
)
free
(
this
->
drawBuffer
);
this
->
drawBuffer
=
NULL
;
MeterMode
*
mode
=
Meter_modes
[
modeIndex
];
this
->
draw
=
mode
->
draw
;
this
->
h
=
mode
->
h
;
}
this
->
mode
=
modeIndex
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment