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 /AffinityPanel.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 'AffinityPanel.c')
-rw-r--r-- | AffinityPanel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c index 8c406fb3..094a0104 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -34,9 +34,17 @@ static HandlerResult AffinityPanel_eventHandler(Panel* this, int ch) { return IGNORED; } +PanelClass AffinityPanel_class = { + .super = { + .extends = Class(Panel), + .delete = Panel_delete + }, + .eventHandler = AffinityPanel_eventHandler +}; + Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity) { - Panel* this = Panel_new(1, 1, 1, 1, CHECKITEM_CLASS, true, ListItem_compare); - this->eventHandler = AffinityPanel_eventHandler; + Panel* this = Panel_new(1, 1, 1, 1, true, Class(CheckItem)); + Object_setClass(this, Class(AffinityPanel)); Panel_setHeader(this, "Use CPUs:"); int curCpu = 0; |