Add GimpMenuFactory can always be found in a GimpDialogManager, use
gimp_dialog_factory_get_menu_factory() where we have a dialog factory
instead of accessing "global_menu_factory" or redundantly passing a
menu factory around where we already pass around a dialog factory.
Implement a mechanism to suspend/resume GimpImageWindow's "keep canvas
pos" logic which is used to keep the image in place across widget
changed such as show/hide rulers.
gimp_display_shell_fill(): call suspend()/resume() around
gimp_display_shell_appearance_update(), and center the image after
calculating the initial scale factor, so the image jumping at least
starts at the approximately right position.
The main change is that even with only 1 image in single window mode,
there is now a tab.
Also whatever the number of images when you hide docks with Tab, no tabs
are shown.
Add GimpWindowingStrategy with create_dockable_dialog() and use it in
dialogs_create_dockable_cmd_callback(). There are two implementations:
GimpSingleWindowStrategy and GimpMultiWindowStrategy. Depending on the
window mode, we want new dockables to appear in different places when
created. In single-window mode, they should appear inside the single
image window. In multi-window mode, a new dock window is created.
Don't use gimp_image_window_keep_canvas_pos() only for docks, use it
for all widgets in the display shell: the rulers, the menu bar, the
statusbar and the scrollbars. It is not really necessary for the two
latter ones because they are below and/or to the right of the canvas,
but we include them for completeness. Plus, they might get moved
around some day...
Update image window side docks visiblity from the image window itself
instead of from the ui configurer. The image window has a dependency
to the config object anyway, so no need to complicate things.
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.
This API is most likely not final, but enables adding the vbox of
shell widgets to the image window's vbox *after* the shell constructor
returns. Seems to work nicely :-)
And add gimp_image_window_set_active_display(). Call the new function
when creating a shell. Will all be done by the means of a GimpContext
later, but is a step to get rid of FIXME hacks.
Also move some of their related code and update other code to
go via gtk_widget_get_toplevel(), but also add some horrid temp
/* FIXME image window */ hacks.
Also remove GimpDisplayShell's "window_state" member. Use
gtk_widget_get_toplvel() to get to the GimpImageWindow when we need a
display shell's fullscreen state.
Create the menubar_manager when the construct property is set, assert
for its presence in constructor(). Pass the newly required construct
property to g_object_new() in gimp_display_shell_new().