Make sure the duplicated group layer actually has a properly set up
tile manager taken from its projection, and not just a dumb copy of
the original group's tiles. Also optimizes away useless calls to
gimp_group_layer_update_size().
(gimp_image_merge_visible_layers): merge the visible layers in the
active layer's group. We can't possibly merge across different groups
anyway because there is no logical place to add the merged layer.
Moreoever, this change makes the group behave more like a sub-image,
which is our metaphor anyway.
There is no reason to disallow this, the merged-down group layer will
simply disappear from the image just as a normal layer, and its
projection composited with the layer below.
(gimp_group_layer_duplicate): change the allowed type of the duplicate
from GIMP_TYPE_GROUP_LAYER to GIMP_TYPE_DRAWABLE. The former was
simply a braino when copying and modifying the GimpLayer code.
(gimp_layer_tree_view_mask_update): call
gimp_layer_tree_view_update_borders() unconditionally; not only when a
mask has been added, but also when it has been removed.
Rename gimp_session_info_set_geometry() to
gimp_session_info_apply_geometry() and gimp_session_info_get_geometry
to gimp_session_info_read_geometry(). The old functions were not
getters and setters and thus the names were misleading.
Simplify the code a bit by replacing the 'toplevel_entry' and
'dockable_entry' members in GimpSessionInfo with a single
'factory_entry'. We compensate for this by adding a 'dockable'
gboolean to GimpDialogFactoryEntry.
Add GimpSessionInfo getters for a bunch of dialog factory entry
fields. This moves much of the GimpDock special casing to a common
place and also reduces direct access to session info fields.
Also allow GIMP_DEBUG as debug environment variable since that is what
you would guess the name is if you used e.g. the GDK_DEBUG environment
variable before.
Add a regression test for sessionrc parsing, handing and writing. The
test work in the following way: GIMP starts so that sessionrc is
deserialized and stored internally, the UI is shown, and then the
internal data structure about windows is serialized to a new
sessionrc. The test makes sure that a new sessionrc actually has been
created, and then that the content of the new file is identical to the
old one.
The WM tests mess up the GIMP dir, in particular any sessionrc if it
exists, due to the interface never being shown. Make the WM test use a
tmp dir to avoid that.
Don't blindly increment last-tip-shown so that the sessionrc is not
modified between each GIMP run. The change is to make it easier to
write regression tests for sessionrc. Eventually we might want some
proper fix.
Add gimp_test_run_temp_mainloop() which is a helper function for tests
that wants to run a main loop for a while. Useful when you want GIMP's
state to settle before doing tests.
The new function is called after the item is inserted. This is a much
smaller change than turning all vfuncs into signals just to be able
connect_after to one of them.
In preparation for making GimpDock inherit from a non-window, stop
casting GimpDocks to GimpDockWindows. Instead look up the toplevel
widget for a dock and get the dock window that way.