diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2009-06-02 04:51:23 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2009-06-02 04:51:23 +0000 |
commit | 6330ff3a0ac6d279132d36cea027ad3f065707b1 (patch) | |
tree | 70d894309bb92c9146fc4063e41d68686ffcfafd /TraceScreen.c | |
parent | 1371ee28a7e953052e414dfd1641294852aa4458 (diff) |
changes for htop 0.8.2
Diffstat (limited to 'TraceScreen.c')
-rw-r--r-- | TraceScreen.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/TraceScreen.c b/TraceScreen.c index 072c26dd..02e2a85c 100644 --- a/TraceScreen.c +++ b/TraceScreen.c @@ -32,17 +32,17 @@ typedef struct TraceScreen_ { }*/ -static char* tbFunctions[3] = {"AutoScroll ", "Stop Tracing ", "Done "}; +static char* tbFunctions[] = {"AutoScroll ", "Stop Tracing ", "Done ", NULL}; -static char* tbKeys[3] = {"F4", "F5", "Esc"}; +static char* tbKeys[] = {"F4", "F5", "Esc"}; -static int tbEvents[3] = {KEY_F(4), KEY_F(5), 27}; +static int tbEvents[] = {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(3, tbFunctions, tbKeys, tbEvents); + this->bar = FunctionBar_new(tbFunctions, tbKeys, tbEvents); this->tracing = true; return this; } @@ -105,7 +105,7 @@ void TraceScreen_run(TraceScreen* this) { buffer[i] = '\0'; if (contLine) { ListItem_append((ListItem*)Panel_get(panel, - Panel_getSize(panel)-1), line); + Panel_size(panel)-1), line); contLine = false; } else { Panel_add(panel, (Object*) ListItem_new(line, 0)); @@ -119,7 +119,7 @@ void TraceScreen_run(TraceScreen* this) { contLine = true; } if (follow) - Panel_setSelected(panel, Panel_getSize(panel)-1); + Panel_setSelected(panel, Panel_size(panel)-1); Panel_draw(panel, true); } int ch = getch(); @@ -146,7 +146,7 @@ void TraceScreen_run(TraceScreen* this) { case KEY_F(4): follow = !follow; if (follow) - Panel_setSelected(panel, Panel_getSize(panel)-1); + Panel_setSelected(panel, Panel_size(panel)-1); break; case 'q': case 27: |