Commit Graph

116 Commits

Author SHA1 Message Date
Michael Natterer 39942c1260 Revert "Issue #9228: make GEGL Operation tool's operations their own actions too."
This reverts commit d51c64ec06.
2023-05-25 02:31:28 +02:00
Jehan d51c64ec06 Issue #9228: make GEGL Operation tool's operations their own actions too.
Though the GEGL Operation tool is still useful as a generic dialog, let's
generate also per-operation (the ones not ignored and not already special-cased
in the rest of the GUI) tools and actions.

These "tools" are mostly hidden (e.g. not selectable in toolbox where it would
be a bit useless as they would show with the generic GEGL icon or none), but
they can be searched with the action search, shortcuts can be assigned and they
can be added to menus.
2023-04-13 21:28:52 +02:00
Jehan 31111d2802 app: mark the paint select tool as experimental.
Otherwise it breaks the toolbox organization with a "missing tools in
toolrc file" error while scanning toolrc.
2020-11-24 21:43:11 +01:00
Thomas Manni e1cdb9f54e app, icons: add Paint Select tool in the playground
A -quick done- first step towards the addition of a smart selection tool.
Require the gegl:paint-select workshop operation.
Still LOT of work to do (wip):
- fluctuations removal (GEGL side)
- multilevels pyramid approach + banded graphcut for instant result on large
   image (GEGL ? GIMP ?)
- Gaussian Mixtures for color models (GEGL side)
- drawable offsets (GIMP side)
- undo / redo (GIMP side)
- scribbles edition mode (GIMP side)
- dedicated icons
- ...
2020-11-24 12:10:40 +01:00
Ell 9f298f767f app: don't reject toolrc files due to missing experimental tools
Add a new GimpToolInfo::experimental boolean field, and mark
GimpNPointDeformationTool and GimpSeamlessCloneTool as
experimental.  In gimp_tools_deserialize(), don't reject the file
if the only missing tools are experimental, but rather add them to
the passed container.  In particular, this prevents us from
rejecting the default toolrc file when experimental tools are
enabled.
2020-02-05 00:07:10 +02:00
Ell 3cda972100 app: add a "Use tool groups" option to the toolbox preferences
Add a new Gimp::tool_item_ui_list, which is a GimpTreeProxy over
Gimp::tool_item_list.  This allows us to use either a hierarchical
or a flat tool list in the UI, by setting the "flat" property of
the new list.

Use Gimp::tool_item_ui_list in GimpToolPalette, so that the toolbox
layout is affected by this choice.

Add a "Use tool groups" toggle to the toolbox preferences, and bind
it to the "flat" property of Gimp::tool_item_ui_list.
2020-02-01 13:19:08 +02:00
Ell bae9f2d880 app: various fixes to last commits 2020-01-30 10:46:12 +02:00
Ell d1084c5816 app: add tool-group support to GimpToolEditor
Add tool-group support to GimpToolEditor, used to organize tools in
the Preferences dialog, including creating, rearranging, and
deleting groups.  Also, major cleanup.
2020-01-30 02:51:56 +02:00
Ell cd2adfbede app: add support for tool groups in toolrc
Add a new Gimp::tool_item_list list, in addition to
Gimp::tool_info_list.  The latter may contain arbitrary tool items,
including tool groups, and is intended for use in the UI (namely,
the toolbox and the preferences tool editor).

In gimp-tools, use Gimp::tool_item_list for representing the UI
tool order (while still using Gimp::tool_info_list as a flat list
of all GimpToolInfo objects), and add support for saving and
loading tool groups to/from toolrc.

Introduce file-version tracking in toolrc, and drop its contents on
version mismatch, or when new tools are introduced.  This is
slightly disruptive, but merging new changes with existing toolrc
files is non-trivial, and it doesn't happen very often.

Add support for a sysconf toolrc file, which is used if there's no
user toolrc file (i.e., on first use).  If neither file is found,
the hard-coded flat tool order is used.  This commit doesn't
provide a default toolrc file, but the next commits will.

Make the gimp-tools serialization and deserialization functions
public, for use in GimpToolEditor in the next commits.
2020-01-30 02:51:56 +02:00
Ell 77111ba045 app: add GimpToolItem; derive GimpToolInfo from it
Add GimpToolItem as a common base class for toolbox items.
Derive GimpToolInfo from GimpToolItem, representing an individual
tool.  The next commits add support for tool groups, represented by
an alternative subclass of GimpToolItem.

Most of the tool-info properties remain in GimpToolInfo, however,
GimpToolItem takes care of tool-item visibility.
2020-01-30 02:50:15 +02:00
Ell 58d04375c9 app: improve placement of new tools with existing toolrc
When ordering tools according to an existing toolrc file (which
is always present in a pre-existing profile), preserve the default
placement of newly-added tools, instead of always adding them to
the bottom of the list.
2020-01-10 18:44:58 +02:00
Ell 5646e03eb3 app, icons: add 3D Transform tool
Add a new 3D Transform tool, based on GimpToolTransform3DGrid,
added in the previous commit.  The tool UI provides a notbook with
three tabs, corresponding to the three GimpToolTransform3DGrid
modes:

  Camera - allows setting the primary vanishing point, as well as
  the camera's focal length, expressed either directly, or as the
  camera's angle of view, relative to the whole image or the
  transformed item.  By default, the vanishing point is aligned
  with the item's center, and the angle of view is fixed relative
  to the item; this essentially means that each item is transformed
  using a local perspective, independent of its position and size
  relative to the image.  A global perspective can be achieved by
  using a common vanishing point and focal length (or an image-
  relative angle of view).

  Move   - allows moving the item using X, Y, and Z offsets.

  Rotate - allows rotating the item using X, Y, and Z Euler angles.
  The order of rotation of the different axes can be controlled by
  a set of numbered buttons next to the sliders, and the rotation's
  pivot can be controlled using a pivot selector.
2020-01-06 21:52:54 +02:00
Michael Natterer dbd793d631 libgimpconfig: get rid of filenames in all config related APIs
and rename function names which say "gfile" to just "file".
2019-09-21 12:55:12 +02:00
Ell 3a4a00c71e Issue #40 - Layer offset tool
Add a new Offset filter tool, as a front-end to gimp:offset.  The
tool replaces, and provides the same interface as, the drawable-
offset dialog, while also providing live preview and on-canvas
interaction.

Note that we don't simply use a custom propgui constructor for
gimp:offset, since we need a little more control.
2019-06-05 19:06:56 -04:00
Ell c1347a7f26 app: construct tool-options GUI lazily
We currently construct the tool-options GUI for all the tools at
startup, which takes a significant amount of time.  Instead,
only register the GUI construction function with the tool-options
object, using the new gimp_tools_set_tool_options_gui_func()
function, and use the registered function to construct the GUI when
actually needed.
2018-09-27 02:41:59 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 5299b1894d app: indentation in gimp-tools.c 2018-06-29 12:38:47 +02:00
Michael Natterer 37f69457b7 app: switch to using gimp-tool-options-manager
and remove all other tool options parent setting/unsetting and
property copying code. Also select a tool at the end of
tool_manager_init() so it is in sync with what the tool options
manager does.
2018-06-29 12:34:11 +02:00
Michael Natterer b0beb0197a Bug 795230 - Rename Blend tool and provide PDB compatibility
Rename the tool and its options, and the gradient sub-struct of paint
options.
2018-04-14 00:52:20 +02:00
Michael Natterer 895c0f558f app: add small hack to make the generic operation tool always invisible
so it can't be added to the toolbox. It's entirely useless when
activated on its own.
2018-01-04 19:23:39 +01:00
Ell e4440e3fdb app: save custom gradient across sessions
Add a framework for saving and restoring internal data objects, in
gimp-internal-data.c.  Internal data objects are saved in separate
files under a new "internal-data" subdirectory of the user's gimp
directory.  The internal data is saved, restored, and cleared
together with the tool options.

Use this to save and restore the custom gradient.  In the future,
we might add similar writable internal data objects that we'd want
to save.
2017-10-29 10:19:07 -04:00
Michael Natterer 36656175d1 app: some more s/blurb/label/ and s/help/tooltip/ in app/tools/ 2017-07-04 22:36:24 +02:00
Michael Natterer 5e08d71437 app: gimp_tools_exit(): destroy the tool manager before the tool options
The tool manager still keeps an active tool which it unrefs on
destruction, triggering a final HALT on the tool, which may want to
lookup tool options to reset something. Happened with the new
widget-ported rectangle select tool.
2017-06-29 12:58:03 +02:00
Michael Natterer 109f23af39 app: replace the hue-saturation tool by a generic filter action
Move the GUI to a custom gimppropgui function.
2017-06-05 18:35:05 +02:00
Michael Natterer 757ca64e58 app: replace the color balance tool by a generic filter action
Move the color balance GUI to a custom gimppropgui function.
2017-06-05 01:20:37 +02:00
Michael Natterer ecfec4103b app: remove the colorize tool and replace it by a generic filter action 2017-06-04 21:21:43 +02:00
Michael Natterer 062df6bd09 Bug 772025 - Incomplete toolrc file causes GIMP to hang
gimp_tools_restore(): print the error message when parsing toolrc fails.
2016-09-28 14:53:42 +02:00
Michael Natterer 6a9ce551cb app: rename GimpImageMapTool to GimpFilterTool 2016-05-10 13:52:24 +02:00
Michael Natterer a659036b40 app: switch the list of tools to using "append" mode
and ret rid of registering tools in reverse order, and reversing the
list after deserializing it.
2016-05-01 16:05:44 +02:00
Michael Natterer 39909b6008 app: replace GimpList's internal GList with a GQueue
so we can easily iterate in reverse order, and access the last element
in O(1). Nothing makes use of this yet.
2016-05-01 15:22:44 +02:00
Michael Natterer 149d3f441f app: turn the desaturate tool into a normal GEGL filter 2016-01-16 22:38:12 +01:00
Michael Natterer 7b009c6900 app: turn the posterize tool into an ordinary GEGL filter
which means replacing the whole thing by a few lines.
2016-01-16 21:41:00 +01:00
Michael Natterer 2e40af5dcf app: remove virtual function GimpToolOptions::reset()
and use GimpConfig::reset() instead.
2015-12-29 12:47:04 +01:00
Michael Natterer d01ba07ed6 configure.ac, app: make libmypaint a hard dependency
and move the MyPaint brush tool out of the playground.
2015-12-21 21:39:48 +01:00
Michael Natterer 22fc50c279 app: rename all values of enum GimpContextPropMask
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
Jehan 5217900748 configure/app: libmypaint becomes an optional dependency. 2015-03-30 22:38:35 +02:00
Michael Natterer 071ede915a app: first draft of GimpMybrushTool, which uses MyPaint brushes 2015-03-30 22:38:34 +02:00
Michael Natterer d11f83a640 app: resurrect the Iscissors tool to a zombie state
The interaction is fully restored, it's also ported to the new halt()
and commit() API of tools and semi-properly GEGLized: the gradient map
is now constructed on the fly using a GimpTileHandlerValidate
subclass.

The only problem is that it doesn't find any edges in the image and is
totally useless. Pushing anyway to put an end to the bitrot, any help
with debugging is greatly appreciated...
2015-03-17 22:24:56 +01:00
Johannes Matschke 2989bad35a Bug 721009 - new transform tool with freely placeable handles
Add new tool GimpHandleTransformTool which allows to freely place up
to 4 handles on the image, then move any one of them, which transforms
the image so that the remaining handles keep their position.

Did quite some cleanup on the code before pushing --Mitch
2015-03-05 12:36:59 +01:00
Michael Natterer 825d4ab185 app: make sure there is always a tool selected on startup
"No tool on startup" can happen if a tool has disappeared between
sessions, or by broken manual config file editing.
2015-03-03 20:24:40 +01:00
Marek Dvoroznak f15a7bc71d app: add NPD tool basics 2015-02-27 20:21:51 +01:00
Michael Natterer b03d69dd40 libgimpbase, app: add variants of gimp_$foo_directory() which return GFiles
gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
2014-07-28 02:04:01 +02:00
Michael Natterer 98e7ec090b app: use the new gimp_personal_rc_gfile() in lots of places
and pass the GFile to the newly added GFile-based GimpConfig,
GimpScanner etc. functions. This is starting to make sense now...
2014-07-01 20:02:45 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Michael Natterer 651be184b7 Bug 721066 - There is a 2nd, broken, "GEGL Operation" tool in the toolbox
Make the operation tool invisible by default.
2014-02-04 00:19:30 +01:00
Jehan c7aa623a55 app: clean out a big bunch of leading tabs.
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Michael Natterer 9426a94617 app: fix default tool order, warp is at the end of transform tools 2013-05-22 00:49:29 +02:00
Michael Muré d6ed13ef6c GimpWarpTool: skeleton of the tool, with options 2013-05-21 23:28:40 +02:00
Barak Itkin 5fa0df17dd Add a skeleton for the seamless clone tool, based on the cage tool 2013-05-15 00:25:30 +02:00
Michael Natterer abbe2ecba9 app: build the foreground select tool again, minus the calls to SIOX
the interaction is completely there again, it just doesn't nothing
fancy with the mask :)
2013-04-30 00:04:28 +02:00