We need to be able to pass a GimpUIManager to
gimp_dialog_factory_dialog_new(), so make that possible. Also make
sure to set ui_manager in gimp_dialog_factory_dialog_new_internal()
when we create both a dock window and a dock, so tooltips works in
toolboxes created from scratch.
Get rid of 'global_toolbox_factory' and manage everything dock-related
with 'global_dock_factory'. The whole of 'global_toolbox_factory' was
a big special-case and getting rid of it makes it easier to extend the
session management with e.g. single-window mode dock functionality.
To get rid of 'global_toolbox_factory' we, roughly, have to
* Replace 'global_toolbox_factory' with 'global_dock_factory'
everywhere. We can also get rid of lots of code that did special
things for the "toolbox" factory.
* Make the use or interaction with the toolbox explicit in some
places. For example, a function gimp_dock_window_has_toolbox() has
been introduced.
* Make GimpSessionInfoDock have an 'identifier' parameter so we can
differentiate between the "gimp-dock" and "gimp-toolbox" dock
types.
Rename back global_dock_window_factory to
global_dock_factory. Renaming to global_dock_window_factory was done
under the assumption that there would be a separate factory that would
create non-toplevel dockables, but I don't expect this to happen in
the forseeable future.
Let dock windows have proper GimpDialogFactory entries. This allows us
to get rid of a lot of ugly mostly duplicated code. This also makes us
ready the merge the dock window and toolbox factories which will soon
be done. A few things should be noted:
* We adjust the wrap box aspect ratio in the toolbox to avoid having
the toolbox dock window explode
* We make sure that we still can handle sessionrc files from GIMP 2.6
and older
Instead of having one dock constructor per dialog factory, put entries
for the normal dock and the toolbox dock in the dock window
factory. To do this we also need to merge the dock and normal dialog
constructors into one function protptype.
This takes us one step closer to be able to merge the
global_dock_window_factory and the global_toolbox_factory into one.
The long term goal: Support multi-column dock windows with one of the
docks being the toolbox. In this situation we can't have the toolbox
dock created by a separate dialog factory, that is too messy.
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.
Make GimpDock be a GtkVBox instead of a GimpDockWindow. This means we
can now put a GimpDock anywhere, including inside an image window.
In order to do this we need to:
* Separate dock and dock window creation in the dialog factory and
add a couple of new dock window constructors
* Change gimp_dialog_factory_dock_new() to not only create a dock,
but also create a dock window and then combine those two
* Change the dock constructor to take a GimpUIManager since they
depend on that during their construction. We get the ui manager
from the dock window, but we can't create the dock *inside* the
dock window, we have to add the dock later. So we create the dock
window first and then pass its ui manager to the dock constructors
* Make some other minor adaptions, mostly with
gimp_dock_window_from_dock() and gimp_dock_window_get_dock()
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-05-14 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpsessioninfo-book.[ch]: remove widget member from
struct GimpSessionInfoBook. Return the created GimpDockbook from
restore().
* app/widgets/gimpsessioninfo-dock.c (restore): use the returned
book instead of the struct member.
svn path=/trunk/; revision=25658
2008-05-14 Michael Natterer <mitch@gimp.org>
Made session info serialization independent from widgets so it can
be used on stored dock layouts which are not open:
* app/widgets/gimpsessioninfo-book.[ch]
* app/widgets/gimpsessioninfo-dock.[ch]
* app/widgets/gimpsessioninfo-dockable.[ch]: add from_widget()
functions which return newly allocated session info structs.
Changed serialize() functions to take these structs instead of
widgets. Changed deserialize() functions to return the structs
instead of appending them to lists in their parent structs. Don't
free anything in restore().
* app/widgets/gimpsessioninfo-aux.[ch]
(gimp_session_info_aux_serialize): take a GList of aux_info
instead of a widget.
* app/widgets/gimpsessioninfo.[ch]: add new functions get_info()
which collects above session info details from dialogs and
clear_info() which clears that info. Call clear_info() from
finalize(). Don't free anything in restore().
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_save_foreach): collect the session info
detials from the dialogs before serializing because serialize()
doesn't know about the widget any longer. Clear the infos after
serializing.
(gimp_dialog_factories_restore_foreach): clear the session info
details after creating the dialogs because restore() doesn't clear
the info by itself any longer.
svn path=/trunk/; revision=25657