Systemd provides the status of a given user and system session as a
human readable string.
Retrieve this information via RequestSystemState and guard the
retrieve of failed units depending on this request.
The functionality is extended but does not change, which means that
failed units in any granularity are displayed as before.
Update documentation in the meantime.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Instead if guarding visibility in if condition, enforce visibility
regardless of the state of the current update.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Split-out request of failed units from systemd into a separate member
function.
This increases the readability and extendability, but preserves the
current functionality (non-functional change).
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Determining of failed units can be done by usage of explicit uint32
function with direct return due to auto lambda expression.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Checking for the availability of a given proxy member can be done in the
lambda function as well.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Keeping nr_failed as member allows to split-out calculation of overall
failed units into updateData.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Add an argument to the memory module which displays the state of the
swap configuration of the local system.
Usage of swap does not necessarily indicate if swap is on or off.
Signed-off-by: Steffen Kothe <steffen.kothe@skothe.net>
Initialize `cldMonShift_` member in the `clock` module constructor. This
fixes a bug where the calendar tooltip would break after a reload, when
in month mode.
In some cases, the active event is arriving before the create event. We need to store the currently active address and initialize the windows accordingly
TODO:
- Sometimes the active event arrives before the create, in which case the window is not activated.
- The window title event also looks unreliable in some cases, will need to investigate