Commit graph

46698 commits

Author SHA1 Message Date
Jehan
1de810f6de configure, meson: missing OpenRaster MIME type in desktop file.
Adding support for .ora files when Python plug-ins are installed.
2021-02-20 18:48:16 +01:00
Niels De Graef
dffab0e9a4 Remove GimpInt16Array
It isn't being used by any plug-in or any code in GIMP at all even.
Let's get rid of it while we can still break API, so we can cut down on
all the complexity of the gimp-param stuff a bit.
2021-02-18 11:32:45 +00:00
Balázs Úr
97db69c300 Update Hungarian translation 2021-02-18 06:51:02 +00:00
Balázs Meskó
300ca2cb92 Update Hungarian translation 2021-02-18 06:46:02 +00:00
Balázs Meskó
6e569e5325 Update Hungarian translation 2021-02-18 06:38:17 +00:00
Anders Jonsson
55dda62b97 Update Swedish translation 2021-02-16 21:41:07 +00:00
Yuri Chornoivan
e58919aea4 Update Ukrainian translation 2021-02-16 10:27:08 +00:00
Balázs Meskó
846b706293 Update Hungarian translation 2021-02-16 01:14:32 +00:00
Jehan
015f49467d Issue #6435: Off canvas guides.
Allow guides with off-canvas position since we can now view and work
outside the canvas.

The guide deletion interaction does not change too much, except you
don't delete a guide because it's dropped off-canvas but off the display
viewport area instead.

The XCF format is technically unchanged as PROP_GUIDES was already
expecting an int32 coordinate (with max value at GIMP_MAX_IMAGE_SIZE,
way below uint32 max anyway). Yet our code and XCF docs was explicitly
asking to ignore negative coordinate guides, which makes a change in
behavior for the XCF parser, hence a new version XCF 15. Loading will
still ignore negative position guides (even also bigger than image
dimension guides now) for XCF 14 and below, but will now accept any
position for XCF 15 and above.
2021-02-15 22:52:27 +01:00
Jehan
e88107153c plug-ins: improve a bit PDF export progression.
Subdivise progression steps inside layer groups.

It is not perfect yet as it would not handle perfectly weird edge cases
where you have for instance a lot of layers in a top layer group with
only many other top layers. But it would still handle it better than
before. Ideally we should simply count all non-group "leaf" layers in
the layer tree and use this as the number of steps. In other words, we
should do a first pass through the whole layer tree.
2021-02-15 22:30:30 +01:00
Jehan
708bdf325a libgimp: improve gimp_progress_update().
- Do not only check the step width, but also the time interval between 2
  progress calls. No need to run a PDB call, then update the GUI every
  millisecond or so. This would just unecessarily slow down the plug-in
  for updates which the user won't ever see. From my tests, 20 updates
  per second is plenty enough to have the progression look fluid. No
  need for much more.
- Do not warn anymore on stderr when we drop progress updates. Even if
  just on the unstable builds, such warning is wrong. First because it
  depends on files and machines. Typically a lot of processing could set
  their progress updates relatively to layers. Yet we currently consider
  that 1/256 steps are too small. So what if you have more than 256
  layers? This would make the same code print a warning on big files,
  and none on small files.
  The second reason is that we should not encourage plug-in developers
  to have limited progression updates, but the opposite (progression
  info makes for good feedback), neither should we expect them to
  compute the step size or the time between updates. It's a much saner
  approach to have them only take care about computing relevant update
  steps while our API focuses on filtering these in order to avoid
  overloading the GUI.
  It makes for good progression feedback, sharp GUI while not taking all
  CPU time on it, all this while making it easy on plug-in developers.
2021-02-15 22:30:30 +01:00
William Ferguson
636eb02edc plug-ins: update darktable lua script to API change in darktable master
The Lua API is undergoing changes in darktable master. I've fixed the lua-scripts repository as I've made
changes, but I forgot about the collateral damage.

Attached is a fixed version of file-darktable-export-on-exit.lua which should be good for darktable 3.6 and
beyond.

Fixes #6421
2021-02-15 17:11:32 +00:00
Yash Pal Goyal
09bce474b1 Prettifications of the 3 issue templates 2021-02-15 09:52:30 +00:00
Balázs Meskó
b7fd0b3bf7 Update Hungarian translation 2021-02-15 00:00:32 +00:00
Balázs Meskó
a434dadb1d Update Hungarian translation 2021-02-14 23:31:58 +00:00
Jehan
6b281e8f00 plug-ins: add progression to PDF exporting.
PDF exporting had no progression. In particular when exporting a PDF
with more a hundred pages today, it took maybe 20 secs without any
progression status, which is annoying.

Limitations:
1. When exporting as multi-images, we reset to 0 at each image. I am
   actually not sure if this is the expected behavior.
2. I am updating the progression per top layer, not doing finer grained
   progression steps. An extreme case would be a single top layer group
   with many children layers inside. Yet I wanted to avoid too much
   progression updates for the normal cases.
2021-02-15 00:03:03 +01:00
Balázs Úr
a4a9e17bf1 Update Hungarian translation 2021-02-14 00:49:05 +00:00
Balázs Úr
f70f24dda2 Update Hungarian translation 2021-02-14 00:17:47 +00:00
Jehan
82438728fb Issue #288: Point snapping to guides does not work outside the canvas.
This commit also makes snap to grid and snap to vectors work off-canvas.
Since we now have off-canvas viewing, it just makes sense that snapping
would work there too.

Note that I disable snap to grid when "Show All" is OFF. I am actually
unsure this is right (as "Show All" is a view action, and we usually
don't change behavior based on view actions; for instance snap to guides
are not disabled if guides are hidden). Yet I noticed we do this in
various other features when off-canvas. We kind of use this view flag as
a switch for features working off-canvas (for instance, color picking
works off-canvas only when "Show All" is ON). So let's keep the same
logics for now at least.

Snap to guide or snap to vectors will always work though, because guides
and vectors are always visible off-canvas (even when "Show All" is OFF).
They always have been (visible, not snappable off-canvas; now they are
both).
2021-02-13 13:02:48 +01:00
Orgad Shaneh
b134da1f39 Fix Python execution with autocrlf on Windows
If the interp file contains CRLF, the \r is read as part of the
executable file name, and gimp searches for python3.exe\r.
2021-02-09 21:58:50 +00:00
Jehan
118c0c6734 app: fix max size computation for status message.
Our error/message handling code was checking if the status bar label was
big enough to hold the message by checking the GtkLabel allocation. This
means that error message ended up on status bar only if a status text
bigger than the error message was previously displayed.
Even setting gtk_widget_set_hexpand() or the "expand" container child
property on the label, I could not find a way for GTK to actually give
it as much space as possible on the status bar.

Instead, I am computing the full container box size, starting from the
label x coordinate (assuming the label is the last shown widget on the
status bar, as usually the progress bar and the cancel buttons are not
shown in the same time as the message label). This gives me a much more
appropriate result of the maximum size which this label can hold without
ellipsizing.
2021-02-09 18:40:43 +01:00
Piotr Drąg
8342d969ed Update Polish translation 2021-02-07 12:02:31 +01:00
Anders Jonsson
6298657297 Update Swedish translation 2021-02-04 00:39:23 +00:00
Jehan
b7e7561583 app: fix wrong enum type bug. 2021-02-03 21:34:26 +01:00
Jehan
052fbedc83 libgimp: allow NULL title for gimp_procedure_dialog_new()…
… but only when a menu label was set with
gimp_procedure_set_menu_label(). In such case, this menu label is used
as dialog title (with mnemonic underscore removed).
2021-02-02 17:14:43 +01:00
Jehan
5e9c33b2c9 libgimp: add missing documentation for gimp_procedure_dialog_new().
This is important for introspection in particular with annotations.
2021-02-02 15:53:34 +01:00
Stanislav Grinkov
a6037760da
gui: #1140 Add image size template selector to resize canvas dialog
Adds option for selecting predefined page sizes using the same
template selector as on "New Image" dialog.

Syncs up size and offset unit selectors to have the same value
when changing template and when resetting whole dialog.
2021-02-01 09:31:21 +06:00
Jordi Mas
5781ee756a Update Catalan translation 2021-01-31 22:41:24 +01:00
Yuri Chornoivan
09ed4152dc Update Ukrainian translation 2021-01-31 17:36:16 +00:00
Jehan
7a363f9095 app: s/GEGL graph/GEGL Graph/
Let's have the same casing as other menu items.
2021-01-31 17:59:17 +01:00
Stanislav Grinkov
ce93d5c3ab gui: #5339 Disable GEGL Op menu action if no image is open
Because "GEGL Operations..." menu action should be active only
if image is open
2021-01-31 16:47:03 +00:00
Jehan
90d0a7f628 app, menus: move "GEGL Operation" from Tools to Filters > Generic menu.
See the discussion in #5339. Basically this is now technically a tool
(i.e. a child class of GimpTool) and tools can be activated anytime,
even when no images are opened, i.e. when they are useless (for instance
paint tools). Filters on the other hand were historically only
activatable with opened images. With time, tools and filters difference
got slimmer (until there are technically none nowadays where GEGL ops,
levels or curves are implemented as GimpTool too) if not only a
conceptual difference.

Since here GEGL Operation is really more on the "filter" side, let's
just move it to the "Filters > Generic" submenu, just next to "GEGL
Graph", also removing the mention of it being a "tool" from the help
message.
Then I will merge !402 for it to be (in)active depending on images, as
other filters do.
2021-01-31 17:46:29 +01:00
Thomas Manni
0d519a606f app: fix config properties / spin buttons mapping for Convolution Matrix filter
The filter's output is now correct, and rotating/flipping the matrix works as
expected.
2021-01-31 13:09:15 +01:00
Thomas Manni
b8abac1777 app: fix crash when deleting channel 2021-01-31 10:16:59 +01:00
Jacob Boerema
d8009a000b plug-ins: Remove gamma parameter in openraster call to file-png-save.
Commit d57eafd189 removed the
gamma parameter for file-png-save so we have to remove it here too.
2021-01-30 13:18:50 -05:00
Jehan
6bf7892cdf libgimpbase: fix def file. 2021-01-30 11:15:17 +01:00
Jehan
73a64a4ee8 app: use the GimpDisplay as progress object when exporting.
Since we now hide the file dialog when exporting, progression ends up
invisible, which is especially a problem with big files. Therefore use
the image display as a GimpProgress to show progression.
2021-01-30 10:44:36 +01:00
Jehan
5d5ad7ea73 libgimpbase: finally get rid of gimp_parasite_data() and…
… gimp_parasite_data_size().

gimp_parasite_data() was non introspection friendly because calling code
needs to know the size of returned data a way or another (the concept of
data pointer with random contents, no known size and no way to know the
end of the buffer is not usable in many languages other than C).

Now that all usage have been replaced by gimp_parasite_get_data(), we
can just remove the functions from the v3 API.
2021-01-30 10:17:29 +01:00
Jehan
3e4407a315 libgimp, libgimpconfig: use gimp_parasite_get_data().
As previously do not trust that parasite contents is proper text ending
with nul character by always using the parasite size info.
2021-01-30 08:57:43 +01:00
Jehan
ef3d4cddc4 app: fix crash when opening several times an export plug-in.
When running several times an export plug-in while one is still running,
the export file dialog may get destroyed and the second running plug-in
would try to call functions on a destroyed dialog, hence crashing core
GIMP.
2021-01-30 01:04:44 +01:00
Jehan
63d6d770c4 plug-ins: replace gimp_parasite_data*() with gimp_parasite_get_data().
Similarly to the previous commit, it is not only about using the new
API. I also make sure we do not assume that parasite data is
nul-terminated. In many places, we were just assuming so because these
were supposed to be parasite our code set. Yet these are data input
contained in files which can be wrong for any reason (corrupted file,
bugs, other scripts/plug-ins editing these parasites…). So instead of
assuming string parasites are always correctly formatted, I make sure
they are nul-terminated by passing them through g_strndup() when
necessary.
2021-01-30 00:20:34 +01:00
Jehan
ee26a39049 app: replace gimp_parasite_data*() with gimp_parasite_get_data(). 2021-01-29 23:52:03 +01:00
Jehan
443b738e61 libgimpbase: improve gimp_parasite_get_data().
Allow @num_bytes to be nullable, but add text in the documentation that
this is only useful when you want to check if there is contents.

Also make @num_bytes into a guint32, and finally set it to 0 when there
is no parasite.
2021-01-29 23:40:23 +01:00
Jehan
3303f9182e NEWS: update. 2021-01-29 20:17:47 +01:00
Jehan
d57eafd189 plug-ins: gAMA chunk export is now a redundant option.
Now when a gAMA chunk is set on an imported PNG (and if there is no
profile attached), an equivalent profile is created out of the gAMA
chunk. So the displayed image looks like it is supposed to.
On export, the generated profile should simply be saved together in the
PNG file. If not, the sRGB chunk is set anyway (and also an equivalent
gAMA/cHRM as recommended in the specs).

So basically we now have a proper support of the gAMA chunk, from import
to export, and display within GIMP takes this metadata into account
appropriately (in the shape of a generated equivalent profile).
Therefore it looks to me keeping the option is redundant. It is even
confusing (because it's actually hard to understand exactly what this
data is about, even our documentation about this metadata seems to be
wrong) hence possibly dangerous if someone thinks it is important,
checks the box, which would override other data or simply create
irrelevant or contradictory metadata.

So let's just remove this option. Development releases are the right
places anyway for people to notice this change and come to us if we
missed some usage regarding this option.
See also #5363.
2021-01-29 20:06:03 +01:00
Jehan
72af40b427 devel-docs: generate both gjs (Javascript) and Python API docs.
Apparently g-ir-doc-tool does not support other language than C, Python
and gjs right now (in particular neither Lua nor Vala bindings).
2021-01-29 18:04:20 +01:00
Jehan
eae3d47e32 devel-docs, meson: g-ir-doc option to generate introspected API docs.
Similar to the --enable-g-ir-doc option I just added on autotools. Also
separate this option from gtk-doc as it is unrelated (not everything
under devel-docs is related to gtk-doc!).
2021-01-29 16:51:47 +01:00
Jehan
4b39217181 devel-docs: generate Python API (GObject Introspected) documentation.
So much easier to write in autotools! Anyway here it is, also with a new
option --enable-g-ir-doc (by default set to false).
2021-01-29 15:22:36 +01:00
Anders Jonsson
84337cb754 Update Swedish translation 2021-01-28 19:44:50 +00:00
Anders Jonsson
9f46d92e8f Update Swedish translation 2021-01-28 18:35:45 +00:00