From 283707c5e5bc436b78ea23bf5500cb6b16a01148 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:27 +0200 Subject: Imported Upstream version 0.9 --- TraceScreen.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'TraceScreen.c') 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; -- cgit v1.2.3