Commit Graph

114 Commits

Author SHA1 Message Date
Michael Natterer 9593121431 app, libgimpwidgets: return visible widgets from all gimp_prop_foo_new()
and remove a gazillion gtk_widget_show() all over the place, some
places need a gtk_widget_hide() now, and I'm pretty sure I broke at
least one thing in all those files...
2019-09-25 20:24:06 +02:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Ell 39e23267f7 app: in GimpTransformGridTool, allow linking forward/backward transforms
Add a GimpTransformGridTool::matrix_to_info() virtual function,
which should extract the tool-specific transformation parameters
given a transformation matrix, and the old parameter set (which is
needed in some tools, to derive the parameters that aren't encoded
in the matrix, such as the pivot point).  The transformation matrix
can be any combination of matrices calculated by the tool, and
their inverses.  Subclasses should only implement this function if
every such matrix can be mapped back to transformation parameters.
This is currently the case for all the transform-grid tools, except
for the shear tool (since it only supports shearing along one of
the horizontal or the vertical directions, however, the combined
matrix may require shearing in both directions).

When a transform-grid tool implements this function, show a chain-
button between the two transform-direction radio-buttons in the
tool options.  When the chain-button is linked, whenever the
transform corresponding to the active direction is modified, adjust
the transform corresponding to the non-active direction such that
the overall transform remains the same.

One notable workflow that this enables is transforming a layer
while adjusting a different area than its boundary, by first
defining the area while the transform-directions are linked, and
then transforming the area while the transform-directions are
unlinked.
2019-02-04 16:48:13 -05:00
Ell 17412aa234 app: in the transform tools, blink type box when there's no item to transform
In the transform tools, when there is no item of the selected type
to transform, blink the move-type box widget in the tool options,
in addition to showing an error message in the status bar, to hint
at the source of the error.
2018-12-10 08:39:47 -05:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Ell 1dbe765905 app: add GimpTransformGridTool; derive most transform tools from it
While most of our transform tools use an interactive transform
grid, and have similar behavior, the flip tool is an odd one out.
The new "auto straighten" function of the measure tool introduces
another tool that performs transformations, while not behaving like
the rest of the transform tools.

Factor out the parts of GimpTransformTool that handle user
interaction into GimpTransformGridTool (with corresponding
GimpTransformGridOptions, and GimpTransformGridToolUndo), and only
leave the basic transform functionality and options in
GimpTransformTool (and GimpTransformOptions).

Derive all the transform tools (and transform-tool base classes)
that previously derived from GimpTransformTool, from
GimpTransformGridTool.  The one exception is GimpFlipTool, which
still derives from GimpTransformTool directly.  The next commit
will derive GimpMeasureTool from GimpTransformTool as well.
2018-06-09 18:07:20 -04:00
Jehan b91742a84f Bug 795185 - Corrective rotation guides are incorrect in GIMP 2.10.
Most expected behavior in normal transform is to see the preview,
whereas you usually don't want to see it in corrective mode. In 2.8
actually, it seems like it was not even possible to see the image
preview in corrective mode.

So let's set "show-preview" to these defaults when "direction" property
is updated.  It is still possible to change it manually for any specific
use cases (i.e. you can hide the preview in normal transform, and
oppositely you can show it in corrective transform), but at least now
defaults are sane.
2018-04-12 12:13:38 +02:00
Michael Natterer e27ce76a49 Bug 790293 - Scale tool: Ctrl uses top-left corner of selection...
...instead of center

The scale tool implicitly uses GimpToolTransformGrid's "pivot-x" and
"pivot-y" properties, so they need to be properly initialized and
updated to be at the grid's center.

Also add a tool options toggle "Around center".
2018-01-11 20:05:53 +01:00
Michael Natterer a5f3808505 app: use the newly added tool widgets in the transform tools 2017-06-17 03:04:06 +02:00
Michael Natterer b6ffccad7a app: default to "no grid" for transform tools
the preview is visible by default, having both is needed only rarely.
2017-04-02 23:41:32 +02:00
Michael Natterer e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
Michael Natterer 2e40af5dcf app: remove virtual function GimpToolOptions::reset()
and use GimpConfig::reset() instead.
2015-12-29 12:47:04 +01:00
Alexandre Prokoudine 70dd9102a0 Don't use double space in Unified Transform options 2015-11-22 17:45:25 +03:00
Mikael Magnusson 9b30b1d744 gimptransformoptions: Mark strings for translation 2015-05-03 01:24:55 +02:00
Michael Natterer 1464bee257 app: use the GParamSpec's nick as label in gimp_prop_spin_scale_new()
if a NULL label was passed. Override this with explicit calls to
gimp_spin_scale_set_label() in the two cases where we really don't
want a label.
2014-06-01 23:39:19 +02:00
Michael Natterer 8be52f6aa7 app, libgimp*: pass translated blurbs to GIMP_CONFIG_INSTALL_PROP_FOO()
instead of passing N_()-strings; and remove gettext() calls on these
strings when using them. Reduces complexitx, and fixes double- and
untranslated strings. Also enables to treat properties of GIMP and
GEGL objects the same way, which was totally broken before.
2014-05-14 23:34:01 +02:00
Michael Natterer 17167594ea app: use the newly added libgimpwidgets icon name APIs 2014-05-07 21:32:09 +02:00
Michael Natterer 7385e030dd app, libgimp: add increment parameters to gimp_prop_widget_set_factor()
Step and page increments can't be reasonable calculated or guessed
based on the GUI widget's factor, so pass them each time we call
set_factor(). This change reintroduces sane ranges for the levels tool
for != u8 images again.
2014-02-03 22:57:51 +01:00
Michael Natterer 731360a8f7 app: add gimp_prop_widget_set_factor()
which allows adjustment-based prop widgets to display the property
value multiplied by factor. Remove gimp_prop_opacity_spin_scale_new()
because that's simply a factor of 100.0.
2013-06-15 01:28:54 +02:00
Michael Natterer fc0765ce16 app: ellipsize most tool options combo boxes
which means that now check/radio button labels are our biggest
width-wasters.
2013-06-03 17:35:36 +02:00
Michael Natterer a5d2123adf app: use the new combo box label in many tool options
and generally clean up a bit. Reuse the clone options code in the
perspective clone options. Addresses bug #122862.
2013-06-03 16:40:24 +02:00
Michael Natterer 3b68ae0f3c app, pdb, libgimp: Remove all traces of the supersampling recursion level
from all transform APIs. This is no longer used since we use GEGL to
transform, the value was only passed around and never used.
2013-05-31 01:15:32 +02:00
Michael Natterer b1acd93f5e Some formatting cleanup in the unified transform tool commits 2012-08-21 19:50:01 +02:00
Mikael Magnusson 574df2b6db transformtool: We show corrective preview for selections and paths, so why not drawables 2012-08-20 15:46:47 +02:00
Mikael Magnusson 62525e090b transformtool: use GimpFrame + GtkBox to group the options instead of just putting GtkLabel between them 2012-08-20 15:46:46 +02:00
Mikael Magnusson f84987de73 transformtool: Add the bunch of 8 separate options for 3 things 2012-08-20 15:46:46 +02:00
Mikael Magnusson 03117bdf40 transformtool: Update modifier keys for options, solves problem with perspective frompivot + constrain 2012-08-20 15:46:46 +02:00
Mikael Magnusson 9be0d2b029 transformtool: Add option for locking pivot to canvas, add code to transform the pivot along with all transformations 2012-08-20 15:46:24 +02:00
Mikael Magnusson 615b5fabfd transformtool: Add the five options instead of just two 2012-08-20 15:41:55 +02:00
Mikael Magnusson 362afb122a transformtool: Try to straighten out modifiers 2012-08-20 15:22:21 +02:00
Mikael Magnusson 99f9d4d219 transformtool: add old "new" unified transformation tool
This is the proof of concept code I wrote before gsoc, with very naive
behaviour and simple interface.
2012-08-20 15:22:21 +02:00
Michael Natterer 58dfa962a1 app: port simple rotating and flipping to GEGL
Which requires making the entire copy/paste apparatus aware of the
Babl format of the passed around tile managers.
2012-05-02 17:46:02 +02:00
Michael Natterer c34239c0bb Bug 667367 - Bad widget hint
Remove the tooltip of GimpTransformOptions:constrain from the param
spec and add it manually, so it is different for rotate and scale.
2012-01-07 22:18:22 +01:00
Michael Natterer 38b8f0596d app: use the new modifier API instead of constants in all tools
There are still many uses of literal SHIFT and MOD1 left, but all uses
of CONTROL are gone. Should work exactly as before on Win/X11, and
still has some glitches on OSX.
2011-10-06 21:59:07 +02:00
Michael Natterer 3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
Michael Natterer 1b2ae6fd9e app: clean up the transform options' preview and guides UI 2011-07-31 00:25:43 +02:00
Michael Natterer 314717f4bb app: clean up GimpTransformOptions' preview controls
Turn the "Preview type" combo into a simple "Show image" toggle and
enable the "No guides" choice in the guides combo. Remove unused enum
GimpTransformPreviewType. This way the preview and guide/grid controls
are strictly separate and much less confusing.
2011-07-27 23:15:02 +02:00
Michael Natterer d092573a3b app: fix GimpTransformOptions::clip's tooltip 2011-07-27 22:24:10 +02:00
Michael Natterer 6b78436f56 app: implement all rectangle guides options for the transform guides 2011-07-24 19:07:51 +02:00
Michael Natterer 43788feb50 app: remove enum GimpTransformGridType
and use the two new values from GimpGuidesType instead.
2011-07-24 18:01:21 +02:00
Alexandre Prokoudine b18d638000 More tooltips for tools options
Added previously missing tooltips for transformation tools, Flip tool,
text tool and Bucket Fill tool.
2011-04-21 15:28:05 +04:00
Michael Natterer 18929f0865 app: lay out the GimpTransformOptions GUI more uniformly 2011-03-27 23:18:28 +02:00
Michael Natterer caa8cdd4c1 app: add gimp_transform_options_show_preview()
which returns whether or not to show a transform preview. Also clean
up gimp_transform_tool_draw() a bit and add a stroke group for the
center handle.
2011-03-27 21:49:34 +02:00
Michael Natterer 8f991c5950 app: make the brush, pattern etc selecing boxes more compact
by integrating their label instead of requiring one externally. This
way we get rid of some more labels in the tool options. Also clean up
tool options further (add more spin scales, and some general
reordering and spacing cleanup).
2010-11-02 14:05:47 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 9026f4965f app/tools/gimpflipoptions.c app/tools/gimpmoveoptions.c
2008-03-08  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpflipoptions.c
	* app/tools/gimpmoveoptions.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptransformoptions.c: don't add the label into the
	stock box, use an extra hbox with 2 pixels spacing.


svn path=/trunk/; revision=25064
2008-03-08 14:07:16 +00:00
Sven Neumann b870738a86 app/tools/gimptransformtool.c app/tools/gimptransformoptions.[ch] take the
2008-03-06  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c
	* app/tools/gimptransformoptions.[ch]
	* app/display/gimpdisplayshell-preview.c: take the preview opacity
	from the transform tool options. Based on a patch from Tom Lechner.
	Closes bug #520690.

svn path=/trunk/; revision=25049
2008-03-06 11:54:44 +00:00
Sven Neumann a5fa311290 removed a frame.
2007-10-17  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpselectionoptions.c: removed a frame.

	* app/tools/gimptransformoptions.c: tweaked layout to reduce
	horizontal extent.

	* app/widgets/gimpviewablebox.c (gradient_box_new): use an icon
	for the "Reverse" check button.

svn path=/trunk/; revision=23857
2007-10-17 14:36:12 +00:00
Sven Neumann 77b7161a32 app/core/gimp-transform-region.[ch] app/core/gimpchannel.c
2007-09-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.[ch]
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpimage-item-list.[ch]
	* app/core/gimpitem-linked.[ch]
	* app/core/gimpitem.[ch]
	* app/core/gimplayer.c
	* app/paint/gimpperspectiveclone.c
	* app/vectors/gimpvectors.c: removed supersample parameter from
	transform functions and perform it depending on the interpolation
	type (bug #473265).

	* app/tools/gimptransformoptions.[ch]
	* app/tools/gimptransformtool.c: removed Supersample toggle from
	the transform tool options.

	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/transform_tools.pdb: document that the
	supersample parameter is unused and improved documentation of the
	recursion-level parameter.

	* app/pdb/transform_tools_cmds.c
	* app/pdb/drawable_transform_cmds.c
	* libgimp/gimpdrawabletransform_pdb.c: regenerated.

svn path=/trunk/; revision=23494
2007-09-10 15:29:48 +00:00