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
14bd77c5
Commit
14bd77c5
authored
Feb 03, 2015
by
Hisham Muhammad
Browse files
Add longer descriptions to available meters.
parent
f5f29cee
Changes
6
Hide whitespace changes
Inline
Side-by-side
AvailableMetersPanel.c
View file @
14bd77c5
...
...
@@ -104,7 +104,8 @@ AvailableMetersPanel* AvailableMetersPanel_new(Settings* settings, Header* heade
for
(
int
i
=
1
;
Platform_meterTypes
[
i
];
i
++
)
{
MeterClass
*
type
=
Platform_meterTypes
[
i
];
if
(
type
!=
&
CPUMeter_class
)
{
Panel_add
(
super
,
(
Object
*
)
ListItem_new
(
type
->
uiName
,
i
<<
16
));
const
char
*
label
=
type
->
description
?
type
->
description
:
type
->
uiName
;
Panel_add
(
super
,
(
Object
*
)
ListItem_new
(
label
,
i
<<
16
));
}
}
MeterClass
*
type
=
&
CPUMeter_class
;
...
...
CPUMeter.c
View file @
14bd77c5
...
...
@@ -222,6 +222,7 @@ MeterClass AllCPUsMeter_class = {
.
attributes
=
CPUMeter_attributes
,
.
name
=
"AllCPUs"
,
.
uiName
=
"CPUs (1/1)"
,
.
description
=
"CPUs (1/1): all CPUs"
,
.
caption
=
"CPU"
,
.
draw
=
SingleColCPUsMeter_draw
,
.
init
=
AllCPUsMeter_init
,
...
...
@@ -240,6 +241,7 @@ MeterClass AllCPUs2Meter_class = {
.
attributes
=
CPUMeter_attributes
,
.
name
=
"AllCPUs2"
,
.
uiName
=
"CPUs (1&2/2)"
,
.
description
=
"CPUs (1&2/2): all CPUs in 2 shorter columns"
,
.
caption
=
"CPU"
,
.
draw
=
DualColCPUsMeter_draw
,
.
init
=
AllCPUsMeter_init
,
...
...
@@ -258,6 +260,7 @@ MeterClass LeftCPUsMeter_class = {
.
attributes
=
CPUMeter_attributes
,
.
name
=
"LeftCPUs"
,
.
uiName
=
"CPUs (1/2)"
,
.
description
=
"CPUs (1/2): first half of list"
,
.
caption
=
"CPU"
,
.
draw
=
SingleColCPUsMeter_draw
,
.
init
=
AllCPUsMeter_init
,
...
...
@@ -276,6 +279,7 @@ MeterClass RightCPUsMeter_class = {
.
attributes
=
CPUMeter_attributes
,
.
name
=
"RightCPUs"
,
.
uiName
=
"CPUs (2/2)"
,
.
description
=
"CPUs (2/2): second half of list"
,
.
caption
=
"CPU"
,
.
draw
=
SingleColCPUsMeter_draw
,
.
init
=
AllCPUsMeter_init
,
...
...
@@ -293,6 +297,7 @@ MeterClass LeftCPUs2Meter_class = {
.
total
=
100
.
0
,
.
attributes
=
CPUMeter_attributes
,
.
name
=
"LeftCPUs2"
,
.
description
=
"CPUs (1&2/4): first half in 2 shorter columns"
,
.
uiName
=
"CPUs (1&2/4)"
,
.
caption
=
"CPU"
,
.
draw
=
DualColCPUsMeter_draw
,
...
...
@@ -312,6 +317,7 @@ MeterClass RightCPUs2Meter_class = {
.
attributes
=
CPUMeter_attributes
,
.
name
=
"RightCPUs2"
,
.
uiName
=
"CPUs (3&4/4)"
,
.
description
=
"CPUs (3&4/4): second half in 2 shorter columns"
,
.
caption
=
"CPU"
,
.
draw
=
DualColCPUsMeter_draw
,
.
init
=
AllCPUsMeter_init
,
...
...
LoadAverageMeter.c
View file @
14bd77c5
...
...
@@ -65,6 +65,7 @@ MeterClass LoadAverageMeter_class = {
.
attributes
=
LoadAverageMeter_attributes
,
.
name
=
"LoadAverage"
,
.
uiName
=
"Load average"
,
.
description
=
"Load averages: 15 minutes, 5 minutes, 1 minute"
,
.
caption
=
"Load average: "
};
...
...
@@ -80,5 +81,6 @@ MeterClass LoadMeter_class = {
.
attributes
=
LoadMeter_attributes
,
.
name
=
"Load"
,
.
uiName
=
"Load"
,
.
description
=
"Load: average of ready processes in the last minute"
,
.
caption
=
"Load: "
};
MemoryMeter.c
View file @
14bd77c5
...
...
@@ -62,7 +62,7 @@ MeterClass MemoryMeter_class = {
.
maxItems
=
3
,
.
total
=
100
.
0
,
.
attributes
=
MemoryMeter_attributes
,
"Memory"
,
"Memory"
,
"Mem"
.
name
=
"Memory"
,
.
uiName
=
"Memory"
,
.
caption
=
"Mem"
};
Meter.c
View file @
14bd77c5
...
...
@@ -51,6 +51,7 @@ typedef struct MeterClass_ {
const char* name;
const char* uiName;
const char* caption;
const char* description;
const char maxItems;
char curItems;
} MeterClass;
...
...
Meter.h
View file @
14bd77c5
...
...
@@ -38,6 +38,7 @@ typedef struct MeterClass_ {
const
char
*
name
;
const
char
*
uiName
;
const
char
*
caption
;
const
char
*
description
;
const
char
maxItems
;
char
curItems
;
}
MeterClass
;
...
...
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