Commit Graph

49148 Commits

Author SHA1 Message Date
Jehan c8547d0a50 app: new option "Use extents of layer contents" to Align tool.
Instead of using the layer borders, we use the bounding box for the contents.
This is similar to first run "Crop to Content" on every selected layer except
we don't actually need to crop. Therefore we can work on bigger layer than the
actual content while still arranging them based on content bounds.

So often the result of alignment/distribution feels wrong because it doesn't
correspond to the content we are seeing. With this option, we'll have the option
to choose the desired behavior.
2022-10-18 00:48:51 +02:00
Jehan 9be6a6b711 app: highlight guides which will be aligned or distributed. 2022-10-17 23:08:33 +02:00
Yuri Chornoivan 33330fb29c Update Ukrainian translation 2022-10-17 19:12:30 +00:00
Jehan 4eaf6c16b9 app: rework the Align tool interaction taking multi-item selection into account.
The old interaction was quite horrible. I don't think I ever really got a good
use of it. It was so hard to understand what you were picking and so on.

Now that we can multi-select items, let's just use this as the base of what we
want to align or distribute. Clicking on canvas will now mostly be used to pick
an item as reference. From now on, only the reference object will get on-canvas
handle, making it very obvious how your alignment or distribution will work.

I leave only an alternative picking method (with Alt or Shift-Alt pick) to add
guides to objects to align or distributes, as these don't have a selection
dockable.

I'm also improving the selection of stacked layers by looping through them
(similar as the layer selection on canvas feature) so that we can select even
background layers which have a lot of layers showing above.

I am planning to improve this tool even further, but this is a first step to
make it actually usable within the new multi-item interaction logic.
2022-10-17 19:03:50 +02:00
Alx Sa 53202a70ed app: Disabled symmetry menu when no image is set
To improve discoverability, the symmetry dockable's combobox menu is now
shown (but disabled) when no image is set.
2022-10-17 14:42:22 +00:00
Jacob Boerema 28e0033ed2 app: fix string of GIMP_HELP_FILE_CREATE_TEMPLATE
Even though GIMP updated the name of the define for Create Template to
GIMP_HELP_FILE_CREATE_TEMPLATE, it did not change the id string.
In gimp-help this string was updated, causing help not found when asking
for help for Create Template.

This commit updates the string used for the help id to be the same as
used in gimp-help. It also removes the old define that is not used
anymore in GIMP.
2022-10-16 17:17:18 -04:00
Hugo Carvalho 9469fd16f4 Update Portuguese translation 2022-10-16 14:15:05 +00:00
Hugo Carvalho e2416b2ba0 Update Portuguese translation 2022-10-16 14:07:23 +00:00
Piotr Drąg 0581df1caa Update POTFILES.skip 2022-10-16 14:17:40 +02:00
Martin bb91c380eb Update Slovenian translation 2022-10-16 06:21:57 +00:00
Yuri Chornoivan 05d36f9a27 Update Ukrainian translation 2022-10-16 05:51:29 +00:00
Alx Sa 00232e1787 plug-ins: Add support for loading .icns files
This ports ICNS loading code from Brion Vibber's 2004 plug-in.
It extends support for ICNS files that contain PNG or JP2 format icons.
2022-10-16 02:20:51 +00:00
Jehan 62963aa748 devel-docs: delete various devel docs which are now in developer.gimp.org. 2022-10-15 22:33:25 +02:00
Jehan 6c0c2f15c4 themes: toggle buttons were not styled at all when toggled. 2022-10-15 22:33:25 +02:00
Jacob Boerema 6cb58fbc8d app: remove duplicate GIMP_HELP_TOOL_CURVES define
This caused a missing documentation warning for help id gimp-tool-curves
in gimp-help.
2022-10-15 16:32:29 -04:00
Alx Sa b317eceda9 pdb: Use floating point offset in stroke_translate
Update gimp_vectors_stroke_translate () to accept
floating point values for offset parameters
like gimp_stroke_translate () does.
2022-10-15 18:26:55 +00:00
Jacob Boerema 4b4dd5ec38 app: remove unused GIMP_HELP_TOOLS_DIALOG help id
This help id was used in the past but all references to it were removed
long ago with commit c53113d0cc.

Let's remove this define too since it causes a warning in gimp-help when
checking for help id's without documentation.
2022-10-15 14:05:03 -04:00
Luming Zh 177e3b7d49 Update Chinese (China) translation 2022-10-15 16:29:52 +00:00
lloyd konneker 7708c3fec3 Issue #8744: refactor overdependence on gimpui.h
To reduce compiling due to changes in libgimpui.
2022-10-15 15:17:08 +00:00
Alexandre Prokoudine cb49cd84aa Update Russian translation 2022-10-14 18:39:48 +03:00
Yuri Chornoivan d26761ff01 Update Ukrainian translation 2022-10-13 11:06:51 +00:00
Martin e7246b1356 Update Slovenian translation 2022-10-13 08:10:06 +00:00
Alx Sa 0aa63806e6 text: Fix xcf load issue caused by MR !751
Loading an .xcf with a patterned outline caused GIMP to crash.
This is because PROP_GIMP was loaded at the end, so it was null when
text->gimp->pattern_factory was called. Moving PROP_GIMP to the
top of the property enum list ensures it's loaded first,
which resolves the issue.
2022-10-13 00:16:44 +00:00
Alx Sa ca6b58e970 text: Add outline options to text editor
This ports Massimo’s code to work in the latest version of GIMP.
It adds new outline-related properties to GimpText and GimpTextOptions.
These are controlled via the Text Tool Editor.
Cairo is currently used to draw the outline around the text.
2022-10-12 22:00:40 +00:00
Jehan 2080abf0a3 Issue #8734: Python-fu misses sys.stdout.flush.
Just add a no-op flush() as I think it's actually unneeded in the context of a
GtkTextView GUI. At least it doesn't cause issues with copy-pasted code or when
using external libraries using the sys.stdout.flush() interface.
2022-10-12 23:40:04 +02:00
Jehan bee4dd0fc3 app: finally remove the get_active_item() and set_active_item() abstract…
… methods of GimpItemTreeView.

There were 2 last usages of get_active_item() which are now gone with this
commit.
2022-10-12 22:47:22 +02:00
Jehan 0508148580 app: get rid of one more usage of get_active_item() abstract method. 2022-10-12 22:38:35 +02:00
Martin 6441008fa5 Update Slovenian translation 2022-10-12 20:18:14 +00:00
Jehan 9fc8260c7c app: "vectors-copy" and "vectors-export" are now multi-paths aware. 2022-10-12 22:13:38 +02:00
Jehan fde780daeb app: "vectors-(raise|lower)*" actions now multi-paths aware. 2022-10-12 21:45:13 +02:00
Jehan 2835e85950 app: make the "vectors-select-*" actions multi-selection aware. 2022-10-12 21:21:22 +02:00
Jehan acf428b24c app: get rid of one more gimp_image_get_active_vectors(). 2022-10-12 18:02:43 +02:00
Jehan 925d4c317f app: cleaning unused variables.
Removing build warnings!
2022-10-12 17:53:04 +02:00
Jehan 131cdf0f1c app: fix preview for multi-layer transform.
Though it was working in the "Composited preview" case, it was only showing one
of the multiple layers being transformed in the basic case.
2022-10-12 17:52:04 +02:00
Hugo Carvalho d589547fa0 Update Portuguese translation 2022-10-12 15:48:54 +00:00
Jehan 274c079c4c app: also show rotation preview for multiple-selected paths. 2022-10-12 17:19:10 +02:00
Jehan b74e6c2198 Issue #8640: Rotate two selected paths creates error window. 2022-10-12 17:19:10 +02:00
Jehan dd0fc44677 NEWS: update. 2022-10-12 01:08:55 +02:00
Jehan e4e87d65ca plug-ins: fix the new unit editor (!655).
- Don't forget to run gimp_ui_init() to get GIMP's styling in plug-ins.
- Process the "key-press-event" signal so that Escape key closes the window (as
  it used to before the MR commit).
- Expand vertically the tree view, otherwise resizing the window leaves a lot of
  ugly empty space, even though the tree view is still shown incomplete with a
  scrollbar.
- Fix the Help button (which was doing nothing).
- Use full words for the "Refresh" and "Help" buttons, rather than icons. Text
  is usually prefered for UI discoverability/understandability, unless there is
  a space issue (i.e. too many icons for all of them to be words).
- Add a "OK" button too, and reorder the buttons similarly to how we usually
  order them.
- Minor coding style fixes (alignments…).
2022-10-11 22:11:16 +00:00
Jehan dc8298ce76 libgimpwidgets: use "system-help" for GIMP_ICON_HELP.
Just "help" is not one of the standard icon names as per the Freedesktop Icon
Naming specification.
See: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html

Therefore when using this name, we usually don't have any icon (especially as we
don't provide any in our own icon themes).
Use "system-help" instead which is a standard name 'for the “Help” system
category'.
2022-10-11 22:11:16 +00:00
Niels De Graef 567d7beb11 plug-ins: Remove GtkAction from unit editor
Migrate to `GAction` and while we're at it, clean up the plug-in by
using `G_DECLARE_FINAL_TYPE()`.
2022-10-11 22:11:16 +00:00
Jehan c928fda8ff app: fix GEX installation with warning while decompressing.
There is not only the ARCHIVE_OK and ARCHIVE_FATAL cases. There are also
ARCHIVE_WARN cases which should not break the installation (I think?). Since I
still want to pass the warning over to extension developers, I am printing it to
stderr.

As an additional fix, prevent such a warning when installing an extension over
itself. In such case, it looks like the archive_entry_size() would be 0, which
was triggering some "Writing to Empty File" warning.
2022-10-12 00:08:28 +02:00
Jehan 5df4875c88 app: do not depend on returned image for successful file_open_with_display().
We may return GIMP_PDB_SUCCESS with no image for generic file procedure, such as
is the case with .gex extension files.
file_open_image() already sanitizes the status returned by the plug-in, so at
this point, we should trust the returned status.

This fixes a crash when loading .gex files (GIMP_PDB_SUCCESS status yet a NULL
error).
2022-10-11 23:19:18 +02:00
Jehan bfc9e4bb72 configure: add an info message to advise building with meson and report bugs. 2022-10-11 16:39:12 +02:00
Jehan 8ac5178214 libgimpwidgets: fix automake syntaxe.
Automake doesn't accept the "if else" syntax. Instead, we must add a new if/else
inside the first else block.

While I'm at it, I also add a G_GNUC_INTERNAL to the internal function
_gimp_pick_button_win32_pick(), though I don't think it's absolutely necessary
(yet explicit is better).
2022-10-11 00:29:57 +02:00
Jehan fb1cb22f62 app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
  set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
  app_exit_after_callback() which doesn't have to change the value of
  app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
  must call `gimp_exit (gimp, TRUE);` instead, which does more than just
  emitting this signal. It also takes care of cleaning any remaining
  images without a display. If we don't do this, we are leaking
  GeglBuffer when opening images from command lines while quitting
  immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
  the fact that all the properties of a GimpCoreApp were construct-only.
  Instead make these proper properties. I use a trick used in other
  interface, creating a gimp_container_view_install_properties() which
  is called from child classes.
  The point of GimpCoreApp is not just to share a common interface, it's
  rather to weakly simulate some kind of multi-inheritance in GObject.
  Since we want both GimpApp and GimpConsoleApp to inherit from a same
  parent class while we also want them to inherit either from
  GtkApplication and GApplication respectively (yet without linking to
  GTK in this second case), we are stuck as far as normal GObject
  inheritance goes. This is why we use an interface to which we add a
  private struct through a GQuark trick. We want the property settings
  and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
  get_*(). These are useless as we don't expect these to have different
  implementation depending on the actual child class. Once again, our
  main goal was to simulate multiple inheritance rather than actually
  have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
  headers, etc.
- Clean various other details, coding styles, fix several more bugs and
  more…
2022-10-09 16:12:07 +02:00
Lukas Oberhuber 1ee1224d05 app: Add in gimpconsoleapp and gimpcoreapp interface
GimpApp is a GtkApplication
GimpCoreApp is an interface for common functions
GimpConsoleApp is a GApplication (to avoid linking in Gtk)
2022-10-09 16:12:07 +02:00
Niels De Graef 27fe67814e app: initial work on moving to GtkApplication.
Reviewer's message (Jehan): This was a work-in-progress by Niels, which
we only keep in this state because Lukas worked over it. I have rebased
and fix-amended many broken part of this commit, because various things
had been changed in these areas of code since this commit was initially
written.
2022-10-09 16:12:07 +02:00
Jehan 8bbde7db25 Issue #8695: fix GIR build in autotools.
Fixing this error:

> Gimp-3.0.o:(.data.rel+0x430): undefined reference to `gimp_text_layer_get_type' linking of temporary binary failed
2022-10-09 16:09:10 +02:00
Martin 5eb65a06a5 Update Slovenian translation 2022-10-09 08:09:34 +00:00