Commit graph

55 commits

Author SHA1 Message Date
Tobi-wan Kenobi
a7e756e015 [tests] Generic module tests
Add a helper function that lists all existing modules and modify the CPU
module test so that it now generically iterates all available modules
and tests their widgets.

see #23
2016-12-09 07:27:01 +01:00
Tobi-wan Kenobi
f645203579 [core] Widget creation/update overhaul
Until now, widgets were re-created during each iteration. For multiple,
reasons, using static widget objects is much easier, so instead of
creating new widgets continuously, modules now create the widgets during
instantiation and get the list of widgets passed as parameter whenever
an update occurs. During the update, they can still manipulate the
widget list by removing and adding elements as needed.

Advantages:
* Less memory fragmentation (fewer (de)allocations)
* Easier event management (widgets now have static IDs)
* Easier module code (widget contents can simply be the result of a
  callback)

see #23
2016-12-08 08:44:54 +01:00
Tobi-wan Kenobi
aacc56a4e2 [modules/cpu] Add initial version of CPU utilization module
Re-enable the CPU utilization module as proof-of-concept for the new
core engine.

see #23
2016-12-04 17:45:42 +01:00
Tobi-wan Kenobi
a8a6c9bba2 [core] Refactor engine
This is going to be a bit more comprehensive than anticipated. In order
to cleanly refactor the core and the engine, basically start from
scratch with the implementation.

Goals:

* Test coverage
* Maintain backwards compatibility with module interface as much as
  possible (but still make modules easier to code)
* Simplicity

see #23
2016-12-03 20:38:54 +01:00
Tobias Witek
9c95c0b319 [tests] Added first module tests (for CPU)
I finally *really* need to get started on testing. I've had too many
releases in too short time intervals now, all because of small
bugs/oversights.
2016-11-06 14:30:59 +01:00