Gimp/app/plug-in
Michael Natterer 8d86ec25e0 Move away from creating all item_factories statically in menus_init() but
2003-01-10  Michael Natterer  <mitch@gimp.org>

	Move away from creating all item_factories statically in
	menus_init() but create a new one for each place where one is
	needed:

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpmenufactory.[ch]: new factory which creates and
	configures the GimpItemFactories it knows about on-the-fly.

	* app/widgets/gimpitemfactory.[ch]: added
	gimp_item_factory_update() which calls the "update_func". Added
	"gboolean update_on_popup" so item_factories can be configured to
	require manual updates (used for the <Image> factory).

	* app/gui/menus.[ch]: create a "global_menu_factory" and register
	all menus we have with it. Added various setup functions which
	do stuff like adding the "Open Recent" menu or reorder plug-in
	menu entries. Removed the debugging stuff...

	* app/gui/Makefile.am
	* app/gui/debug-commands.[ch]: ...and added it here.

	* app/gui/gui.c: create the <Toolbox>, the popup-<Image> and the
	<Paths> factories here because they are still global.

	* app/gui/plug-in-menus.[ch]: changed the "image_factory"
	parameters to "item_factory" and create/update the entries for the
	passed item_factory only. Makes the whole stuff much more
	straightforward.

	* app/plug-in/plug-ins.c: don't call plug_in_make_menu().

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell.[ch]: added "menu_factory" and
	"popup_factory" parameters to gimp_display_new() and
	gimp_display_shell_new(). Create the menubar_factory and the
	qmask_factory dynamically. Pass the shell, not a Gimp to the QMask
	callbacks. Changed gimp_display_shell_set_menu_sensitivity() to
	gimp_display_shell_menu_update() and don't call it directly (it's
	a GimpItemFactory update_func now). Call gimp_item_factory_update()
	on the resp. factories instead.

	* app/gui/qmask-commands.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpimagemaptool.c: changed accordingly.

	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimpbrushfactoryview.[ch]
	* app/widgets/gimpbufferview.[ch]
	* app/widgets/gimpcolormapeditor.[ch]
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpdialogfactory.[ch]
	* app/widgets/gimpdock.c
	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpimageview.[ch]
	* app/widgets/gimpitemlistview.[ch]
	* app/widgets/gimppaletteeditor.[ch]: pass around lots of
	GimpMenuFactory pointers and menu_identifiers so all views can
	create their item_factories themselves. Unref the factories when
	they are no longer needed because they belong to the views now.

	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/dialogs.c
	* app/gui/brush-select.c
	* app/gui/gradient-select.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c: changed accordingly.

	* app/gui/file-dialog-utils.[ch] (file_dialog_new): require
	menu_factory and menu_identifier parameters.

	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.[ch]: removed file_*_dialog_menu_init()
	(they went to menus.c as setup_funcs). Added file_*_dialog_set_type()
	and moved the <Load> and <Save> factory callbacks to file-commands.c

	* app/gui/file-commands.[ch]: changed accordingly.

	* app/gui/view-commands.c: changed the statusbar, menubar, rulers
	and guides callbacks to do their job only if the setting has
	actually changed. Don't update whole item factories afterwards.
	Instead, just change the state of the items that actually need
	update.

	Unrelated:

	* app/core/gimpchannel.c (gimp_channel_init): set "bounds_known"
	and friends to FALSE since we don't know that the new channel will
	be empty (fixes QMask and probably other stuff).

	* app/gui/image-commands.c
	* app/gui/vectors-commands.c: cleanup.
2003-01-10 17:55:53 +00:00
..
.cvsignore added app/display/ and app/plug-in/. Empty for now except for the types 2001-08-17 14:27:31 +00:00
gimpenvirontable.c added some rudimentary support to prepend values to existing environment 2002-12-18 02:47:39 +00:00
gimpenvirontable.h added some rudimentary support to prepend values to existing environment 2002-12-18 02:47:39 +00:00
gimpplugin-message.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
gimpplugin-progress.c add appconfig.lib. Statically link libgimptool/gimptool.lib. 2002-05-10 23:30:09 +00:00
gimpplugin-progress.h badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 17:46:13 +00:00
gimpplugin.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
gimpplugin.h The unbelievable happened: a menu bar per display (optionally) 2002-12-10 16:38:16 +00:00
gimppluginmanager-call.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
gimppluginmanager-run.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
gimppluginmanager.c Move away from creating all item_factories statically in menus_init() but 2003-01-10 17:55:53 +00:00
gimppluginmanager.h The unbelievable happened: a menu bar per display (optionally) 2002-12-10 16:38:16 +00:00
gimppluginprocedure.c INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
gimppluginprocedure.h INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
gimppluginshm.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
Makefile.am app/base/Makefile.am automake-1.6 seems to use yet another variable to 2002-06-07 23:00:46 +00:00
makefile.msc when checking for 'excecutable' make sure it is a regular file too (on 2003-01-01 13:33:27 +00:00
plug-in-def.c badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 17:46:13 +00:00
plug-in-def.h #define GETTEXT_PACKAGE 2002-03-28 00:10:56 +00:00
plug-in-message.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
plug-in-params.c #define GETTEXT_PACKAGE 2002-03-28 00:10:56 +00:00
plug-in-params.h badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 17:46:13 +00:00
plug-in-proc-def.c INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
plug-in-proc-def.h INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
plug-in-proc.c INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
plug-in-proc.h INSTALL NEWS require latest versions of glib, gtk+ and friends. Bumped our 2001-12-27 17:58:30 +00:00
plug-in-progress.c add appconfig.lib. Statically link libgimptool/gimptool.lib. 2002-05-10 23:30:09 +00:00
plug-in-progress.h badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 17:46:13 +00:00
plug-in-rc.c configure the scanner the same way GimpConfig did (scanner->user_data is, 2002-05-31 13:58:18 +00:00
plug-in-rc.h write comment to top of gimprc. 2001-12-28 22:58:14 +00:00
plug-in-run.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
plug-in-shm.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
plug-in-types.h The unbelievable happened: a menu bar per display (optionally) 2002-12-10 16:38:16 +00:00
plug-in.c removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() 2003-01-07 17:00:49 +00:00
plug-in.h The unbelievable happened: a menu bar per display (optionally) 2002-12-10 16:38:16 +00:00
plug-ins.c Move away from creating all item_factories statically in menus_init() but 2003-01-10 17:55:53 +00:00
plug-ins.h The unbelievable happened: a menu bar per display (optionally) 2002-12-10 16:38:16 +00:00