Commit Graph

4881 Commits

Author SHA1 Message Date
Ell e701700a88 app: only use area dim., not off., for ui range of pixel-distance op props
Don't offset the ui range of op properties that use pixel-distance
units to the top-left corner of the region, since they're relative;
only do that for pixel-coordinate units.  Let their ui range be
[0, width/height].
2017-07-02 20:00:19 -04:00
Ell 9de19a1f9a app: orient the spiral op line controller so that 0-degree rotation points right
This way, it runs to the middle of the spiral arm, and stays centered
even when balance != 0.
2017-07-02 19:14:38 -04:00
Michael Natterer f4f2de1b5c app: start an infrastructure for on-canvas controllers for operations
Pass a "GimpCreateControllerFunc" to all gimppropgui-*.[ch]
constructors which takes a callback (to update the config object when
the on-canvas GUI) and a controller type that determines the
callback's signature, and returns another callback (to update the
on-canvas GUI when the config object changes).

In GimpOperationTool, pass such a GimpCreateControllerFunc that
handles creating and adding on-canvas controller via the new
gimpfiltertool-widgets.[ch]. So far, a simple line like in the
blend tool is supported.

Add a custom GUI for gegl:spiral, and have its origin, radius and
angle controlled by such a line.
2017-07-03 00:45:59 +02:00
Jehan d6b0132654 app: s/groupe/group/ in a descriptive comment for function. 2017-06-13 19:17:46 +02:00
Jehan e23ee850d5 app: output an error message when iso code parsing failed.
Thanks to Lionel N. who bugged me with his Windows installation where
the XML file was not found by GIMP. We should output a warning when this
happens so that packagers can detect the issue and the expected
installation path for this dependency.
The reporter wants me to call him "Padawan Lionel" but I won't fall for
it! Or did I? :-D
2017-06-12 01:29:22 +02:00
Michael Natterer 40a1d7c560 app: move new "about.h" include to its place, add some newlines 2017-06-07 20:53:48 +02:00
Jehan 6c2658ea4d app: keep track of all messages displayed by GimpErrorDialog.
This way, you can increment repeated messages even when not the last
one and you don't overflow the error dialog needelessly when 2 errors
repeat one after another.
2017-06-07 15:14:02 +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 5abf0c2e5b app: rename gimppropgui-constructors.[ch] to gimppropgui-generic.[ch] 2017-06-05 12:05:39 +02:00
Michael Natterer 9e1aee48c5 app: move all custom gimppropgui constructors to their own files 2017-06-05 02:26:30 +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 adb826fb39 app: allow filter actions to have hardcoded default operation settings
by encoding them directly in the string attached to all filter
actions. The code now supports both "gegl:some-operation" and
"gegl:some-operation\n<serialized config>".

Add "default_settings" to GimpGeglProcedure to store the settings of
the invoking action, much like the "default_run_mode" member.

Change filters-commands.c to parse the new operation string, create
GimpGeglProcedures with the deserialized settings, and use those
settings when the procedures are ran.

Change the filter history to be smarter about what is already in the
history, there can now be several different procedures with the same
name.

Remove the dilate and erode actions from the drawable group, and add
them to filters, they are just special cases of value-propagate with
fixed settings.
2017-06-03 22:08:43 +02:00
Ell 3ca48a0b30 enums: don't use comments in generated enum recipes
Works in bash, but apparently not portable.
2017-06-02 11:15:43 -04:00
Ell 7136f09f0a app, cursors: add a cursor for the warp tool
... and use it instead of the perspective tool cursor.

Disable the cursor modifiers for now, since they're not really
meaningful.
2017-05-30 19:27:05 -04:00
Michael Natterer 84e5aed103 app: turn invert-perceptual, -linear and -value into normal filter actions
so they show up in recent filters, and don't need their own callbacks.

This has the problem that they now show a GUI with no options, but
that simply puts on more pressure to fix this general uglyness of ops
without editable properties.
2017-05-26 18:49:22 +02:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Michael Natterer 81fe78bd9b app: derive GimpFgBgEditor from GtkEventBox instead of GtkDrawingArea
it doesn't need a visible GdkWindow.
2017-05-19 12:02:48 +02:00
Michael Natterer 54e2c196b7 app: use 2/3 of the area's shorter side for GimpFgBgEditor's oog color too 2017-05-19 11:55:54 +02:00
Michael Natterer 297ec3fdab app: add an out-of-gamut indicator to GimpFgBgEditor 2017-05-19 11:00:38 +02:00
Elle Stone 127e7daeb2 Bug 773461 - Color picker lacks L*a*b* mode
Add LAB readout to Pointer and Sample Points dialogs
2017-05-17 10:27:53 -04:00
Jehan 0dbdf232d5 app, menus: rename confusing layers-text-tool and vectors-path-tool.
"layers-text-tool" action shows as "Text Tool" while "vectors-path-tool"
shows as "Path Tool". That's very confusing with tools-text and
tools-vectors respectively.
These actions are mostly about entering in edit mode with the active
layer or path. For text layers, it will enter text edition on canvas,
whereas just open the attributes edition dialog on other layers. For
consistency, layers-text-edit is renamed as well too layers-edit-text.
This also fix the side effect of commits 10099bd and 526918b where I
didn't realize that layers-text-tool was also working on non text layers
on purpose (being very badly named). Now there is a separate layers-edit
and layers-edit-text.
Thanks to Pat David for English corrections. :-)
2017-05-16 00:04:24 +02:00
Ell bb2417c299 app: add ui_meta keys for controlling some UI attributes dynamically
Add support for The following GEGL op property keys, which shall
contain GUM expressions of the specified type, controlling the
corresponding UI attributes of the property's widget:

  - sensitive [boolean]: controls widget sensitivity.

  - visible [boolean]: controls widget visibility.

  - label [string]: controls widget label (or the label of the
    associated label widget).

  - description [string]: controls widget tooltip text.

When any of above keys are present, the values they evaluate to take
precedence over the static values the corresponding attributes would
otherwise have.
2017-05-13 16:55:24 -04:00
Ell d6eb927b9e app: add interpreter for the GUM language
GUM is a small DSL, used in some property keys of GEGL operations
to dynamically control UI attributes based on context.  This commit
only adds an interpreter for the language; see the next commit for
the actual handling of the relevant keys.

See the comment at the top of gimppropgui-eval.c for a description
of the language.

Note that the interpreter is licensed under the LGPL.
2017-05-13 16:51:32 -04:00
Michael Natterer 5355fe15b4 app: GimpToolPalette: disconnect signals in dispose() not finalize() 2017-05-09 23:14:24 +02:00
Michael Natterer 2766a9f807 app: add an LCH mode to GimpColorFrame
so picked colors can be displayed as LCH now.
2017-05-08 21:33:04 +02:00
Michael Natterer e5e9e4b6c8 Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Add gegl:hue-chroma to the "Colors" menu.
2017-05-07 18:32:45 +02:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Michael Natterer 7f33edea1b app, libgimp: allow to register more than one MIME type per procedure
GIMP will always use the first one from the list, but at least now
there is a way to register variants.
2017-05-04 23:22:37 +02:00
Michael Natterer 7e239901dd app: add new GtkTreeView subclass GimpPlugInView
which takes a list of GimpPlugInProcedures and allows to choose
between the plug-ins that implement these procedures.
2017-05-04 20:35:41 +02:00
Ell bc4589968c app: in prop gui & co., allow picking outside drawable bounds
Add a boolean 'pick_abyss' parameter to GimpCreatePickerFunc.  When
this parameter is TRUE, the picker should pick outside the bounds
of the drawable.  Use FALSE for color pickers, and TRUE for position
pickers.
2017-05-03 11:03:36 -04:00
Michael Natterer 536cc8531a app: keep the src image's resolution and unit in copied/cut GimpBuffers
and use them for the new image in "Paste as new image". We were using
the resolution and unit of the image the paste command was invoked
from, which is entirely random and useless.
2017-05-01 18:39:13 +02:00
Michael Natterer 61d9197dd4 app: add some blank lines to gimp_help_get_locales() and fix comment syntax 2017-04-21 19:59:35 -03:00
Michael Natterer cb795e8adc app: add a FIXME about clipboard images in GimpBufferView 2017-04-19 16:53:04 -03:00
Michael Natterer 3c0cffe53d app: add GimpFilterTool::set_config()
and use it to set saved settings on the tool. In GimpOperationTool's
implementation, re-sync the config's output-extent properties with the
drawable.
2017-03-30 23:21:46 +02:00
Michael Natterer 7e702ad7b2 app: turn all members of GimpSettingsBox into properties
and make them settable after construction.
2017-03-28 23:58:07 +02:00
Michael Natterer ee6c7ec7b7 Bug 780015 - Filter settings are not properly restored after Gimp restart
Filters settings used to be serialized and deserialized only
when a filter tool's GUI was shown, too late for the code that
re-runs/re-shows filters with previous values.

Move the entire loading/saving code to gimp-operation-config.c, even
adding/removing the dummy separator item between timestamped automatic
history and manually saved settings. Load the settings automatically
when a settings container is requested, but still trigger saving from
the few places the container is changed in the GUI; could also
automate that later.

This commit also moves all settings of filters that have their own
tools from gimpdir/tool-options/ to gimpdir/filters/. Add compat code
to try the old filename if the new doesn't exist, so files are
migrated automatically.

WIP, but this step already fixes the bug.
2017-03-24 01:29:50 +01:00
Michael Natterer a0521a520f app: change the "XCF compat" stuff to "XCF compression"
Both in the GimpImage API and in the GUI. The toggle in the save
dialog now controls ZLIB compression directly. Changed the various
info labels accordingly. Ditch the XCF parasite that saved the XCF
compat mode.
2017-03-23 18:03:27 +01:00
Jehan d339aef75c app: add icon size auto-guess from monitor resolution.
Current code only guess resolution for a single monitor. Ideally
the widget sizes could be different depending on the window where a
given widget is on. But that's a start.
2017-03-21 17:52:22 +01:00
Michael Natterer e666eb61b3 app: remove unused PROP_FILENAME enum value from GimpSettingsEditor 2017-03-21 13:31:17 +01:00
Michael Natterer 9921d4c06c app: derive GimpIconSizeScale from GimpFrame not GtkFrame 2017-03-12 22:33:35 +01:00
Jehan e29e950ca8 app: make sure signal connections are disconnected later. 2017-03-12 18:36:16 +01:00
Jehan 324e1a28b0 app: completely minor typo in function parameter. 2017-03-12 17:14:46 +01:00
Jehan 0753296b6c app: remove unused gimp_tool_palette_initialize_tools().
The function has been unused since commit b5cc2a9.
Its work is now divided into gimp_tool_palette_set_toolbox() and
gimp_tool_palette_hierarchy_changed().
2017-03-12 17:14:38 +01:00
Jehan a88afe485a app: fix dockbook tab border values.
Argh! Always triple-check commits before pushing!
Commit e30c92c had completely wrong big values, which I was using
to make tab border update really visible while testing.
2017-03-11 03:38:49 +01:00
Jehan e30c92ce91 app: also update dockbook tab borders with icon sizes. 2017-03-11 02:51:59 +01:00
Jehan 26f054e029 app: GimpEditor styling depending on config's icon settings.
Do not update only the icon, but also content and button spacing.
2017-03-11 02:51:59 +01:00
Jehan 86cd53e9e6 app: dockbook tab icon size depends on the icon settings. 2017-03-11 02:51:59 +01:00
Jehan cfae83623c Bug 745835 - Small icons as Option, not theme
Allow overriding icon sizes set in themes from the preferences.
This initial commit updates only toolbox icons. More to come.
4 options are available: small, medium, large and huge (the later would
likely be useful for HiDPI screens).
Uses a new widget GimpIconSizeScale.
2017-03-11 02:51:59 +01:00
Michael Natterer 157d70e396 Bug 768066 - Color picker tool should indicate pick position
Add optional coordinate display to GimpColorFrame, and enable it for
the color picker tool and the sample point dockable.
2017-03-11 00:01:01 +01:00