diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-12-05 15:12:20 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-12-05 15:12:20 +0000 |
commit | 00b324bfc162030b575e03795dcfcaac56bd0b4d (patch) | |
tree | fbaada243839b0b67351856e2d02a2e8184bf65f /AvailableColumnsPanel.c | |
parent | 2a73405cd060b543d56987650327b18078a137d7 (diff) |
Changes in object model: separate class objects to store vtable. Also, nicer UTF-8 display of big numbers.
Diffstat (limited to 'AvailableColumnsPanel.c')
-rw-r--r-- | AvailableColumnsPanel.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c index fce9880c..d954da8c 100644 --- a/AvailableColumnsPanel.c +++ b/AvailableColumnsPanel.c @@ -63,15 +63,21 @@ static HandlerResult AvailableColumnsPanel_eventHandler(Panel* super, int ch) { return result; } +PanelClass AvailableColumnsPanel_class = { + .super = { + .extends = Class(Panel), + .delete = AvailableColumnsPanel_delete + }, + .eventHandler = AvailableColumnsPanel_eventHandler +}; + AvailableColumnsPanel* AvailableColumnsPanel_new(Settings* settings, Panel* columns, ScreenManager* scr) { - AvailableColumnsPanel* this = (AvailableColumnsPanel*) malloc(sizeof(AvailableColumnsPanel)); + AvailableColumnsPanel* this = AllocThis(AvailableColumnsPanel); Panel* super = (Panel*) this; - Panel_init(super, 1, 1, 1, 1, LISTITEM_CLASS, true); - ((Object*)this)->delete = AvailableColumnsPanel_delete; + Panel_init(super, 1, 1, 1, 1, Class(ListItem), true); this->settings = settings; this->scr = scr; - super->eventHandler = AvailableColumnsPanel_eventHandler; Panel_setHeader(super, "Available Columns"); |