Commit 14bd77c5 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Add longer descriptions to available meters.

parent f5f29cee
......@@ -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;
......
......@@ -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,
......
......@@ -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: "
};
......@@ -62,7 +62,7 @@ MeterClass MemoryMeter_class = {
.maxItems = 3,
.total = 100.0,
.attributes = MemoryMeter_attributes,
"Memory",
"Memory",
"Mem"
.name = "Memory",
.uiName = "Memory",
.caption = "Mem"
};
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment