From 0bdade1b6cb40c5bd374a93ac0489058a7421bb5 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 2 May 2023 09:02:22 +1000 Subject: Introduce Machine class for host-specific info (split from ProcessList) First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes. --- DynamicMeter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DynamicMeter.c') diff --git a/DynamicMeter.c b/DynamicMeter.c index 40c06bb6..82e73a92 100644 --- a/DynamicMeter.c +++ b/DynamicMeter.c @@ -88,7 +88,7 @@ static void DynamicMeter_display(const Object* cast, RichString* out) { } static const char* DynamicMeter_getCaption(const Meter* this) { - const Settings* settings = this->pl->settings; + const Settings* settings = this->host->settings; const DynamicMeter* meter = Hashtable_get(settings->dynamicMeters, this->param); if (meter) return meter->caption ? meter->caption : meter->name; @@ -96,7 +96,7 @@ static const char* DynamicMeter_getCaption(const Meter* this) { } static void DynamicMeter_getUiName(const Meter* this, char* name, size_t length) { - const Settings* settings = this->pl->settings; + const Settings* settings = this->host->settings; const DynamicMeter* meter = Hashtable_get(settings->dynamicMeters, this->param); if (meter) { const char* uiName = meter->caption; -- cgit v1.2.3