Use the newly added clipboard for entire images to copy/paste layers
(we only create single-layer clipboard images, and use only the first
layer of any recieved image, the layers can be arbitrarily complex
though):
- change gimp_edit_copy,cut,paste() to return/take a GimpObject
that can be a GimpImage or GimpBuffer
- cut/copy the whole layer if there is no selection
- always paste layers as new layers, not floating selections
- always paste news layers on top of the active layer, where
we would attach a floating selection
- add enum GimpPasteType { FLOATING, FLOATING_INTO, NEW_LAYER }
- add GimpPasteType parameter to gimp_edit_paste() and handle all
three cases there because there is now a lot of common code
involved
- change all callers accordingly, use only legacy buffer pasting
from the PDB for now
which can be used to load/save XCF from/to arbitrars streams. Use the
new functions from the load/save procedure invokers.
This commit also fixes a leaked open file ans input stream for each
loaded XCF.
...when threshold > 0
Add an "Antialias" toggle to the bucket fill options and set it on the
GimpFillOptions. In gimp_drawable_bucket_fill(), pass it to
gimp_pickable_contiguous_region_by_seed() instead of always defaulting
to TRUE.
The position of the toggle and its huge tooltip may need some
adjustment.
Add GimpFillOptions and GimpStrokeOptions to GimpDialogConfig and use
them in the Fill/Stroke Selection/Path dialogs and for the "with last
values" commands. Add GUI for them to Preferences -> Dialog Defaults.
This requires most of the stuff in my last few commits, and some
more changes:
GimpFillOptions is a GimpContext which has all sorts of connections to
everything, including a Gimp pointer. Hack around in GimpDialogConfig
to add a Gimp property, and add "gimp" parameters to quite some GimpRC
functions. Treat the Gimp* as a GObject* in all public API because
core/ stuff is not known in config/.
Move fonts, data factories, document list, paint methods and user
context creation to gimp_init() or gimp_constructed() so that most
members are created when gimp_new() is done. This does not load any
data earlier, it just makes sure that all containers exist when
gimp_load_config() is called. It's also cleaner and less fragile,
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
Namely dialogs_attach_dialog(), _detach_dialog(), _get_dialog()
So we don't create the same dialogs multiple times, but raise the
already existing ones. Port some places that did this manually
to the new functions, and use it for many other dialogs.
...after entering single window mode
In GimpToolPalette, implement GtkWidget::hierarchy_changed() and
re-set the tooltips using the new toplevel's actions.
In gimp_widget_set_accel_help(), make sure we don't connect to the
same action twice, and make sure we disconnect everything if either
the widget or the accel_group go away.
It's deprecated in GTK+ 3.x, so we get rid of some deprecation
warnings. Also, it has always only been a utility function that hides
what is really going on in the widget hierarchy.
Try harder to show help when webkit is missing or the help browser
won't start:
- offer to switch to the web browser when the help browser is
present, but won't start for some reason
- in prefs, don't bother showing the help browser GUI when webkit
is missing, otherwise show a warning label if the help browser
is not installed even though webkit is there. Switch to the web
browser in both cases (modified patch from lisanet)
- add OS X replacement for gtk_show_uri() in plug-in-web-browser
(modified patch from lisanet)
(gimp-2.9:3): Gimp-Core-CRITICAL **: gimp_marshal_VOID__OBJECT_POINTER: assertion 'n_param_values == 3' failed
Conflict between signal marshal function
and signal emission.
AddressSanitizer output (paths manually shortened)
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x7f543247d1d0 in realloc (/lib64/libasan.so.3+0xc71d0)
#1 0x7f542d3ad02f in g_realloc glib/glib/gmem.c:159
#2 0x57918d in gimp_color_history_set_property gimp/app/widgets/gimpcolorhistory.c:169
#3 0x7f542d681ec0 in object_set_property glib/gobject/gobject.c:1423
#4 0x7f542d681ec0 in g_object_new_internal glib/gobject/gobject.c:1817
#5 0x7f542d6839ed in g_object_new_valist glib/gobject/gobject.c:2042
#6 0x7f542d683c73 in g_object_new glib/gobject/gobject.c:1626