Spacing is now dynamically controllable. Unlike other parameters it
made little sense to scale down from default spacing so it scales between
current and maximum spacing.
Don't crash when detaching dockables from the image window. This
scenario only occurs in single-window mode. We solve it by using
global variables and checking for NULL for src_dock_window; there is
no dock window when detaching from the image window.
The use of global variables is meant to be temporary.
Make sure we never call gimp_free_select_tool_remove_last_segment()
with priv->n_segment_indices being negative, and increase robustness
of the code in general.
Note that we always halt the tool when backspace is pressed and there
are no vertices left. This is to minimize the risk of ending up in an
invalid tool state.
In order to avoid overflows when calculating needed memory, cast the
first variable used into a large enough type so the whole calculation is
done in that type.
With the introduction of a single-window mode, not only dock windows
needs to be able to create docks, the image window also needs to. So
give it a "dock-factory" property.
Introduce GimpSessionInfoDock and session manage multi-column dock
windows. We are still backwards compatible with sessionrc, the only
difference is that a "session-info" entry now can have multiple "dock"
entries.
Also make ond dock window multi-column in the regression test
app/tests/test-session-management.c and adjust positions and image
selection menus a bit.
Add GimpMenuFactoryPrivate. Note that we don't introduce a Gimp-getter
since the menu factory is globally accesible and we want to have as
much control as possible in who can get the Gimp instance.
Move the Image Selection Menu from GimpMenuDock to
GimpDockWindow. That is, if a dock window contains many docks then
they will share the same Image Selection Menu.
To do this we need to move around quite a bit of code. Move the
"context", "dialog-factory" and "ui-manager" properties from GimpDock
to GimpToolbox, GimpMenuDock doesn't need it any longer. Turn the
GimpDock getters for these properties into wrappers that go to the
GimpDockWindow properties. In some places, most notably GimpToolbox
construction, we use the GimpToolbox values of these properties, but
most of the time it works fine to just use the GimpDockWindow
properties. GimpDock::setup() and set/get_aux_info() have also been
moved to GimpDockWindow since the only aux info for docks was for the
image selection menu.
Also, we don't bother porting gimp_menu_dock_destroy() to
GimpDockWindow, but we leave the code around. If this is a problem, it
will show.
The private instance data struct is zeroed out for us so we don't need
to assign NULL, FALSE and 0 to private instance data members in
gimp_dock_window_init().
Do not show the dock Image Menu in the default UI, it is for advanced
users. The risk for accidental usage is too big if it's shown by
default. Plus, it's not very pretty.
To make the smaller font in docks also apply in single-window mode,
move the GimpDockWindow::font-scale style property to GimpDock. We use
the GimpDockWindow approach, so now each GimpDock has a name of the
form "gimp-internal-dock-<id>". We add "internal" to avoid clashing
with the GimpDockWindow legacy id "gimp-dock-<id>".
Use more proper API in gimp_statusbar_init() when we rearrange widgets
to get rid of warnings. Requires an up to date GTK+, max 2 weeks old
or so, for gtk_statusbar_get_message_area().
This makes app/tests run again since there are no warnings about wrong
widget parent.