diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-12-04 19:57:47 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-03-06 19:56:25 +0100 |
commit | 3ba695293c981af034d243605a30dac6cb55f880 (patch) | |
tree | 5c09f11bfbe34680f52b86cc00f2225bd45615b9 /Process.h | |
parent | 6133cac721f355aec0d6b5581fef90db34305f29 (diff) |
Linux: dynamically adjust the SECATTR column width
SELinux contexts can be quite long; adjust the column width dynamically
at each cycle to the longest value.
Also with the recent addition of multiple screens, over-long columns can
be moved into their own screen.
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -279,6 +279,9 @@ typedef struct ProcessFieldData_ { /* Whether the column should be sorted in descending order by default */ bool defaultSortDesc; + + /* Whether the column width is dynamically adjusted (the minimum width is determined by the title length) */ + bool autoWidth; } ProcessFieldData; // Implemented in platform-specific code: @@ -286,6 +289,7 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field int Process_compare(const void* v1, const void* v2); void Process_delete(Object* cast); extern const ProcessFieldData Process_fields[LAST_PROCESSFIELD]; +extern uint8_t Process_fieldWidths[LAST_PROCESSFIELD]; #define PROCESS_MIN_PID_DIGITS 5 #define PROCESS_MAX_PID_DIGITS 19 #define PROCESS_MIN_UID_DIGITS 5 @@ -406,4 +410,7 @@ void Process_makeCommandStr(Process* this); void Process_writeCommand(const Process* this, int attr, int baseAttr, RichString* str); +void Process_resetFieldWidths(void); +void Process_updateFieldWidth(ProcessField key, size_t width); + #endif |