diff options
author | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-01-11 20:43:28 +0100 |
commit | 94123a215ba971baf4ad7e12cc479258ddb8600e (patch) | |
tree | 6f053d8e1ce754ab7104b7364be9754231ab84de /Settings.h | |
parent | 50cb99f0acecb15992f3d5610c02676a6c94f2a4 (diff) | |
parent | c55320e9e2a8916e911bcd39ab37b79e3a7d03b2 (diff) | |
download | debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.gz debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.tar.bz2 debian_htop-94123a215ba971baf4ad7e12cc479258ddb8600e.zip |
Update upstream source from tag 'upstream/3.0.5'
Update to upstream version '3.0.5'
with Debian dir 10922042e094a59dc72f9c39ddd4bfd59c7a302c
Diffstat (limited to 'Settings.h')
-rw-r--r-- | Settings.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -33,7 +33,9 @@ typedef struct Settings_ { int delay; int direction; + int treeDirection; ProcessField sortKey; + ProcessField treeSortKey; bool countCPUsFromOne; bool detailedCPUTime; @@ -44,6 +46,7 @@ typedef struct Settings_ { bool degreeFahrenheit; #endif bool treeView; + bool treeViewAlwaysByPID; bool showProgramPath; bool shadowOtherUsers; bool showThreadNames; @@ -61,6 +64,7 @@ typedef struct Settings_ { bool accountGuestInCPUMeter; bool headerMargin; bool enableMouse; + int hideFunctionBar; // 0 - off, 1 - on ESC until next input, 2 - permanently #ifdef HAVE_LIBHWLOC bool topologyAffinity; #endif @@ -70,6 +74,16 @@ typedef struct Settings_ { #define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromOne ? (cpu)+1 : (cpu)) +static inline ProcessField Settings_getActiveSortKey(const Settings* this) { + return (this->treeView) + ? (this->treeViewAlwaysByPID ? PID : this->treeSortKey) + : this->sortKey; +} + +static inline int Settings_getActiveDirection(const Settings* this) { + return this->treeView ? this->treeDirection : this->direction; +} + void Settings_delete(Settings* this); bool Settings_write(Settings* this); @@ -78,4 +92,6 @@ Settings* Settings_new(int initialCpuCount); void Settings_invertSortOrder(Settings* this); +void Settings_setSortKey(Settings* this, ProcessField sortKey); + #endif |