TUI-setup for 'hide running in container' option

main
valdaarhun 4 years ago committed by cgzones
parent 62d59403d9
commit d078ba15a2
  1. 1
      DisplayOptionsPanel.c
  2. 4
      Settings.c
  3. 1
      Settings.h

@ -116,6 +116,7 @@ DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager*
Panel_add(super, (Object*) CheckItem_newByRef("Shadow other users' processes", &(settings->shadowOtherUsers))); Panel_add(super, (Object*) CheckItem_newByRef("Shadow other users' processes", &(settings->shadowOtherUsers)));
Panel_add(super, (Object*) CheckItem_newByRef("Hide kernel threads", &(settings->hideKernelThreads))); Panel_add(super, (Object*) CheckItem_newByRef("Hide kernel threads", &(settings->hideKernelThreads)));
Panel_add(super, (Object*) CheckItem_newByRef("Hide userland process threads", &(settings->hideUserlandThreads))); Panel_add(super, (Object*) CheckItem_newByRef("Hide userland process threads", &(settings->hideUserlandThreads)));
Panel_add(super, (Object*) CheckItem_newByRef("Hide processes running in containers", &(settings->hideRunningInContainer)));
Panel_add(super, (Object*) CheckItem_newByRef("Display threads in a different color", &(settings->highlightThreads))); Panel_add(super, (Object*) CheckItem_newByRef("Display threads in a different color", &(settings->highlightThreads)));
Panel_add(super, (Object*) CheckItem_newByRef("Show custom thread names", &(settings->showThreadNames))); Panel_add(super, (Object*) CheckItem_newByRef("Show custom thread names", &(settings->showThreadNames)));
Panel_add(super, (Object*) CheckItem_newByRef("Show program path", &(settings->showProgramPath))); Panel_add(super, (Object*) CheckItem_newByRef("Show program path", &(settings->showProgramPath)));

@ -382,6 +382,8 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
this->hideKernelThreads = atoi(option[1]); this->hideKernelThreads = atoi(option[1]);
} else if (String_eq(option[0], "hide_userland_threads")) { } else if (String_eq(option[0], "hide_userland_threads")) {
this->hideUserlandThreads = atoi(option[1]); this->hideUserlandThreads = atoi(option[1]);
} else if (String_eq(option[0], "hide_running_in_container")) {
this->hideRunningInContainer = atoi(option[1]);
} else if (String_eq(option[0], "shadow_other_users")) { } else if (String_eq(option[0], "shadow_other_users")) {
this->shadowOtherUsers = atoi(option[1]); this->shadowOtherUsers = atoi(option[1]);
} else if (String_eq(option[0], "show_thread_names")) { } else if (String_eq(option[0], "show_thread_names")) {
@ -576,6 +578,7 @@ int Settings_write(const Settings* this, bool onCrash) {
fprintf(fd, "fields="); writeFields(fd, this->screens[0]->fields, this->dynamicColumns, false, separator); fprintf(fd, "fields="); writeFields(fd, this->screens[0]->fields, this->dynamicColumns, false, separator);
printSettingInteger("hide_kernel_threads", this->hideKernelThreads); printSettingInteger("hide_kernel_threads", this->hideKernelThreads);
printSettingInteger("hide_userland_threads", this->hideUserlandThreads); printSettingInteger("hide_userland_threads", this->hideUserlandThreads);
printSettingInteger("hide_running_in_container", this->hideRunningInContainer);
printSettingInteger("shadow_other_users", this->shadowOtherUsers); printSettingInteger("shadow_other_users", this->shadowOtherUsers);
printSettingInteger("show_thread_names", this->showThreadNames); printSettingInteger("show_thread_names", this->showThreadNames);
printSettingInteger("show_program_path", this->showProgramPath); printSettingInteger("show_program_path", this->showProgramPath);
@ -669,6 +672,7 @@ Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns)
this->showThreadNames = false; this->showThreadNames = false;
this->hideKernelThreads = true; this->hideKernelThreads = true;
this->hideUserlandThreads = false; this->hideUserlandThreads = false;
this->hideRunningInContainer = false;
this->highlightBaseName = false; this->highlightBaseName = false;
this->highlightDeletedExe = true; this->highlightDeletedExe = true;
this->highlightMegabytes = true; this->highlightMegabytes = true;

@ -73,6 +73,7 @@ typedef struct Settings_ {
bool shadowOtherUsers; bool shadowOtherUsers;
bool showThreadNames; bool showThreadNames;
bool hideKernelThreads; bool hideKernelThreads;
bool hideRunningInContainer;
bool hideUserlandThreads; bool hideUserlandThreads;
bool highlightBaseName; bool highlightBaseName;
bool highlightDeletedExe; bool highlightDeletedExe;

Loading…
Cancel
Save