Use xfce4::connect instead of the less safe g_signal_connect
In this patch, the type-safe GTK wrapper functions (new file gtk.cc
) have been copied from the most recent version of xfce4-cpugraph-plugin
, and several new type-safe wrappers have been added as required by xfce4-sensors-plugin
.
The conversion from a less safe C code to a more safe C++ code revealed several issues that were missed because of the simplicity of C's type system. Slider value handlers in the UI-style panel (in the properties dialog when tachos are selected) were returning void
, instead of gboolean
, which means that the sliders were being updated according to the pseudo-random value present [in the case of an AMD64 binary] in the %rax
register when the handler function returned to its caller (the caller was expecting a non-random gboolean
in the %rax
register).
Configuration dialog changes:
- Align elements in the UI-style panel when configuring tachos (see the screenshots below)