summaryrefslogtreecommitdiffstats
path: root/SignalsPanel.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-23 19:24:34 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-23 19:24:34 -0300
commit7cb8cb05fbf005564c6eefe4fd6007ced9336a5f (patch)
tree92c24cc07f1dd3f95f7adc77014740575b24c5eb /SignalsPanel.c
parent8a11281c675b25111b2463d1c75d6f6790aec379 (diff)
Simplify constructors.
Diffstat (limited to 'SignalsPanel.c')
-rw-r--r--SignalsPanel.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/SignalsPanel.c b/SignalsPanel.c
index 9e37252e..5ff7fde2 100644
--- a/SignalsPanel.c
+++ b/SignalsPanel.c
@@ -62,12 +62,8 @@ static SignalItem signals[] = {
{ .name = "31 SIGSYS", .number = 31 },
};
-static const char* SignalsFunctions[] = {"Send ", "Cancel ", NULL};
-static const char* SignalsKeys[] = {"Enter", "Esc", NULL};
-static int SignalsEvents[] = {13, 27};
-
Panel* SignalsPanel_new() {
- Panel* this = Panel_new(1, 1, 1, 1, true, Class(ListItem), FunctionBar_new(SignalsFunctions, SignalsKeys, SignalsEvents));
+ Panel* this = Panel_new(1, 1, 1, 1, true, Class(ListItem), FunctionBar_newEnterEsc("Send ", "Cancel "));
for(unsigned int i = 0; i < sizeof(signals)/sizeof(SignalItem); i++)
Panel_set(this, i, (Object*) ListItem_new(signals[i].name, signals[i].number));
Panel_setHeader(this, "Send signal:");

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