summaryrefslogtreecommitdiffstats
path: root/TraceScreen.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-23 15:26:56 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-23 15:26:56 -0300
commitd0c72c3fb29d535f5bb12b651e3bcaa516650199 (patch)
tree2c01b7d96d50a7f47334093a1ed8ff4962cec204 /TraceScreen.c
parent1084a3ff8faf3aa98e8e9fbdab97a08a2c40482e (diff)
Move FunctionBar inside Panel
Diffstat (limited to 'TraceScreen.c')
-rw-r--r--TraceScreen.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/TraceScreen.c b/TraceScreen.c
index 5823022f..48274bda 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "ListItem.h"
#include "IncSet.h"
#include "String.h"
+#include "FunctionBar.h"
#include <stdio.h>
#include <unistd.h>
@@ -27,7 +28,6 @@ in the source distribution for its full text.
/*{
#include "Process.h"
#include "Panel.h"
-#include "FunctionBar.h"
typedef struct TraceScreen_ {
Process* process;
@@ -37,16 +37,17 @@ typedef struct TraceScreen_ {
}*/
-static const char* tsFunctions[] = {"Search ", "Filter ", "AutoScroll ", "Stop Tracing ", "Done ", NULL};
+static const char* TraceScreenFunctions[] = {"Search ", "Filter ", "AutoScroll ", "Stop Tracing ", "Done ", NULL};
-static const char* tsKeys[] = {"F3", "F4", "F8", "F9", "Esc"};
+static const char* TraceScreenKeys[] = {"F3", "F4", "F8", "F9", "Esc"};
-static int tsEvents[] = {KEY_F(3), KEY_F(4), KEY_F(8), KEY_F(9), 27};
+static int TraceScreenEvents[] = {KEY_F(3), KEY_F(4), KEY_F(8), KEY_F(9), 27};
TraceScreen* TraceScreen_new(Process* process) {
TraceScreen* this = (TraceScreen*) malloc(sizeof(TraceScreen));
this->process = process;
- this->display = Panel_new(0, 1, COLS, LINES-2, false, Class(ListItem));
+ FunctionBar* fuBar = FunctionBar_new(TraceScreenFunctions, TraceScreenKeys, TraceScreenEvents);
+ this->display = Panel_new(0, 1, COLS, LINES-2, false, Class(ListItem), fuBar);
this->tracing = true;
return this;
}
@@ -105,7 +106,7 @@ void TraceScreen_run(TraceScreen* this) {
bool follow = false;
bool looping = true;
- FunctionBar* bar = FunctionBar_new(tsFunctions, tsKeys, tsEvents);
+ FunctionBar* bar = panel->defaultBar;
IncSet* inc = IncSet_new(bar);
Vector* lines = Vector_new(panel->items->type, true, DEFAULT_SIZE);
@@ -219,7 +220,6 @@ void TraceScreen_run(TraceScreen* this) {
}
IncSet_delete(inc);
- FunctionBar_delete((Object*)bar);
Vector_delete(lines);
kill(child, SIGTERM);

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