In e61b1f76 things were changed to return string arrays that can be
freed with g_strfreev(), but that returned a one-element array
containing a NULL pointer for zero-length arrays. Fix the code
to return NULL again for zero-length arrays. See bug #751584.
Use a Babl format that actually exists for extra channels. Makes the
plug-in load black pages from the mentioned "Rome" BigTIFF, so this
only fixes the plug-in crash but doesn't fix loading of BigTIFF
images, whatever they are...
Revive and partly reimplement the code that loads indexed and b/w
images. Seems to work on the fax attached to the bug, and on a random
indexed RGB image.
...from tool options crashes GIMP
Applied a modified patch that actually removes the target list if it
became empty. This may or may not fix the bug; I can't tell because I
couldn't reproduce it any longer.
...being displayed
Need to call gimp_image_flush() on all newly opened images so whatever
image states are properly updated:
Call file_open_sanitize_image() at the end of loading (after profile
import), and re-enable the flush() call in the function.
Also, don't fiddle with undo disabling and enabling in
gimp_image_import_color_profile(). Instead, disable undo before
calling the function.
...in initially active tab
We intend reuse the dialog across displays, so don't destroy the
dialog in GIMP_TOOL_CONTROL_HALT, only hide it. This way the dialog
keeps its detached state.
Adding -Wreturn-type for general case, but also -Wsystem-headers to warn
of g_return_if_fail() on non-void, since these are macros from system
headers directory, and -Wreturn-type would not warn for these.
Don't hardcode modifier masks in the wheel and keyboard input
controllers. Instead, hardcode accelerator strings and get the right
modifier mask from gtk_accelerator_parse() at runtime.
This turns e.g. "<Shift><Primary>" into Shift+Cmd on OS X and into
Shift+Ctrl on X11 and Windows.
Also rename the events accordingly and change the event names in the
default controllerrc.
Unrelated: reorder the actions so the ones with less modifiers are
listed first, and change the order of action matching to match the
actions with most modifiers (the last ones) first.
...in initially active tab
gimp_tool_gui_update_shell(): implement the "overlay" case and hide the
gui on the previous shell, then show it on the new one.
Ever since 72617e42b, whenever the user generated a lot of mouse
input, we would constantly queue redraws to the rulers. These redraws
had a higher idle priority than updating the canvas, so we would
rarely get around to canvas updates, which made certain tools
(painting with dynamics, the blend tool) feel very unresponsive.
This fixes it by only redrawing the rulers if the mouse has moved
far from the last location, or if there are no idle handlers with
a priority above LOW.
Based on GimpPopup as parent, this is a generic search popup widget,
which can display any list of action. The results construction logics
is not part of the widget, and is built through a callback instead,
which could allow to use it to create different dialogs.
Add two private functions which are currently unused but will
become public once it's clear where exactly we need them:
gimp_color_profile_get_rgb_matrix_colorants(): returns a GimpMatrix2
with the RGB colorants.
gimp_color_profile_new_foobar(): takes an existing profile and creates
a new one with the same RGB colorants but a linear gamma TRC. To be
renamed and made more general.
gimp_drawable_get_sub_preview(): both the preview buffer's scale
factor and the src coordinates in the drawable were calculated
wrongly. Found by Massimo.