Commit graph

2335 commits

Author SHA1 Message Date
Ell
5d37a244dd app: merge layers in chunks, and show progress
In gimp_image_merge_layers() -- the internal function used by the
various layer-merging/flattenning functions -- process the merged-
layer graph in chunks, using gimp_gegl_apply_operation(), instead
of in one go, using gegl_node_blit_buffer().  Processing in chunks
better utilizes the cache, since it reduces the size of
intermediate buffers, reducing the chances of hitting the swap when
merging large images (see, for example, issue #3012.)

Additionally, this allows us to show progress indication.  Have the
relevant gimpimage-merge functions take a GimpProgress, and pass it
down to gimp_image_merge_layers().  Adapt all callers.

(cherry picked from commit e83d8ac4f2)
2019-02-25 05:10:59 -05:00
Ell
9de3b475ae app: streamline action_data_get_foo() functions
Streamline the various action_data_get_foo() functions, by having
each function only match the action data directly against its
specific type(s), and use the other functions to match the action
data against their corresponding types, instead of having each
function directly exhaust all possible matches.

Other than reducing depulication, it fixes certain cases in which
some action_data_get_foo() functions would fail to find a match,
even though one exists, since they failed to exhaust all the
options.

(cherry picked from commit 914200f3ad)
2019-02-25 05:10:58 -05:00
Alexandre Prokoudine
648703b6f0 Remap Linear Invert's mnemonic to I to remove a duplicate with Levels 2019-02-14 01:21:01 +03:00
Jehan
d815f355bb Issue #2922: Some sentences appear untranslated.
Again some missing context when requesting the strings (while they were
declared with context in static NC_()).
Also some mixup with some zoom actions strings declared with different
context in the same GimpEnumActionEntry.

(cherry picked from commit 6c5b6c6135)
2019-02-08 13:33:47 +01:00
Jehan
7067c3add3 Issue #2922: Some sentences appear untranslated.
(cherry picked from commit 60c334a779)
2019-02-08 11:44:51 +01:00
Jehan
1825392dbe Issue #2920: Dilate and Erode filters' tooltips are untranslatable.
Wrong message contexts!

(cherry picked from commit f8f3a74971)
2019-02-07 18:33:01 +01:00
sabri ünal
a0361ec535 Annotation for translators.
(cherry picked from commit 74df62034a)
2019-01-10 12:55:42 +01:00
Michael Natterer
25983b8280 Issue #2751 - Some Translated sentences appear as Untranslated
Pass the translation context to gimp_action_group_add_*_actions() to
make action translations work.

(cherry picked from commit 55219ffaf1)
2019-01-05 02:59:12 +01:00
Michael Natterer
a27f7c7724 Issue #1788 - Inconsistency between FG color and selected color in...
...palette views despite selected color being in the currently
selected pallette

As suggested by Massimo, changing the color comparison EPSILON in
gimppalette.c from 1e-10 to 1e-6 fixes this, and is really small
enough.

Also, generally clean up color comparison epsilons:

- use a #define, not hardcoded values for all uses of
  gimp_rgb[a]_distance()
- call the #defines RGB_EPSILON and RGBA_EPSILON
- make them all 1e-6 or larger

(cherry picked from commit abd7cbfc8d)
2019-01-02 01:53:02 +01:00
Ell
480d2aa588 app: show error on attempt to clear/cut layer with locked alpha channel
Show an error message, and blink the layers-dialog lock-box, when
attempting to clear/cut a layer with a locked alpha channel.

(cherry picked from commit e967e5fa9e)
2018-12-31 04:40:18 -05:00
Ell
23ae869f21 app: remove "Edit -> Fade..."
This commit completely removes the "Edit -> Fade..." feature,
because...

- The main reason is that "fade" requires us to keep two buffers,
  instead of one, for each fadeable undo step, doubling (or worse,
  since the extra buffer might have higher precision than the
  drawable) the space consumed by these steps.  This has notable
  impact when editing large images.  This overhead is incurred even
  when not actually using "fade", and since it seems to be very
  rarely used, this is too wasteful.

- "Fade" is broken in 2.10: when comitting a filter, we copy the
  cached parts of the result into the apply buffer.  However, the
  result cache sits after the mode node, while the apply buffer
  should contain the result of the filter *before* the mode node,
  which can lead to wrong results in the general case.

- The same behavior can be trivially achieved "manually", by
  duplicating the layer, editing the duplicate, and changing its
  opacity/mode.

- If we really want this feature, now that most filters are GEGL
  ops, it makes more sense to just add opacity/mode options to the
  filter tool, instead of having this be a separate step.

(cherry picked from commit ed7ea51fb7)
2018-12-27 11:45:11 -05:00
Ell
edbda43028 app: add "direct" parameter to gimp_projection_flush_now()
Add a boolean "direct" parameter to gimp_projection_flush_now(),
which specifies if the projection buffer should only be invalidated
(FALSE), or rendered directly (TRUE).

Pass TRUE when flushing the projection during painting, so that the
affected regions are rendered in a single step, instead of tile-by-
tile.  We previously only invalidated the projection buffer, but
since we synchronously flush the display right after that, the
invalidated regions would still get rendered, albeit less
efficiently.

Likewise, pass TRUE when benchmarking the projection through the
debug action, and avoid flushing the display, to more accurately
measure the render time.

(cherry picked from commit dac9bfe334)
2018-12-02 10:15:36 -05:00
ONO Yoshio
cd55cb3102 Issue #2489 - Gimp 2.10.8 layer menu text along path
Related #2064 - text along path not working with vertical text.

(cherry picked from commit a2da1cd596)
2018-11-13 12:56:25 +09:00
Ell
0462734ffb Issue #2303 - Please add Constant type of gradient interpolation ...
... to make multi-color hard-edge gradient fills possible

Add a new "step" gradient-segment blending function, which is 0
before the midpoint, and 1 at, and after, the midpoint.  This
creates a hard-edge transition between the two adjacent color stops
at the midpoint.  Creating such a transition was already possible,
but required duplicating the same color at the opposing ends of two
adjacent stops, which is cumbersome.

(cherry picked from commit 68bf99e806)
2018-10-23 12:22:57 -04:00
Sergio Jiménez Herena
360aee10d8 app: Add option in the windows menu to hide the image tab bar. 2018-10-22 20:41:29 +02:00
luz.paz
23648e753e Misc. typo fixes
Found via `codespell`

(cherry picked from commit 386587736f)
2018-09-17 16:05:02 +02:00
Ell
40ac4f7bc0 app, icons, menus: add performance-log recording to the dashboard
Add an option to record a performance log through the dashboard.
The log contains a series of samples of the dashboard variables, as
well as the full program backtrace, when available.  As such, it
essentially acts as a built-in profiler, which allows us to
correlate program execution with the information available through
the dashboard.  It is meant to be used for creating logs to
accompany perofrmance-related bug reports, as well as for profiling
GIMP during development.

The sample frequency defaults to 10 samples per second, but can be
overridden using the GIMP_PERFORMANCE_LOG_SAMPLE_FREQUENCY
environment variable.  Backtraces are included by default when
available, but can be suppressed using the
GIMP_PERFORMANCE_LOG_NO_BACKTRACE environment variable.

Logs are created through the new "record" button at the bottom of
the dashboard dialog.  When pressed, a file dialog is opened to
select the log file, and, once confirmed, data is being recorded to
the selected file.  Recording is stopped by pressing the "record"
button again (we use a highlight to indicate that recording is
active.)

While recording, the "reset" button is replaced with an "add marker"
button, which can be used to add event markers to the log.  These
can be used to mark events of interest, such as "started painting"
and "stopped painting", which then appear in the log as part of the
sample stream.  Markers are numbered sequentually, and the number
of the next (to-be-added) marker appears on the button.  Shift-
clicking the button adds an empty (description-less) marker, which
is only identified by its number; this can be used when markers
need to be added quickly.

The log is an XML file, containing some extra information (such as
the output of "$ gimp -v", and symbol information) in addition to
the samples.  The data in the file is delta-encoded to reduce the
file size, meaning that samples (as well as some other elements)
only specify the changes since the previous sample.  This adds a
necessary decoding step before data can be processed; the next
commit adds a tool that does that.

There are currently no tools to actually analyze the data -- that's
still TBD -- but at least we can start gathering it.
2018-09-02 03:26:11 -04:00
Ell
14ce0763ce app: add mnemonics to dashboard action labels
(cherry picked from commit a109a77db1)
2018-09-02 03:17:56 -04:00
Ell
e10d5852c1 app: add gegl:long-shadow to the menus
(cherry picked from commit 537bf4ec6a)
2018-08-09 19:03:06 -04:00
Pat David
a1d2c05f0f app, libgimpbase: update vertical text labels (shorten)
Shortening vertical text option labels a little bit.

(cherry picked from commit 0ce4db749d)
2018-08-03 18:23:44 -04:00
Jehan
c25aaaa0e0 app, libgimpbase: update vertical text labels.
This is my attempt to get better labels, shorter and also (hopefully)
improved English.
As Mitch states though, this is a Japanese-French-German conspiracy! So
any of you native English speakers out there, please review and suggest
proper English if needed. :-)

(cherry picked from commit 9cdedc98f8)
2018-08-02 15:26:19 +02:00
ONO Yoshio
8945f4b96d Fixed when texttool popup is shown first, it does not have current text direction.
(cherry picked from commit ee468b0024)
2018-08-02 15:26:19 +02:00
ONO Yoshio
e2958714d9 MR !19: Add support for vertical text writing.
Squashed commit of the following:

commit ee1ff7d502658cfa1248a13a3f0348495db07eda
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sun Jul 29 00:31:47 2018 +0900

    Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.

commit d87d012d697628da28fe90199cc04b95b72ba8ef
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 16:23:10 2018 +0900

    Fix a typo.

commit cf0238bf7df56c384cdf3b7ec69557d14740f853
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Sat Jul 28 15:50:57 2018 +0900

    Fixed seg fault error.

commit b07f60d06fa1a753fda5b4d46af01698c344154e
Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
Date:   Fri Jul 27 17:15:34 2018 +0900

    Add support for vertical text writing.

    https://gitlab.gnome.org/GNOME/gimp/issues/641

(cherry picked from commit 587d9bbb03)
2018-07-30 23:10:11 +02:00
Michael Natterer
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
Ell
6ac4c48d9a app: add gegl:stereographic-projection (little planet) to the menus
(cherry picked from commit a96264b1b7)
2018-07-05 09:54:16 -04:00
Alexandre Prokoudine
c2e1147ff5 Sync USM menu entry to GEGL 2018-07-02 02:32:29 +03:00
Michael Natterer
5feabfd1e0 app: more GimpGradientEditor cleanup
Let the split and replicate segments dialogs keep their own data and
don't use GimpGradientEditor struct members. Remove redundant members
and indent the struct.

(cherry picked from commit b8e75a0201)
2018-06-24 18:18:32 +02:00
Michael Natterer
7fece09eaf app: peek/poke much less in GimpGradientEditor internals
Add gimp_gradient_editor_get_selection() and set_selection()
and use them in gradient-editor-commands.c

(cherry picked from commit 025a13b519)
2018-06-24 16:02:18 +02:00
Ell
01e5390052 app: flush image after selecting colormap color
(cherry picked from commit 6af2a4997b)
2018-06-22 13:39:24 -04:00
Michael Natterer
2e007713a2 app: argh!
(cherry picked from commit f335ef7b61)
2018-06-22 13:57:44 +02:00
Michael Natterer
bd14991664 app: fix signature of gimp_gegl_procedure_get_sensitive()
(cherry picked from commit 7c3191fdd0)
2018-06-22 13:55:56 +02:00
Michael Natterer
cf4ef427b3 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.

(cherry picked from commit 63817485c0)
2018-06-22 13:49:45 +02:00
Michael Natterer
86ad7a624f app: move the gradient editor color dialog code to GimpGradientEditor
Same as previous commits.

(cherry picked from commit 558641fe6c)
2018-06-21 17:26:42 +02:00
Michael Natterer
e9bf0c05d2 app: move the colormap editor color dialog code to GimpColormapEditor
See commit below.

(cherry picked from commit 5edc0306f9)
2018-06-21 13:44:49 +02:00
Michael Natterer
913389aa91 app: move the palette editor color dialog code to GimpPaletteEditor
That's cleaner than having it in palette-editor-commands.c

(cherry picked from commit 1c1dd2038e)
2018-06-21 12:46:45 +02:00
Michael Natterer
cda8d386e4 app: should --amend my commits after I fix something...
(cherry picked from commit 52204b74b1)
2018-06-20 20:34:36 +02:00
Michael Natterer
a8e1ca1252 app: protect windows-actions.c against adding/removing a GdkDisplay twice
same code as in GimpDeviceManager, should be only ever needed in the
presence of debug modules like GtkInspector.

(cherry picked from commit bf66882878)
2018-06-20 20:31:53 +02:00
Jehan
82fbfdf9d4 app: do not stop the measurement when straightening.
Instead just transform the measurement extremities appropriately to
still map to the same points.
To do so, I also added out parameters to gimp_image_resize_to_layers()
so that calling code can get offsets from old origin (as well as new
image dimensions).

(cherry picked from commit d56a8d439e)
2018-06-05 23:36:24 +02:00
Michael Natterer
a8657b057d app: remove all old font management code, switch to GimpFontFactory[View]
Biggest change in this commit is reordering stuff in GimpContext
because GimpFont is now a first class citizen.

(cherry picked from commit e88fb8e9c7)
2018-06-03 20:48:34 +02:00
Ell
957cdc23a0 app: disallow editing text layers while fonts are loading
We already avoid rendering text layers while fonts are loading,
showing an appropriate message, but this will soon be replaced with
waiting for the fonts to finish loading.

Instead, don't allow the text tool to start at all while the fonts
are loading (showing an appropriate tool message, and a BAD cursor
modifier), and halt the tool when reloading fonts if it's already
started.
2018-05-29 16:07:48 -04:00
Jehan
89c829a242 Issue #1211: Load fonts in background after startup.
Fonts should not be blocking startup as this provides a very bad
experience when people have a lot of fonts. This was experienced even
more on Windows where loading time are often excessively long.
We were already running font loading in a thread, yet were still
blocking startup (thread was only so that the loading status GUI could
get updated as a feedback). Now we will only start loading and proceed
directly to next steps.
While fonts are not loaded, the text tool will not be usable, yet all
other activities can be performed.

(cherry picked from commit 2484dec7d5)
2018-05-27 02:36:39 +02:00
Michael Natterer
2439ae3acf app: add new action "view-scroll-center" with shortcut Shift+J
The zoom focus discussion on IRC suggests that everybody is annoyed
about centering behavior (or lack thereof), so here is a way to
explicitly center the image witout zooming.
2018-05-19 18:06:49 +02:00
Ell
f5ecc9f859 app, menus: add gegl:spherize to the menus 2018-05-06 07:13:08 -04:00
Ell
cdd129110c app, menus: add gegl:recursive-transform to the menus 2018-05-06 07:13:00 -04:00
Jehan
e796e3a50a app: popup error at startup when some fonts fail to load.
As proposed on IRC. This will allow people to debug their fonts (for
instance when there are permission issues or whatnot) by knowing the
list of problematic fonts in an error dialog at startup (and not only on
terminal).
2018-05-01 03:25:58 +02:00
luz.paz
4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
Michael Natterer
dcefc10eca app: make setting of layer mode on new layers smarter in layers-commands.c
If the mode remembered in GimpDialogConfig is NORMAL or NORMAL_LEGACY,
use the image's default new layer mode instead.
2018-04-24 14:00:34 +02:00
Simon Budig
6ffa19d595 fix internal name of the filter-grid help-id 2018-04-23 01:53:49 +02:00
Michael Natterer
428110f63f app: remove non-cut/copy/paste functions from gimp-edit.[ch]
Move them to the new files gimpdrawable-edit.[ch] and
gimpimage-fade.[ch].
2018-04-18 23:48:33 +02:00
Michael Natterer
bf49b47620 Bug 795207 - Add color space to blend(gradient) tool options
First WIP commit, adds:

- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
2018-04-13 22:33:16 +02:00