Commit Graph

27 Commits

Author SHA1 Message Date
Michael Natterer 2f629072f1 Bug 787919 - Tool options are lost when switching device
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...
2018-05-16 02:09:19 +02:00
Michael Natterer 539927ebfa app: replace all g_assert() by the newly added gimp_assert()
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.
2018-02-11 22:23:10 +01:00
Jehan ff34ec33cc Bug 791455 - Please add support for barrel rotation in brush tools.
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".
2017-12-11 18:57:17 +01:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
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);
2017-07-15 18:42:44 +02:00
Michael Natterer 17167594ea app: use the newly added libgimpwidgets icon name APIs 2014-05-07 21:32:09 +02:00
Michael Natterer 908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
Michael Natterer 90608d3a22 Bug 687256 - Please explain the terms wheel, curve, axis
Add translator comments to GimpDeviceInfoEditor.
2012-10-31 21:14:26 +01:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 2414301799 Review the last few commits and apply some style fanaticism
some completely unrelated,
2012-02-07 20:36:55 +01:00
Massimo Valentini 39368a410d plugged memory leaks 2012-02-07 17:32:02 +01:00
Michael Natterer 3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
Michael Natterer ec196a8ac4 app: allow to set a color for GimpCurveView's primary curve
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.
2011-02-10 20:05:50 +01:00
Michael Natterer 202124c438 app: implement GObject::constructed() instead of ::constructor() 2011-01-14 09:38:46 +01:00
Michael Natterer b9a7c121a4 app: don't inherit from GtkHBox or GtkVBox
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.
2010-10-30 15:44:46 +02:00
Michael Natterer 7f8c5d5a35 app: make private functions static, I have no clue why they weren't 2010-03-10 20:17:13 +01:00
Michael Natterer fdde593fc5 app: enable copy and paste for curves
Add GimpCurve support to the clipboard and handle ctrl-x, ctrl-c and
ctrl-v in GimpCurveView.
2010-02-16 19:58:51 +01:00
Michael Natterer a10b8421d9 app: select the first axis so the shown curve makes sense 2010-02-16 10:54:53 +01:00
Michael Natterer 1e26dbc22d app: add views for the axes' curves 2010-02-15 23:08:30 +01:00
Michael Natterer 00b1835f9e app: remove unused private member 2010-02-15 18:24:19 +01:00
Michael Natterer 240dae660d app : keep the axis mapping in a treeview
instead of in an ugly list of menus, so it looks better and can also
be used to select an axis to edit (like editing its curve).
2010-02-15 16:48:21 +01:00
Michael Natterer f115a0bdfe app: add GimpFrames for axes and keys and remove useless treeview headers 2010-02-15 13:12:26 +01:00
Michael Natterer 179ddd8a49 app: add a button to remove unplugged devices from the list 2010-02-15 12:59:29 +01:00
Michael Natterer fdd0b6d64d app: make the accel renderer editable 2010-02-12 21:57:58 +01:00
Alexia Death cc21fd8a54 app: add missing parameter 2010-02-12 22:55:20 +02:00
Michael Natterer 327b242650 widgets: fix copy & paste error so it actually changes the device's keys now 2010-02-12 21:39:38 +01:00
Michael Natterer 8c1b5de637 widgets: use a treeview for the device's keys 2010-02-12 21:35:39 +01:00
Michael Natterer c6bbeda444 app: get rid of GtkInputDialog, also brings us closer to XI2
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.
2010-02-12 15:46:07 +01:00