On OSX, set all transient plug-in windows to UTILITY, so they appear
on top of the image window, which is a bad hack. See the comment in
gimp_window_set_transient_for_display().
If gimp_window_set_transient_for() fails (due to platform
restrictions), at least set GTK_WIN_POS_CENTER on the window, so it
gets centered on the monitor where the mouse is. This also removes the
need for OSX specific centering code in GimpDialog (bug 677776).
Apply and heavily modify patch from remyDev which adds "lock position"
to GimpItem, similar to "lock content". Lock position disables all
sorts of translation and transform, from the GUI and the PDB.
Cleaned up some aspects of the lock content code as well because a
second instance of similar code always shows what went wrong the first
time.
On OSX, call [NSApp activateIgnoringOtherApps] when a plug-in dialog
is shown, so the plug-in process becomes the active app, and the
dialog gets focussed.
In order to avoid doing this in GimpDialog (which is also used in
the core), do it in gimp_ui_init() which all interactive plug-ins
call, and when gimp_temp_proc_run() is called interactively, to
catch repeated activation of an already running plug-in.
Also, set GimpDialog's initial position to GTK_WIN_POS_CENTER,
or they will pop up in the top left corner.
Inspired by patches from Simone Karin Lehmann and Daniel Sabo.
gimp_tile_put(): make sure we don't free libgimp's tile data twice in
the non-SHM case. I could never reproduce the bug, but I'm pretty sure
this fixes it. The change in gimpprotocol.c is just cleanup.
Remove the privately added GimpItemComboBox class instead, it confuses
the hell out of python. Instead, use g_object_set,get_data() to manage
the newly needed members, and code duplication.
Let image and item combo boxes connect to their own "changed" signal
first, and if the chosen image/item doesn't exist any longer,
reinitialize the combo box and select the first item instead.
Also fixes the type macros in gimpitemcombobox.h which were lacking a
')' and introduces an internal GimpItemComboBox class to hold the
common functionality.
Add all a tree's items to the combo boxes. Try to visualize the tree
structure by prepending '-'s, but that could probably need some
suggestions for improvement.
Fix the docs, the function does what it's supposed to do. Passing
"0, -1" actually means "insert where the ui would insert" and is
supposed to be used when e.g. scripts create layers.
Add gimp_plugin_enable_precision() in libgimp which switches the
plug-in to deal with the drawables' real precision, call it from the
libgimp GeglBuffer and Babl format APIs. If it's not enabled, let the
core's plug-in convert the tiles to legacy formats when sending them
over the wire.
GIMP was doing evil hacks lying to GEGL about it's pixels being in a linear
color space when they are not. This causes incorrect rendering, makes gaussian
blur misbehave etc.
The legacy projection modes should be implemented using the same 2.2 gamma
formats that are correct to specify for sRGB data. (for proper color
management in higher bitdepths; icc backend babl formats should be used.)
For the old image modes correct babl formats are:
R'G'B'A u8 - 8 bit RGB with 2.2 gamma (sRGB) with linear alpha component
R'G'B' u8 - 8 bit RGB with 2.2 gamma (sRGB)
Y'A u8 - 8 bit Grayscale with 2.2 gamma with linear alpha component
Y' u8 - 8 bit Grayscale with 2.2 gamma
Y u8 - 8 bit linear data, used for masks/channels
A u8 - 8 bit linear alpha
-----------------------------------------------
RGBA float - 32bit floating point linear light RGB
RaGaBaA float - 32bit floating point linear light RGB, premultiplied alpha
to be used for processing that needs to scale by the alpha,
(blurs, resampling etc)
R'G'B'A float - 32bit floating point sRGB with gamma, to be used where
the result depends on being closer to perceptual when
processing, can be used a cheaper alternative to CIE Lab
based modes.
-----------------------------------------------
The legacy layer modes should use the formats with gamma 2.2 only for loading
and rendering legacy XCF files correctly, in the brave new world compositing
should most likely be done in linear light with "RGBA float" and even better
"RaGaBaA float" like GEGL does for porter duff and other compositing modes.
The ability to chose the legacy layer modes should probably be hidden from the
user unless an old .xcf has been opened.
Apply heavily modified patch from Es Swartz which adds PDB API for
brush size, angle and aspect ratio, as well as a full interface for
ink. Changed to patch to add all procedures to the "context" group
instead of creating new PDB groups, properly use the new
GimpPDBContext APIs for paint options, and did some general cleanup.
(Warning, completely untested).