Commit Graph

10 Commits

Author SHA1 Message Date
Martin Nordholts 1093462ae9 app: Merge 'global_toolbox_factory' into 'global_dock_factory'
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.
2010-01-20 18:29:54 +01:00
Martin Nordholts 66197c5d11 app: global_dock_window_factory -> global_dock_factory
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.
2010-01-19 22:40:06 +01:00
Martin Nordholts be653a7110 app: Seal GimpDockable and add necessary getters and setters 2010-01-05 00:32:35 +01:00
Martin Nordholts 8699511bbd app: global_dock_window_factory -> global_dock_factory
With GimpDock not being a toplevel any longer, it makes more sense to
name global_dock_factory global_dock_window_factory. Do that.
2009-12-20 14:41:02 +01:00
Martin Nordholts 1bf84999e4 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.
2009-12-05 21:21:24 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Martin Nordholts 7c96452329 Make instance members private.
* app/widgets/gimpdock.[ch]: Make instance members private.

(gimp_dock_get_context)
(gimp_dock_get_dialog_factory)
(gimp_dock_get_dockbooks)
(gimp_dock_get_main_vbox)
(gimp_dock_get_vbox)
(gimp_dock_get_id): New getters.

* app/actions/actions.c
* app/actions/dockable-actions.c
* app/actions/dockable-commands.c
* app/actions/windows-actions.c
* app/menus/windows-menu.c
* app/widgets/gimpdialogfactory.c
* app/widgets/gimpdock.c
* app/widgets/gimpdock.h
* app/widgets/gimpdockable.c
* app/widgets/gimpdockbook.c
* app/widgets/gimpdockseparator.c
* app/widgets/gimpimagedock.c
* app/widgets/gimpmenudock.c
* app/widgets/gimpsessioninfo-book.c
* app/widgets/gimpsessioninfo-dock.c
* app/widgets/gimpsessioninfo-dockable.c
* app/widgets/gimptoolbox-color-area.c
* app/widgets/gimptoolbox-dnd.c
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptoolbox.c: Use new getters.

svn path=/trunk/; revision=27881
2009-01-04 10:28:31 +00:00
Sven Neumann 33b5a890cc app/widgets/gimpdockable.[ch] added a "locked" propery to GimpDockable. A
2008-05-19  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdockbook.[ch]: added a "locked" propery to
	GimpDockable. A locked dockable cannot be moved by drag-n-drop.
	Allows users to protect their dockables from accidental changes,
	mainly when working with a tablet.

	* app/widgets/gimpsessioninfo-dockable.[ch]: store the "locked"
	property in the session info.

	* app/actions/dockable-actions.c
	* app/actions/dockable-commands.[ch]: added an action for 
toggling
	the "locked" state.

	* app/widgets/gimphelp-ids.h: new help-id "gimp-dock-tab-lock".

	* menus/dockable-menu.xml.in: show the new menu item.

	* app/actions/plug-in-actions.c: formatting.


svn path=/trunk/; revision=25715
2008-05-19 21:11:03 +00:00
Michael Natterer 5766498fff Made session info serialization independent from widgets so it can be used
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
2008-05-13 23:43:57 +00:00
Michael Natterer 1a5cfac5e6 app/widgets/gimpsessioninfoaux.[ch] app/widgets/gimpsessioninfobook.[ch]
2007-05-25  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpsessioninfoaux.[ch]
	* app/widgets/gimpsessioninfobook.[ch]
	* app/widgets/gimpsessioninfodock.[ch]
	* app/widgets/gimpsessioninfodockable.[ch]: renamed these...

	* app/widgets/gimpsessioninfo-aux.[ch]
	* app/widgets/gimpsessioninfo-book.[ch]
	* app/widgets/gimpsessioninfo-dock.[ch]
	* app/widgets/gimpsessioninfo-dockable.[ch]: ...to these.

	* app/widgets/Makefile.am
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdocked.c
	* app/widgets/gimphistogrameditor.c
	* app/widgets/gimpmenudock.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpsessioninfo.c: changed accordingly.


svn path=/trunk/; revision=22614
2007-05-25 11:42:28 +00:00