Move the Image Selection Menu to GimpDockWindow

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.
This commit is contained in:
Martin Nordholts
2009-12-05 21:20:18 +01:00
parent cb854e6ad7
commit 1bf84999e4
21 changed files with 835 additions and 834 deletions

View File

@ -289,7 +289,7 @@ gimp_session_info_aux_set_list (GtkWidget *dialog,
/* FIXME: make the aux-info stuff generic */
if (GIMP_IS_DOCK_WINDOW (dialog))
gimp_dock_set_aux_info (gimp_dock_window_get_dock (GIMP_DOCK_WINDOW (dialog)), aux_list);
gimp_dock_window_set_aux_info (GIMP_DOCK_WINDOW (dialog), aux_list);
else if (GIMP_IS_DOCKABLE (dialog))
gimp_dockable_set_aux_info (GIMP_DOCKABLE (dialog), aux_list);
}
@ -300,7 +300,7 @@ gimp_session_info_aux_get_list (GtkWidget *dialog)
/* FIXME: make the aux-info stuff generic */
if (GIMP_IS_DOCK_WINDOW (dialog))
return gimp_dock_get_aux_info (gimp_dock_window_get_dock (GIMP_DOCK_WINDOW (dialog)));
return gimp_dock_window_get_aux_info (GIMP_DOCK_WINDOW (dialog));
else if (GIMP_IS_DOCKABLE (dialog))
return gimp_dockable_get_aux_info (GIMP_DOCKABLE (dialog));