aboutsummaryrefslogtreecommitdiffstats
path: root/DisplayOptionsPanel.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:33 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:33 +0200
commitf75ab6d2c11e8a8e18191b087564aedebbeb96c5 (patch)
tree2a046e11678e798f3f9c7f7af4f9ac205c8d2731 /DisplayOptionsPanel.c
parent2004bbc3ef28ada3acca05f5d5fa9108121a6784 (diff)
downloaddebian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.tar.gz
debian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.tar.bz2
debian_htop-f75ab6d2c11e8a8e18191b087564aedebbeb96c5.zip
Imported Upstream version 1.0.3upstream/1.0.3
Diffstat (limited to 'DisplayOptionsPanel.c')
-rw-r--r--DisplayOptionsPanel.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index 7ec035b..6153313 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -61,15 +61,21 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) {
return result;
}
+PanelClass DisplayOptionsPanel_class = {
+ .super = {
+ .extends = Class(Panel),
+ .delete = DisplayOptionsPanel_delete
+ },
+ .eventHandler = DisplayOptionsPanel_eventHandler
+};
+
DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* scr) {
- DisplayOptionsPanel* this = (DisplayOptionsPanel*) malloc(sizeof(DisplayOptionsPanel));
+ DisplayOptionsPanel* this = AllocThis(DisplayOptionsPanel);
Panel* super = (Panel*) this;
- Panel_init(super, 1, 1, 1, 1, CHECKITEM_CLASS, true);
- ((Object*)this)->delete = DisplayOptionsPanel_delete;
+ Panel_init(super, 1, 1, 1, 1, Class(CheckItem), true);
this->settings = settings;
this->scr = scr;
- super->eventHandler = DisplayOptionsPanel_eventHandler;
Panel_setHeader(super, "Display options");
Panel_add(super, (Object*) CheckItem_new(strdup("Tree view"), &(settings->pl->treeView), false));
@@ -84,5 +90,6 @@ DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager*
Panel_add(super, (Object*) CheckItem_new(strdup("Detailed CPU time (System/IO-Wait/Hard-IRQ/Soft-IRQ/Steal/Guest)"), &(settings->pl->detailedCPUTime), false));
Panel_add(super, (Object*) CheckItem_new(strdup("Count CPUs from 0 instead of 1"), &(settings->pl->countCPUsFromZero), false));
Panel_add(super, (Object*) CheckItem_new(strdup("Update process names on every refresh"), &(settings->pl->updateProcessNames), false));
+ Panel_add(super, (Object*) CheckItem_new(strdup("Add guest time in CPU meter percentage"), &(settings->pl->accountGuestInCPUMeter), false));
return this;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy