From 00b324bfc162030b575e03795dcfcaac56bd0b4d Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 5 Dec 2012 15:12:20 +0000 Subject: Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers. --- OpenFilesScreen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenFilesScreen.c') diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c index 30d02af0..e33f2e76 100644 --- a/OpenFilesScreen.c +++ b/OpenFilesScreen.c @@ -57,7 +57,7 @@ static int ofsEvents[] = {KEY_F(3), KEY_F(4), KEY_F(5), 27}; OpenFilesScreen* OpenFilesScreen_new(Process* process) { OpenFilesScreen* this = (OpenFilesScreen*) malloc(sizeof(OpenFilesScreen)); this->process = process; - this->display = Panel_new(0, 1, COLS, LINES-3, LISTITEM_CLASS, false, ListItem_compare); + this->display = Panel_new(0, 1, COLS, LINES-3, false, Class(ListItem)); if (Process_isThread(process)) this->pid = process->tgid; else @@ -170,7 +170,7 @@ void OpenFilesScreen_run(OpenFilesScreen* this) { FunctionBar* bar = FunctionBar_new(ofsFunctions, ofsKeys, ofsEvents); IncSet* inc = IncSet_new(bar); - Vector* lines = Vector_new(panel->items->type, true, DEFAULT_SIZE, ListItem_compare); + Vector* lines = Vector_new(panel->items->type, true, DEFAULT_SIZE); OpenFilesScreen_scan(this, lines, inc); OpenFilesScreen_draw(this, inc); @@ -234,6 +234,7 @@ void OpenFilesScreen_run(OpenFilesScreen* this) { } } + Vector_delete(lines); FunctionBar_delete((Object*)bar); IncSet_delete(inc); } -- cgit v1.2.3