Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.
Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().
Make some GUI places deal gracefully with palettes/colormaps with zero
entries.
(cherry picked from commit 37372555e5)
Small fix for the last commit: set a silly small initial size request
on the wrap_box so it doesn't initially request too much and breaks
dock layout deserialization.
(cherry picked from commit a2334b0b15)
gimp_container_grid_view_viewport_resized(): set the wrap_box'
required width to just one cell_width, not cell_width * columns. This
way it can shrink also when attached to a toolbox dock. It remains
unclear why it could nicely shrink in all other dock columns.
(cherry picked from commit 6a5e37b68d)
If the selected item in a GimpContainerEntry is invalid, or else when the entry
is being updated, the text shows in red.
(cherry picked from commit 64fe3af1a9)
...one image onto another
gimp_dock_window_display_changed(): make sure the "auto-follow-active"
logic works both ways: when the active image or display is changed in
a dockable, update the global context. Fixes multi-window mode.
gimp_context_real_set_display(): make sure a context's display and
image are always in a consistent state and never have a display that
is not display->image: when display is the same as context->display,
check that the context's image matches display->image, so that after a
gimp_context_set_display(), the context is consistent in all
cases. Fixes single-window mode.
(cherry picked from commit bacc9c9635)
by adding a local "factory_context" variable instead of calling
gimp_dialog_factory_get_context (dock_window->p->dialog_factory)
multiple times.
(cherry picked from commit 076f375e78)
This is not a bugfix, just to seamlessly pick the next commit...
Don't pass a NULL pointer to gimp_text_buffer_get_font_tag() because
it is dereferenced in a call to strcmp().
gimp_context_get_font_name() returns NULL when the selected text
includes spans with different fonts. Add the same special handling for
spans with inconsistent sizes too, and add comments that we should
have the same for the color.
Original patch from Massimo Valentini.
(cherry picked from commit 804313bbec)
This should fix crashes in which tag objects got accessed after they
were disposed, because they still were stored with the popup object.
(cherry picked from commit b109e05806)
We cannot simply randomy move the focus from e.g. a text entry back to
the canvas. Instead introduce global handling of "Escape" and a
"primary_focus_widget" that is always set the the image window's
active canvas. When Escape is pressed, move the focus to that primary
focus widget, or beep if it is already there. Text widgets still get
the key events before that logic and can consume the Escape.
(cherry picked from commit 5880685472)
Create all display filters with "color-config" and "color-managed"
parameters set, not only the automatically added color management
display filter. This way we don't only support removing and adding the
filter again, but also support potential other color management
modules.
(cherry picked from commit bc190a6bab)
gimp_docked_iface_get_aux_info(): always save the button bar state,
not only if it is "false" because we cannot know the default value any
longer (the button bar visibility used to always default to "true", so
saving only a non-default "false" was fine).
(cherry picked from commit 6f5b4ad1f4)
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
(cherry picked from commit 7e273bc6d0)
Prefer text/uri-list over image/* to make dropping from file managers
always behave like opening the image directly.
(cherry picked from commit 454639f9d9)
This was causing first a visual issue where the style editor UI would
show no default font/size/style at instanciation, but even a crash
when the user would change the font size or style (bold, italic...)
from this UI before selecting a font or writing a text.
Current implementation had 2 issues, fixed by this commit:
1/ after the file save dialog is closed, the image would not close.
2/ if you switched the visible tab before saving the new image, it
would save and close the visible tab, instead of the expected one.
I don't know what I tested before, but it didn't work. This patch does
the magic in two places, one of which I missed.
(cherry picked from commit 4e340b613b)
Fix GimpSpinScale too: add the needed events ourselves, and handle
motion hints (which the parent classes add) in motion().
(cherry picked from commit 85a099f988)
When font, size or color were changed, set the text buffer's current
insert_tags just as we already do for the bold, italic etc. toggle
buttons. Changed gimp_text_style_editor_list_tags() to also return
the tags for font, size or color.
(cherry picked from commit abd2e78bdf)
Don't allow to assign Modifier+Space shortcuts, there is so much code
dealing with Space in canvas event handling, we can't have it invoke
arbitrary actions at the same time.
(cherry picked from commit 99dfc5930f)
Ensure a minimum size of the drop area and make sure it stays visible
at the bottom of a minimized toolbox. This wastes a few pixels at the
bottom of a toolbox that contains no dockables.
(cherry picked from commit 74bc070147)
Fix default export extension to be as specified:
1. last export of this image
2. imported extension
3. last export of any image
4. png
2 and 3 were reversed in the code.
(cherry picked from commit aa6151d1af)
Initialize the axes[] array with zeros and change pressure curve
mapping to not try to "interpolate" shit like NaN and crash.
(cherry picked from commit c7b9728cc8)
In order the fix the obvious confusion, add another file filter which
contains all the types that are savable with the dialog, name it
either "All XCF images" or "All export images", and make it the
default filter.
(cherry picked from commit 14f6d5ee44)
Reduce the requested width of the "You can drop foo here" label to 16
pixels, which makes is look a bit crappy, but at least the toolbox
becomes shrinkable to < 3 columns. Whoever keeps this empty space
around without using it shall henceforth be punished by having to see
that distorted and misplaced label.
(cherry picked from commit 573faa39b0)
This got lost during layer group porting, reimplement it, but restrict
"all layers" to the clicked layer's branch in the tree.
(cherry picked from commit 67b5a509b6)
Closing the display filter editor with a filter selected
in the listview on the right, used to produce (quitting GIMP):
==32359== Invalid write of size 8
==32359== at 0x8808DF5: g_nullify_pointer (glib/glib/gutils.c:2099)
==32359== by 0x8358781: weak_refs_notify (glib/gobject/gobject.c:2469)
==32359== by 0x4C3730A: gimp_color_display_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplay.c:197)
==32359== by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359== by 0x4C37EFA: gimp_color_display_stack_dispose (gimp-2-8/libgimpwidgets/gimpcolordisplaystack.c:150)
==32359== by 0x83596A7: g_object_unref (glib/gobject/gobject.c:2986)
==32359== by 0x53F1C3: gimp_display_shell_filter_set (gimp-2-8/app/display/gimpdisplayshell-filter.c:58)
==32359== by 0x536A50: gimp_display_shell_dispose (gimp-2-8/app/display/gimpdisplayshell.c:765)
Remove the button_release handler again, setting dnd_widget to NULL on
container change is enough to fix the crash I've seen, I added the
other handler just out of paranoia and apparently didn't test it.
(cherry picked from commit 92a3944442)
specifically in button_release() and when the container changes, we
can badly crash in some situations otherwise.
(cherry picked from commit 27a767ee54)
by having two booleans "export_backward" and "export_forward" in the
api instead of just an "export" one that would destroy the "imported
from" state. This change fixes the state of the "Overwrite" menu item,
so it stays visible until the file got either saved or exported to
another filename.
This also reverts commit a4beeecf2b, so
Ctrl-S is always invokable even if invisible.
(cherry picked from commit 39c18e9a48)
In fact, it broke much more than that because the way XCF loading
replaced the image's mask prevented the image's "mask-changed" signal
from ever being emitted. Add private API gimp_image_take_mask() which
properly sets the mask and use it for image construction and the XCF
selection loading hack.
(cherry picked from commit ab4c613a70)