From 7cb8cb05fbf005564c6eefe4fd6007ced9336a5f Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 23 Mar 2015 19:24:34 -0300 Subject: Simplify constructors. --- AffinityPanel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'AffinityPanel.c') diff --git a/AffinityPanel.c b/AffinityPanel.c index 644c6338..8612855c 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -42,12 +42,8 @@ PanelClass AffinityPanel_class = { .eventHandler = AffinityPanel_eventHandler }; -static const char* AffinityFunctions[] = {"Set ", "Cancel ", NULL}; -static const char* AffinityKeys[] = {"Enter", "Esc", NULL}; -static int AffinityEvents[] = {13, 27}; - Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity) { - Panel* this = Panel_new(1, 1, 1, 1, true, Class(CheckItem), FunctionBar_new(AffinityFunctions, AffinityKeys, AffinityEvents)); + Panel* this = Panel_new(1, 1, 1, 1, true, Class(CheckItem), FunctionBar_newEnterEsc("Set ", "Cancel ")); Object_setClass(this, Class(AffinityPanel)); Panel_setHeader(this, "Use CPUs:"); -- cgit v1.2.3