aboutsummaryrefslogtreecommitdiffstats
path: root/TraceScreen.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:27 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:27 +0200
commit283707c5e5bc436b78ea23bf5500cb6b16a01148 (patch)
treeb977131bbbb4c3bd8ade370aab2e4fc913440c04 /TraceScreen.c
parentbea9b4798717b6f4e31085506dfc179eeb8dc17c (diff)
downloaddebian_htop-283707c5e5bc436b78ea23bf5500cb6b16a01148.tar.gz
debian_htop-283707c5e5bc436b78ea23bf5500cb6b16a01148.tar.bz2
debian_htop-283707c5e5bc436b78ea23bf5500cb6b16a01148.zip
Imported Upstream version 0.9upstream/0.9
Diffstat (limited to 'TraceScreen.c')
-rw-r--r--TraceScreen.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/TraceScreen.c b/TraceScreen.c
index 19254f9..3af12e2 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -32,17 +32,17 @@ typedef struct TraceScreen_ {
}*/
-static char* tbFunctions[] = {"AutoScroll ", "Stop Tracing ", "Done ", NULL};
+static const char* tsFunctions[] = {"AutoScroll ", "Stop Tracing ", "Done ", NULL};
-static char* tbKeys[] = {"F4", "F5", "Esc"};
+static const char* tsKeys[] = {"F4", "F5", "Esc"};
-static int tbEvents[] = {KEY_F(4), KEY_F(5), 27};
+static int tsEvents[] = {KEY_F(4), KEY_F(5), 27};
TraceScreen* TraceScreen_new(Process* process) {
TraceScreen* this = (TraceScreen*) malloc(sizeof(TraceScreen));
this->process = process;
this->display = Panel_new(0, 1, COLS, LINES-2, LISTITEM_CLASS, true, ListItem_compare);
- this->bar = FunctionBar_new(tbFunctions, tbKeys, tbEvents);
+ this->bar = FunctionBar_new(tsFunctions, tsKeys, tsEvents);
this->tracing = true;
return this;
}
@@ -142,6 +142,12 @@ void TraceScreen_run(TraceScreen* this) {
FunctionBar_setLabel(this->bar, KEY_F(5), this->tracing?"Stop Tracing ":"Resume Tracing ");
TraceScreen_draw(this);
break;
+ case KEY_HOME:
+ Panel_setSelected(panel, 0);
+ break;
+ case KEY_END:
+ Panel_setSelected(panel, Panel_size(panel)-1);
+ break;
case 'f':
case KEY_F(4):
follow = !follow;

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