From 7cb8cb05fbf005564c6eefe4fd6007ced9336a5f Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 23 Mar 2015 19:24:34 -0300 Subject: Simplify constructors. --- SignalsPanel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'SignalsPanel.c') 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:"); -- cgit v1.2.3