GimpDeviceInfo is the only way to store per-device settings like
color, brush etc. It used to be derived from GimpContext and therefore
limited to the context's properties, causing everything else (all
tool-individual options) to be lost on device change.
Derive it from GimpToolPreset instead, so it's capable of storing
arbitrary tool options.
Adapt things to the new class hierarchy and add a bunch of signal
handlers that make sure the active device's GimpDeviceInfo is updated
properly when the tool changes. Also change device switching
accordingly.
Change GimpDeviceStatus to only show the stuff that is relevant to
each device's tool.
And various small changes to make things work properly...
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
It turns out we already have the support since it uses the same axis as
the "wheel", used by other devices (for instance the Airbrush pen of
Wacom has a wheel reporting on this same axis).
We can't do any fancy support for this right now, but at least we can
clarify a bit the dynamics naming so that people understands it can be
used for both wheel and rotation input.
Fix the various "Wheel" dynamics strings into "Wheel/Rotation".
More than 2000 lines of code less in app/, instead of
if (instance->member)
{
g_object_unref/g_free/g_whatever (instance->member);
instance->member = NULL;
}
we now simply use
g_clear_object/pointer (&instance->member);
and redo how the curves tool sets its curves in order to support this
without code duplication. Also change the color of the yellow curve in
the dynamics output editor to orange because yellow is hardly visible.
Instead, inherit from GtkBox directly and set the orientation in
init(). Replace more gtk_container_add() by gtk_box_pack_start() in
the reparented classes.
Added two new widgets, GimpDeviceInfoEditor, which is an editor/view
widget for GimpDeviceInfo, and GimpDeviceEditor, which is an editor
widget for all devices. Both are pretty much ugly right now and look a
lot like the old GtkInputDialog, but are at least internally cleaned
up and easily changable code and ui wise. Consider this a completely
intermediate state.
Also cleaned up GimpDeviceInfo so it's possible to have a proper
view on it, and did the needed changes to the preferences dialog
to use the new stuff.