diff options
author | Daniel Lange <DLange@git.local> | 2024-01-10 11:17:08 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2024-01-10 11:17:08 +0100 |
commit | e7372d18a1a661d8c3dba9f51e1f17b5f94171a7 (patch) | |
tree | e8270dd60ec096bee8157dbadf029e15ed584592 /DynamicMeter.c | |
parent | 937052b231259a47d881d539ad5748245ef55b99 (diff) | |
download | debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.gz debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.tar.bz2 debian_htop-e7372d18a1a661d8c3dba9f51e1f17b5f94171a7.zip |
New upstream version 3.3.0
Diffstat (limited to 'DynamicMeter.c')
-rw-r--r-- | DynamicMeter.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/DynamicMeter.c b/DynamicMeter.c index a8cd76c..15d853b 100644 --- a/DynamicMeter.c +++ b/DynamicMeter.c @@ -15,10 +15,11 @@ in the source distribution for its full text. #include <string.h> #include "CRT.h" +#include "Machine.h" #include "Object.h" #include "Platform.h" -#include "ProcessList.h" #include "RichString.h" +#include "Settings.h" #include "XUtils.h" @@ -88,16 +89,16 @@ static void DynamicMeter_display(const Object* cast, RichString* out) { } static const char* DynamicMeter_getCaption(const Meter* this) { - const ProcessList* pl = this->pl; - const DynamicMeter* meter = Hashtable_get(pl->dynamicMeters, this->param); + const Settings* settings = this->host->settings; + const DynamicMeter* meter = Hashtable_get(settings->dynamicMeters, this->param); if (meter) return meter->caption ? meter->caption : meter->name; return this->caption; } static void DynamicMeter_getUiName(const Meter* this, char* name, size_t length) { - const ProcessList* pl = this->pl; - const DynamicMeter* meter = Hashtable_get(pl->dynamicMeters, this->param); + const Settings* settings = this->host->settings; + const DynamicMeter* meter = Hashtable_get(settings->dynamicMeters, this->param); if (meter) { const char* uiName = meter->caption; if (uiName) { |