diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2021-08-31 15:38:52 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-12-07 17:04:49 +1100 |
commit | 72ba20fa5f077bab4286dd78f9944df15de3b3b4 (patch) | |
tree | 0c4fb4e63b80b3a20d5f50bdac6bed9fe2bee607 /unsupported | |
parent | ff4f44b22ae8d6522ee22599174a6cdd41bc0314 (diff) |
Introduce screen tabs
This is a forward port (by nathans) of Hisham's original code.
Diffstat (limited to 'unsupported')
-rw-r--r-- | unsupported/Platform.c | 12 | ||||
-rw-r--r-- | unsupported/Platform.h | 6 | ||||
-rw-r--r-- | unsupported/UnsupportedProcessList.c | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/unsupported/Platform.c b/unsupported/Platform.c index e55de4ab..db484511 100644 --- a/unsupported/Platform.c +++ b/unsupported/Platform.c @@ -27,14 +27,22 @@ in the source distribution for its full text. #include "UptimeMeter.h" +const ScreenDefaults Platform_defaultScreens[] = { + { + .name = "Main", + .columns = "PID USER PRIORITY NICE M_VIRT M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME COMM", + .sortKey = "PERCENT_CPU", + }, +}; + +const unsigned int Platform_numberOfDefaultScreens = ARRAYSIZE(Platform_defaultScreens); + const SignalItem Platform_signals[] = { { .name = " 0 Cancel", .number = 0 }, }; const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals); -const ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_VIRT, M_RESIDENT, STATE, PERCENT_CPU, PERCENT_MEM, TIME, COMM, 0 }; - const MeterClass* const Platform_meterTypes[] = { &CPUMeter_class, &ClockMeter_class, diff --git a/unsupported/Platform.h b/unsupported/Platform.h index 7f4ad9ab..5c874d48 100644 --- a/unsupported/Platform.h +++ b/unsupported/Platform.h @@ -20,12 +20,14 @@ in the source distribution for its full text. #include "unsupported/UnsupportedProcess.h" +extern const ScreenDefaults Platform_defaultScreens[]; + +extern const unsigned int Platform_numberOfDefaultScreens; + extern const SignalItem Platform_signals[]; extern const unsigned int Platform_numberOfSignals; -extern const ProcessField Platform_defaultFields[]; - extern const MeterClass* const Platform_meterTypes[]; bool Platform_init(void); diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c index b64de411..0fbe7032 100644 --- a/unsupported/UnsupportedProcessList.c +++ b/unsupported/UnsupportedProcessList.c @@ -51,7 +51,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { Process_updateCmdline(proc, "<unsupported architecture>", 0, 0); Process_updateExe(proc, "/path/to/executable"); - if (proc->settings->flags & PROCESS_FLAG_CWD) { + if (proc->settings->ss->flags & PROCESS_FLAG_CWD) { free_and_xStrdup(&proc->procCwd, "/current/working/directory"); } |