summaryrefslogtreecommitdiffstats
path: root/OpenFilesScreen.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-12-05 15:12:20 +0000
committerHisham Muhammad <hisham@gobolinux.org>2012-12-05 15:12:20 +0000
commit00b324bfc162030b575e03795dcfcaac56bd0b4d (patch)
treefbaada243839b0b67351856e2d02a2e8184bf65f /OpenFilesScreen.c
parent2a73405cd060b543d56987650327b18078a137d7 (diff)
Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers.
Diffstat (limited to 'OpenFilesScreen.c')
-rw-r--r--OpenFilesScreen.c5
1 files changed, 3 insertions, 2 deletions
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);
}

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