Commit Graph

656 Commits

Author SHA1 Message Date
Michael Natterer f3e0792dcf Some cleanup to make plug-in menu creation less hackish and finally enable
2005-01-31  Michael Natterer  <mitch@gimp.org>

	Some cleanup to make plug-in menu creation less hackish and
	finally enable registering plug-in menu entries in much more UI
	managers (not only in the image and toolbox menus):

	* app/menus/menus.c: added a <Toolbox> UI manager instead of
	creating the toolbox menu from the <Image> UI manager.

	* app/widgets/gimpimagedock.[ch]: removed the ui_manager and the
	signal connections to update it...

	* app/widgets/gimpdock.[ch]: ...and added them here so all docks
	have their own UI manager. Determine which manager to create from
	looking at GimpDockClass::ui_manager_name (defaults to <Dock>).

	* app/widgets/gimptoolbox.c: set ui_manager_name to <Toolbox> and
	use the UI manager created by our parent class instead of using
	the <Image> one.

	(toolbox_create_tools): use gimp_action_get_accel_closure()
	instead of doing evil hacks.

	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c: removed lots of special casing of the
	<Image> UI manager. The code is almost ready for allowing plug-in
	menus under <Layers>, <Channels>, <Brushes> etc.
2005-01-31 16:09:52 +00:00
Michael Natterer b0f83a4b4f app/actions/Makefile.am new files holding utility functions to create
2005-01-28  Michael Natterer  <mitch@gimp.org>

	* app/actions/Makefile.am
	* app/actions/window-actions.[ch]: new files holding utility
	functions to create actions to move windows to other screens.

	* app/actions/dock-actions.c
	* app/actions/dock-commands.[ch]
	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: use the new actions instead of
	the change screen dialog.

	* app/menus/Makefile.am
	* app/menus/window-menu.[ch]: new files which create menu items
	for above actions.

	* app/menus/dockable-menu.[ch]: new files using above window-menu
	utility functions.

	* app/menus/image-menu.c: use them here too.

	* app/menus/menus.c: set a setup_func for the "<Dockable>"
	UI manager.

	* menus/dockable-menu.xml.in
	* menus/image-menu.xml.in: changed accordingly.
2005-01-28 19:48:31 +00:00
Michael Natterer 1ba788fd82 app/actions/dockable-actions.c removed dock-related actions
2005-01-26  Michael Natterer  <mitch@gimp.org>

	* app/actions/dockable-actions.c
	* app/actions/dockable-commands.[ch]: removed dock-related
	actions (show-image-menu, auto-follow-active and move-to-screen).

	* app/actions/dock-actions.c
	* app/actions/dock-commands.[ch]: and added them here.

	* app/menus/menus.c: add the "dock" action group to the
	"<Dockable>" UI Manager.

	* app/widgets/gimphelp-ids.h: reordered to match the new grouping.

	* menus/dockable-menu.xml.in: changed accordingly.
2005-01-26 13:34:41 +00:00
Michael Natterer 8d3c38c94b Enabled closing docks with Ctrl-W:
2005-01-24  Michael Natterer  <mitch@gimp.org>

	Enabled closing docks with Ctrl-W:

	* app/actions/Makefile.am
	* app/actions/dock-actions.[ch]
	* app/actions/dock-commands.[ch]: added new action group which
	holds a single action, "dock-close".

	* app/actions/actions.c: register the "dock" group.

	* app/menus/menus.c: add it to the "<Dock>" UI manager.

	* app/widgets/gimphelp-ids.h: added GIMP_HELP_DOCK_CLOSE.
2005-01-23 23:00:21 +00:00
Sven Neumann 9c65cb8f14 made the code a little more robust by not relying on certain properties of
2005-01-03  Sven Neumann  <sven@gimp.org>

	* app/menus/plug-in-menus.c: made the code a little more robust by
	not relying on certain properties of the menu path.
2005-01-03 21:02:38 +00:00
Michael Natterer 518ab86b64 create dynamic sub-menus using a separate, ui-manager-global merge_id
2004-11-23  Michael Natterer  <mitch@gimp.org>

	* app/menus/plug-in-menus.c (plug_in_menus_add_proc): create
	dynamic sub-menus using a separate, ui-manager-global merge_id
	instead of the procedure's merge_id. Has the effect that the ui
	manager keeps around these sub-menus forever, even if the
	procedure that initially registered them is unregistered.
	Fixes menu ordering after Script-Fu->Refresh.
2004-11-23 14:35:45 +00:00
Michael Natterer 5d7b121fd7 Don't use deprecated GtkToolbar API in GimpTextEditor:
2004-11-04  Michael Natterer  <mitch@gimp.org>

	Don't use deprecated GtkToolbar API in GimpTextEditor:

	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/actions/text-editor-actions.[ch]
	* app/actions/text-editor-commands.[ch]: added acions and
	callbacks for the new "text-editor" action group.

	* app/menus/menus.c: register a "<TextEditor>" UI manager.

	* menus/Makefile.am
	* menus/text-editor-toolbar.xml: new file for the toolbar.

	* app/widgets/gimptexteditor.[ch]: use the toolbar created by the
	UI manager instead of constructing it using deprecated API.

	* app/tools/gimptextoptions.c: changed accordingly.

	* app/widgets/gimpwidgets-utils.[ch]: added gimp_text_buffer_load()
	(used by text-editor-commands.c).
2004-11-04 14:24:32 +00:00
Michael Natterer b4ea222c23 Ported GimpNavigationView to use actions for its buttons:
2004-09-26  Michael Natterer  <mitch@gimp.org>

	Ported GimpNavigationView to use actions for its buttons:

	* app/menus/menus.c (menus_init): register a <GimpNaviagaionEditor>
	UI manager containing the "view" action group.

	* app/actions/actions.c (action_data_get_foo): handle "data" being
	a GimpNavigationEditor.

	* app/actions/view-actions.c (view_actions): added tooltips for
	the actions used in the editor.

	(view_actions_update): use action_data_get_display() instead of
	checking the type of "data" manually.

	* app/widgets/gimpeditor.c (gimp_editor_add_action_button): use
	a GtkToggleButton instead of GimpButton for GtkToggleActions.

	* app/display/gimpnavigationeditor.[ch]: added a GimpMenuFactory
	parameter to the public constructor and removed all other
	parameters. Simplified gimp_navigation_editor_new_private() and
	use gimp_editor_add_action_button() instead of just add_button()
	for creating the buttons. Made gimp_navigation_view_set_shell()
	private. Update the UI manager when the shell zooms or scrolls.

	* app/dialogs/dialogs-constructors.c (dialogs_navigation_view_new):
	pass the menu_factory to gimp_navigation_editor_new().

	Removed #includes which are not needed any more.
2004-09-26 15:21:44 +00:00
Michael Natterer 9ffc00be80 app/plug-in/Makefile.am removed... ...and added with a new name.
2004-09-22  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-proc.[ch]: removed...
	* app/plug-in/plug-in-proc-def.[ch]: ...and added with a new name.

	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-message.[ch]
	* app/plug-in/plug-in-progress.[ch]
	* app/plug-in/plug-in-rc.[ch]
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/plug-in/plug-ins.[ch]
	* app/actions/plug-in-actions.c
	* app/actions/plug-in-commands.c
	* app/file/file-open.[ch]
	* app/file/file-save.[ch]
	* app/file/file-utils.[ch]
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimppluginaction.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly plus some
	minor cosmetic cleanups.

	* app/pdb/fileops_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
2004-09-22 15:12:24 +00:00
Michael Natterer c448cf9d94 added GimpMenuFactory parameter and removed inclusion on "menus/menus.h".
2004-09-20  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/dialogs.[ch] (dialogs_init): added GimpMenuFactory
	parameter and removed inclusion on "menus/menus.h".

	* app/menus/menus.[ch] (menus_init): added GimpActionFactory
	parameter and removed inclusion of "actions/actions.h".

	* app/gui/gui.c (gui_restore_callback): pass the factories to the
	above functions.
2004-09-20 14:41:54 +00:00
Michael Natterer d03577fab2 Restored sane sorting order for menus which are created entirely by
2004-08-11  Michael Natterer  <mitch@gimp.org>

	Restored sane sorting order for menus which are created
	entirely by plug-ins (like Xtns/Script-Fu/...).

	* app/menus/plug-in-menus.c (plug_in_menus_build_path): made it
	return the built path. For each sub-menu created, add a "Menus"
	placeholder and a separator. Make sure all sub-menus end up in the
	"Menus" placeholder. More readable because we can use the path
	returned by the recursive invocation now.

	(plug_in_menus_add_proc): simplified by using the path
	plug_in_menus_build_path() returns.
2004-08-11 10:45:47 +00:00
Hans Breuer 3b3039148c build but *dont link* display-enums.obj, widget-enums.obj and
2004-07-31  Hans Breuer  <hans@breuer.org>

	* app/display/makefile.msc app/widgets/makefile.msc : build
	but *dont link* display-enums.obj, widget-enums.obj and
	gimpdisplayoptions.obj. They must be in the dll
	* app/makefile.msc : build gimp.exe and gimp-console.exe both
	using the same gimp-core.dll
	* app/gimpcore.def : new file, exports for gimp-core.dll
	* app/Makefile.am : added to EXTRA_DIST

	* cursors/makefile.msc : new file to create gimp-tool-cursors.h
	* cursors/Makefile.am : added to EXTRA_DIST

	* **/makefile.msc : updated

	* app/main.c app/app_procs.c : moved code to close the console
	from the former to the later. It only is to be used if The Gimp
	is not build as console app.

	* plug-ins/gfig/gfig.c : dont gimp_drawable_detach() the same
	drawable twice
	* plug-ins/gfig-dialog.c() : added a g_return_if_fail() to avoid
	crashing on File/Import
2004-08-01 20:51:12 +00:00
Michael Natterer cc6288a4fb Enabled the various "Clear saved foobar now" buttons in prefs:
2004-07-21  Michael Natterer  <mitch@gimp.org>

	Enabled the various "Clear saved foobar now" buttons in prefs:

	* app/gui/session.[ch]
	* app/menus/menus.[ch]
	* app/widgets/gimpdevices.[ch]: implemented the _clear()
	functions: unlink() the rc file and set an internal flag that it
	has been deleted. Added "gboolean always_save" parameter to the
	_save() functions and don't save anything if it is FALSE and the
	internal deletion flag has been set.

	* app/gui/gui.c
	* app/widgets/gimpdevicestatus.c: changed accordingly.

	* app/gui/preferences-dialog.c: added callbacks for all "Save now"
	and "Clear now" buttons and show error messages if clearing fails.
	Inform the user that she has to restart GIMP to see the effect of
	the clearing.
2004-07-21 16:11:31 +00:00
Sven Neumann 996b45696e app/actions/Makefile.am app/actions/file-dialog-actions.[ch]
2004-07-17  Sven Neumann  <sven@gimp.org>

	* app/actions/Makefile.am
	* app/actions/file-dialog-actions.[ch]
	* app/actions/file-open-actions.[ch]
	* app/actions/file-save-actions.[ch]: these aren't needed any
	longer.

	* app/actions/actions.c: changed accordingly.

	* app/menus/Makefile.am
	* app/menus/file-dialog-menu.[ch]
	* app/menus/file-open-menu.[ch]
	* app/menus/file-save-menu.[ch]: these aren't needed any longer.

	* app/menus/menus.c: changed accordingly.

	* menus/Makefile.am
	* menus/file-open-menu.xml
	* menus/file-save-menu.xml: these are also not needed any longer.
2004-07-17 12:19:58 +00:00
Hans Breuer b56eb39ead updated app/actions/makefile.msc app/menus/makefile.msc : (new files)
2004-07-11  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc : updated
	  app/actions/makefile.msc app/menus/makefile.msc : (new files)
	  app/actions/Makefile.msc app/menus/Makefile.am : added to EXTRA_DIST

	* libgimpbase/gimputils.c libgimpwidgets/gimpmemsizeentry.c
	  app/widgets/gimppropwidgets.c : bumped compiler version check,
	msvc6 still can't cast from unsigned __int64 to double

	* app/actions/debug-actions.c : only use debug_*_callback
	and thus debug_action if ENABLE_DEBUG_MENU

	* app/core/gimpalette-import.c : added gimpwin32-io.h

	* plug-ins/common/convmatrix.c : s/snprintf/g_snprintf/

	* plug-ins/common/screenshot.c : make it compile with msvc,
	but still no win32 specific implementation ...
2004-07-11 21:53:17 +00:00
Sven Neumann 6423529b86 app/gui/Makefile.am new files implementing a clipboard for image data
2004-07-02  Sven Neumann  <sven@gimp.org>

	* app/gui/Makefile.am
	* app/gui/clipboard.[ch]: new files implementing a clipboard for
	image data based on GDK_SELECTION_CLIPBOARD (bug #133247).

	* app/actions/edit-actions.c
	* app/actions/edit-commands.c: use the new clipboard API.

	* app/gui/gui.c: initialize and shutdown the clipboard.

	* app/core/gimpbuffer.c: cosmetics.

	* app/actions/actions.c
	* app/menus/menus.c: added sanity checks to exit functions.

	* app/display/gimpdisplayshell-dnd.[ch]: let
	gimp_display_shell_drop_svg() take a guchar * buffer.

	* app/widgets/gimpselectiondata.c (gimp_selection_data_get_pixbuf):
	fixed the implementation.
2004-07-02 14:08:15 +00:00
Michael Natterer d88f23ddba removed enum GimpContextSelectType.
2004-06-23  Michael Natterer  <mitch@gimp.org>

	* app/actions/context-commands.h: removed enum GimpContextSelectType.

	* app/actions/actions-types.h: added enum GimpActionSelectType.

	* app/actions/actions.[ch]: added utility functions
	action_select_value() and action_select_object().

	* app/actions/context-actions.c
	* app/actions/context-commands.c: changed accordingly.

	* app/actions/layers-actions.c
	* app/actions/layers-commands.[ch]: merged the layer select
	callbacks into one using the GimpActionSelectType functions. Added
	actions and callbacks for modifying the active layer's opacity.

	* app/menus/menus-types.h: #incude "actions/action-types.h".

	* app/gui/gui-types.h: #incude "menus/menus-types.h".

	* app/gui/preferences-dialog.c: allow to enable/disable input
	controllers.
2004-06-23 00:23:25 +00:00
Michael Natterer 8ab1ae98a3 app/actions/Makefile.am app/actions/context-actions.[ch] added new action
2004-06-15  Michael Natterer  <mitch@gimp.org>

	* app/actions/Makefile.am
	* app/actions/context-actions.[ch]
	* app/actions/context-commands.[ch]: added new action group to
	modify all GimpContext properties. So far there are actions to
	cycle through the lists of brushes, patterns etc., to change the
	opacity, to swap and default colors and to edit generated brushes.

	* app/actions/actions.c: register the new "context" action group.

	* app/actions/tools-actions.c
	* app/actions/tools-commands.[ch]: removed "tools-default-colors"
	and "tools-swap-colors" actions and callbacks because they are
	in the "context" action group now.

	* app/menus/menus.c: add the "context" group to the <Image> and
	<Dock> UI managers.

	* menus/image-menu.xml.in: changed accordingly. Added a temporary
	"Context" menu to test and debug the new actions.
2004-06-15 15:42:50 +00:00
Sven Neumann e5a0ae9b1b sort the menus by the translated menu path stripped from underscores.
2004-06-07  Sven Neumann  <sven@gimp.org>

	* app/menus/plug-in-menus.c (plug_in_menus_setup): sort the menus
	by the translated menu path stripped from underscores.
2004-06-07 10:45:05 +00:00
Sven Neumann d714307f9a populate the tree with collation keys and use strcmp() instead of
2004-06-04  Sven Neumann  <sven@gimp.org>

	* app/menus/plug-in-menus.c (plug_in_menus_setup): populate the
	tree with collation keys and use strcmp() instead of
	g_utf8_collate() as the tree's sort function.
2004-06-04 11:47:15 +00:00
Sven Neumann d29a222fe6 app/actions/Makefile.am (EXTRA_DIST) removed makefile.msc until they have
2004-06-02  Sven Neumann  <sven@gimp.org>

	* app/actions/Makefile.am (EXTRA_DIST)
	* app/menus/Makefile.am (EXTRA_DIST): removed makefile.msc until
	they have been added.
2004-06-02 14:00:39 +00:00
Michael Natterer 3fb934b2a4 Allow plug-ins to register menu icons. Fixes bug #120500.
2004-05-18  Michael Natterer  <mitch@gimp.org>

	Allow plug-ins to register menu icons. Fixes bug #120500.

	* app/core/core-enums.[ch]: added enum GimpIconType which can
	be one of { STOCK_ID, IMAGE_FILE, INLINE_PIXBUF }.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_data)
	* app/config/gimpscanner.[ch] (gimp_scanner_parse_data): new
	functions which write/parse raw binary data. Needed for storing
	inline pixbufs in pluginrc.

	* app/config/gimpconfigwriter.[ch] (gimp_config_writer_identifier):
	new function which writes out an unquoted and unescaped string.

	* app/plug-in/plug-in-proc.[ch] (struct PlugInProcDef): added
	new members "icon_type", "icon_data_length" and "icon_data".
	Reordered members so file_proc specific stuff is at the end.

	(plug_in_proc_def_get_stock_id)
	(plug_in_proc_def_get_pixbuf): new functions to access the
	procedure's icon.

	* app/plug-in/plug-in-rc.c: save/restore the registered icons.

	* app/actions/file-dialog-actions.c
	* app/actions/plug-in-actions.c: set the action's stock ID from
	the procedure's stock ID.

	* app/widgets/gimppluginaction.c
	(gimp_plug_in_action_connect_proxy): if the procedure provides a
	pixbuf, set it as icon for the menu item.

	* app/menus/file-dialog-menu.[ch]
	* app/menus/file-open-menu.c
	* app/menus/file-save-menu.c
	* app/xcf/xcf.c: changed accordingly.

	* tools/pdbgen/pdb/plug_in.pdb (plugin_icon_register): new PDB
	function which can be called during query().

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/plug_in_cmds.c
	* libgimp/gimpenums.h
	* libgimp/gimpplugin_pdb.c
	* libgimp/gimpplugin_pdb.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c: regenerated.

	* plug-ins/common/plugindetails.c
	* plug-ins/common/uniteditor.c
	* plug-ins/print/print.c: register stock_id icons.

	* plug-ins/common/screenshot.c: register an inline_pixbuf icon for
	testing purposes (used emblem-camera.png from gnome-icon-theme).

	* app/actions/dialogs-actions.c
	* app/actions/file-actions.c: unrelated: added some more icons
	to menu items.
2004-05-18 21:19:43 +00:00
Michael Natterer cf3533ba9c put the image popup menu into a dummy menubar to work around the silly
2004-05-17  Michael Natterer  <mitch@gimp.org>

	* menus/menus.xsl: put the image popup menu into a dummy menubar
	to work around the silly GtkUIManager restriction that popup menus
	can't have tearoff items.

	* app/menus/menus.c
	* app/menus/image-menu.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.c: changed accordingly.

	* app/gui/gui.c (gui_restore_after_callback): connect to
	"notify::tearoff-menus" of GimpGuiConfig and reconfigure the
	global image UI manager accordingly.

	* app/config/gimpguiconfig.c: removed GIMP_PARAM_RESTART from the
	"tearoff-menus" property because GtkUIManager can change this on
	the fly.

	* app/display/gimpdisplayshell.[ch]: added the menubar to the
	GimpDisplayShell struct. Some cleanup in gimp_display_shell_new().

	* app/display/gimpdisplayshell-appearance.c
	(gimp_display_shell_set_show_menubar): use shell->menubar instead
	of asking the UI manager.

	* app/widgets/gimpuimanager.[ch]: changed gimp_ui_manager_ui_get()
	to transparently load the XML files even if a sub-widget was
	requested. Reordered parameters of gimp_ui_manager_ui_popup().
	Lots of internal cleanups.

	* app/widgets/gimpdockable.c
	* app/widgets/gimptooloptionseditor.c: simplified accordingly.

	* app/widgets/gimpeditor.[ch]: added new function
	gimp_editor_popup_menu() which takes a GimpMenuPositionFunc and
	updates/shows the editor's menu.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c: use gimp_editor_popup_menu().

	* app/widgets/gimptoolbox.c: moved all code from
	gimp_toolbox_new() to GObject::constructor().
2004-05-17 13:38:03 +00:00
Michael Natterer 4b6adc4c8a changed warnings to include the invalid menu path. Added check that makes
2004-05-15  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_proc_args_check): changed
	warnings to include the invalid menu path. Added check that makes
	sure menu paths are either "<Prefix>" or "<Prefix>/foo" but *not*
	"<Prefix>foo".

	* app/actions/plug-in-actions.c: added function
	plug_in_actions_check_translation() which validates both the
	original and translated menu paths and spits detailed error
	messages if any of them is broken. Made action creation simpler
	(?) and more robust.

	* app/menus/plug-in-menus.c: argh, the translated menu path must
	be a sorting criteria *only*. Fixed the whole stuff to always use
	the original menu path because translation is done entirely by
	plug-in-actions.c. Fixes bad crashes for all locales. Added
	boolean return value to plug_in_menus_build_path() and don't try
	to create the menu item in an invalid location if creating the
	submenus failed.
2004-05-15 11:26:59 +00:00
Sven Neumann ad89332fbb check if the file procedure registered a menu path at all. The menu should
2004-05-14  Sven Neumann  <sven@gimp.org>

	* app/menus/file-dialog-menu.c: check if the file procedure
	registered a menu path at all. The menu should probably be created
	from the registered menu path, not from gimp->[load|save]_procs.

	* app/plug-in/plug-in-proc.[ch]
	* app/plug-in/plug-ins.c: removed broken code that used to sort
	the file procedures.

	* plug-ins/common/CEL.c
	* plug-ins/common/bz2.c
	* plug-ins/common/gz.c
	* plug-ins/common/pcx.c
	* plug-ins/common/pix.c
	* plug-ins/common/sunras.c
	* plug-ins/sgi/sgi.c
	* plug-ins/xjt/xjt.c: register a mimetype, set a translatable
	action name (mostly taken from shared-mime-info) and register to
	the <Load> and <Save> menus using gimp_plugin_menu_register().
2004-05-14 16:54:33 +00:00
Sven Neumann 97fe81b401 added new PDB function gimp_register_file_handler_mime() that allows to
2004-05-14  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/fileops.pdb: added new PDB function
	gimp_register_file_handler_mime() that allows to associate a MIME
	type with a file procecdurre.

	* app/pdb/fileops_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpfileops_pdb.[ch]: regenerated.

	* app/plug-in/plug-in-proc.[ch]
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-ins.[ch]: store a mimetype with file procedures.

	* app/actions/file-commands.c
	* app/core/gimpdocumentlist.[ch]
	* app/core/gimpimagefile.[ch]
	* app/file/file-open.[ch]
	* app/file/file-save.c: set the thumbnail's mimetype from the file
	procedure used to load/save the image.

	* app/xcf/xcf.c
	* plug-ins/bmp/bmp.c
	* plug-ins/common/csource.c
	* plug-ins/common/dicom.c
	* plug-ins/common/gif.c
	* plug-ins/common/gifload.c
	* plug-ins/common/jpeg.c
	* plug-ins/common/mng.c
	* plug-ins/common/png.c
	* plug-ins/common/postscript.c
	* plug-ins/common/psd.c
	* plug-ins/common/psd_save.c
	* plug-ins/common/sunras.c
	* plug-ins/common/svg.c
	* plug-ins/common/tga.c
	* plug-ins/common/tiff.c
	* plug-ins/common/wmf.c
	* plug-ins/common/xbm.c
	* plug-ins/common/xpm.c
	* plug-ins/common/xwd.c
	* plug-ins/faxg3/faxg3.c
	* plug-ins/winicon/main.c: register a mimetype, set a translatable
	action name (taken from shared-mime-info) and register to the <Load>
	and <Save> menus using gimp_plugin_menu_register().
2004-05-14 00:01:11 +00:00
Michael Natterer b8739d5901 added "name" attributes to all submenus.
2004-05-13  Michael Natterer  <mitch@gimp.org>

	* menus/tool-options-menu.xml: added "name" attributes to all
	submenus.

	* app/menus/tool-options-menu.c: use the menu names instead of the
	overly long action names.

	* app/actions/colormap-editor-commands.c
	* app/actions/tool-options-commands.c: added some callback
	implementations.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimptooloptionseditor.c: removed the callbacks here
	and use action buttons.

	* app/actions/actions.c
	* app/actions/colormap-editor-actions.c
	* app/actions/edit-actions.c: code review / cleanup.
2004-05-13 15:50:55 +00:00
Michael Natterer efcade0afa added file-menu.[ch] and file-dialog-menu.[ch]
2004-05-13  Michael Natterer  <mitch@gimp.org>

	* app/menus/Makefile.am: added file-menu.[ch] and
	file-dialog-menu.[ch]

	* app/menus/menus.[ch]: removed menus_open_recent_add()...

	* app/menus/file-menu.[ch]: ...and added it here as file_menu_setup().

	* app/menus/image-menu.c
	* app/menus/toolbox-menu.c: changed accordingly.

	* app/menus/file-dialog-menu.[ch]: added factored out code from the
	file-open and file-save menus as file_dialog_menu_setup().

	* app/menus/file-open-menu.c
	* app/menus/file-save-menu.c: call file_dialog_menu_setup().
2004-05-13 11:17:29 +00:00
Michael Natterer 2632cd8f64 app/actions/documents-actions.c app/actions/documents-commands.c
2004-05-12  Michael Natterer  <mitch@gimp.org>

	* app/actions/documents-actions.c
	* app/actions/documents-commands.c
	* app/actions/edit-actions.c
	* app/actions/edit-commands.[ch]
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/actions/select-commands.[ch]
	* app/actions/vectors-actions.c
	* app/actions/vectors-commands.[ch]: added tooltips for actions
	which are now used for dialog buttons, added callback
	implementations which formerly lived in various widgets, moved
	some actions around and did some general cleanups.

	* menus/image-menu.xml.in: s/edit-stroke/select-stroke/

	* menus/Makefile.am
	* menus/selection-editor-menu.xml: new popup menu.

	* app/menus/menus.c: register <SelectionEditor> and <UndoEditor>
	UI managers.

	* app/widgets/gimpeditor.[ch]: added construct properties
	"menu-factory", "menu-identifier", "ui-path" and "popup-data".
	Implement GObject::constructor() and create the UI manager
	if all needed properties were set. Enables creating action
	buttons at widget construction time because they need a
	UI manager.

	(gimp_editor_add_action_button): changed to take a va_list of
	"extended" actions which are invoked if the resp. button emits
	"extended_clicked". Store the actions and their modifier masks in
	a list attached to the button.

	* app/widgets/gimpcontainerview.c
	(gimp_container_view_item_selected): if the view has container
	*and* context, simply change the context and return.

	(gimp_container_view_context_changed): don't emit "select_item"
	manually but simply call gimp_container_view_select_item().

	(gimp_container_view_viewable_dropped): use
	gimp_container_view_item_selected() instead of changing the
	context directly.

	* app/widgets/gimpcontainereditor.c
	(gimp_container_editor_select_item): update the UI manager.

	* app/widgets/gimpdockable.c: don't try to fiddle with the
	dialog's menu if it doesn't have a ui_path (happens if the UI
	manager is just a collection of actions for the dialog buttons and
	has no menu registered).

	* app/widgets/gimpimageeditor.c: connect to the image's "flush"
	signal and update the UI manager in the callback.

	* app/widgets/gimpitemtreeview.c: use GimpEditor's construct
	properties to create the UI manager so GimpItemTreeView subclasses
	can have action buttons. Update the UI manager in
	gimp_item_tree_view_select_item().

	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimpfontview.c
	* app/widgets/gimpimageview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptoolview.c: changed calls to
	gimp_editor_add_action_button() accordingly and removed some
	unneeded select_item() implementations.

	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpvectorstreeview.[ch]
	* app/widgets/gimpdocumentview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimpselectioneditor.[ch]
	* app/widgets/gimpundoeditor.[ch]: use action buttons and removed
	lots of callbacks which went to the resp. action callbacks.

	* app/widgets/widgets-types.h: removed some now unneeded function
	prototypes.

	* app/gui/dialogs-constructors.c: changed (simplified) many dialog
	constructors accordingly.
2004-05-12 18:36:33 +00:00
Michael Natterer da0de0873f Started making the toolbox configurable. Addresses bug #105764. Not
2004-05-10  Michael Natterer  <mitch@gimp.org>

	Started making the toolbox configurable.
	Addresses bug #105764. Not finished yet.

	* app/core/gimptoolinfo.[ch]: renamed "in_toolbox" to "visible"
	and made it a GObject property.

	* app/tools/gimp-tools.[ch]: added new function
	gimp_tools_get_default_order() which returns a GList of tool
	identifiers.

	* app/actions/tools-actions.c
	* app/actions/tools-commands.[ch]: added actions & callbacks for
	toggling the "visible" boolean and for resetting all tools.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimptoolview.[ch]: new widget which allows to
	toggle a tool's visibility and to reorder the tools.

	* app/widgets/gimptoolbox.[ch]: removed member "GtkWidget *trash"
	and pack all tool buttons into the same wrap box. Connect to
	"reoder" of the tool container and to "notify::visible" of all
	tool infos and update the toolbox accordingly.

	* app/gui/dialogs-constructors.c: create a GimpToolView for the
	tools list/grid.

	* app/menus/menus.c: register a <Tools> menu for the dialog above.

	* menus/Makefile.am
	* menus/tools-menu.xml: added the menu.
2004-05-10 00:41:57 +00:00
Michael Natterer ca179a7757 Changed plug-in menu registration again to allow passing just the menu
2004-05-07  Michael Natterer  <mitch@gimp.org>

	Changed plug-in menu registration again to allow passing just the
	menu item's label (not the full path) in gimp_install_procedure()
	and only the path (excluding the item's label) in
	gimp_plugin_menu_register(). Matches the internal action system
	better and makes translating the menu paths much easier.

	(Of yourse it's still possible to use the old syntax for backward
	compatibility).

	* app/plug-in/plug-in-proc.[ch]: added "gchar *menu_label".

	* app/plug-in/plug-in-params.[ch]: added new functions
	plug_in_param_defs_check() and plug_in_proc_args_check() which
	check if a procedure's parameters match its menu location
	(e.g. <Image> needs RUN-MODE, IMAGE, DRAWABLE).

	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): if
	registering an old-style (full) menu_path, use
	plug_in_param_defs_check(), set proc_def->menu_label otherwise.

	* tools/pdbgen/pdb/plug_in.pdb (plugin_menu_register): use
	plug_in_proc_args_check() on the passed menu_path and make sugre
	old and new style menu registration are not mixed.

	* app/pdb/plug_in_cmds.c: regenerated.

	* app/plug-in/plug-in-rc.c: save/restore "menu_label".

	* app/actions/file-dialog-actions.c
	* app/actions/plug-in-actions.c
	* app/menus/plug-in-menus.c: changed action/menu creation
	accordingly. Some hacks needed to allow both old and new style
	menu_label/menu_paths.

	* app/plug-in/plug-in.c
	* app/widgets/gimpfiledialog.c
	* app/xcf/xcf.c: changed accordingly.

	* plug-ins/common/align_layers.c
	* plug-ins/common/animationplay.c
	* plug-ins/common/animoptimize.c
	* plug-ins/common/apply_lens.c
	* plug-ins/common/autocrop.c
	* plug-ins/common/autostretch_hsv.c
	* plug-ins/common/blinds.c
	* plug-ins/common/blur.c
	* plug-ins/common/borderaverage.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/c_astretch.c
	* plug-ins/common/ccanalyze.c
	* plug-ins/common/channel_mixer.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/color_enhance.c
	* plug-ins/common/colorify.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/compose.c
	* plug-ins/common/convmatrix.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/decompose.c
	* plug-ins/common/deinterlace.c
	* plug-ins/common/depthmerge.c
	* plug-ins/common/destripe.c
	* plug-ins/common/diffraction.c
	* plug-ins/common/displace.c
	* plug-ins/common/edge.c
	* plug-ins/common/emboss.c
	* plug-ins/common/engrave.c
	* plug-ins/common/exchange.c
	* plug-ins/common/film.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/fractaltrace.c
	* plug-ins/common/screenshot.c: ported the first few plug-ins
	to the new registration scheme.
2004-05-07 00:30:24 +00:00
Michael Natterer 7b943b64b0 Enabled multiple menu entries per plug-in procedure:
2004-05-06  Michael Natterer  <mitch@gimp.org>

	Enabled multiple menu entries per plug-in procedure:

	* app/plug-in/plug-in-proc.[ch]: changed "gchar *menu_path" to
	"GList *menu_paths".

	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/menus/menus.c
	* app/widgets/gimpfiledialog.c
	* app/xcf/xcf.c: changed accordingly.

	* app/actions/file-dialog-actions.c
	* app/actions/plug-in-actions.c: create an action for the first
	element of proc_def->menu_paths.

	* app/gui/gui-vtable.c
	* app/menus/plug-in-menus.[ch]: create proxy widgets for each
	element of proc_def->menu_paths.

	* tools/pdbgen/pdb/plug_in.pdb: added new function
	gimp_plugin_menu_add() which can be called during query() and adds
	a menu path to a procedure registered by the calling plugin.

	* app/pdb/internal_procs.c
	* app/pdb/plug_in_cmds.c
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* menus/image-menu.xml.in
	* menus/toolbox-menu.xml.in: added lots of <placeholder>s for
	logical groups (like Image/Resize, Image/Scale, Image/Crop
	etc.). Added empty placeholder File/Send for stuff like print and
	mail. Added an "Acquire" menu under <Image>/File

	* plug-ins/common/mail.c
	* plug-ins/print/print.c
	* plug-ins/common/winprint.c: register under File/Send.

	* plug-ins/common/screenshot.c
	* plug-ins/winsnap/winsnap.c: also register under
	<Image>/File/Acquire.

	* plug-ins/common/autocrop.c
	* plug-ins/common/ccanalyze.c
	* plug-ins/common/colortoalpha.c
	* plug-ins/common/threshold_alpha.c
	* plug-ins/common/zealouscrop.c: register additional menu entries
	under placeholders in the "Image" and "Layer" menus. This is not
	meant to be final but just a hint to keep in mind when
	reorganizing the plug-in menus.
2004-05-06 13:51:56 +00:00
Sven Neumann 5ef73e8748 no need for including gimp-intl.h.
2004-05-06  Sven Neumann  <sven@gimp.org>

	* app/menus/menus.c: no need for including gimp-intl.h.
2004-05-06 10:54:44 +00:00
Michael Natterer d3439fc3af configure.in app/Makefile.am app/menus/.cvsignore app/menus/Makefile.am
2004-05-06  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/Makefile.am
	* app/menus/.cvsignore
	* app/menus/Makefile.am
	* app/menus/menus-types.h
	* app/menus/menus.[ch]
	* app/menus/file-open-menu.[ch]
	* app/menus/file-save-menu.[ch]
	* app/menus/image-menu.[ch]
	* app/menus/plug-in-menus.[ch]
	* app/menus/tool-options-menu.[ch]
	* app/menus/toolbox-menu.[ch]: moved all menus files to their
	own directory.

	* app/gui/Makefile.am
	* app/gui/menus.[ch]
	* app/gui/file-open-menu.[ch]
	* app/gui/file-save-menu.[ch]
	* app/gui/image-menu.[ch]
	* app/gui/plug-in-menus.[ch]
	* app/gui/tool-options-menu.[ch]
	* app/gui/toolbox-menu.[ch]: removed them here.

	* app/actions/debug-commands.c
	* app/actions/file-commands.c
	* app/gui/brush-select.c
	* app/gui/dialogs.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/gui-vtable.c
	* app/gui/gui.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c: changed #includes accordingly.
2004-05-06 07:41:53 +00:00
Michael Natterer 03d8d8278e fixed bug which would have leaked broken menu translations.
2004-05-05  Michael Natterer  <mitch@gimp.org>

	* app/actions/plug-in-actions.c (plug_in_actions_add_proc): fixed
	bug which would have leaked broken menu translations.

	* app/gui/plug-in-menus.c: removed useless #includes.
2004-05-05 15:34:11 +00:00
Michael Natterer 96ba0235ed app/actions/file-actions.c remove "file-close" action and callback...
2004-05-05  Michael Natterer  <mitch@gimp.org>

	* app/actions/file-actions.c
	* app/actions/file-commands.[ch]: remove "file-close" action and
	callback...

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: ...and added it here as
	"view-close" because that's what it does.

	* app/actions/qmask-actions.c
	* app/actions/qmask-commands.c: s/QMask/QuickMask/g

	* app/gui/menus.c: add the "channels" action group to the <Image>
	and <Dock> UI managers, renamed UI manager <Dialogs> to
	<Dockable>.

	* app/widgets/gimpdockbook.c: s/<Dialogs>/<Dockable>/.

	* menus/image-menu.xml.in: s/file-close/view-close/, added
	separators at the end of most menus, moved the bottom group of the
	"View" menu after the zoom group.
2004-05-05 11:40:20 +00:00
Michael Natterer d8962eca96 register a <Dock> UI manager which has all action groups <Image> has
2004-05-04  Michael Natterer  <mitch@gimp.org>

	* app/gui/menus.c: register a <Dock> UI manager which has all
	action groups <Image> has except "view".

	* app/widgets/gimpimagedock.[ch]: re-enabled the global shortcuts,
	using UI manager instead of item factory. Unfortunately actions
	without proxy widgets can't be activated so this change is pretty
	useless. Oh well, will find a hack to work around this later...
2004-05-04 21:16:40 +00:00
Michael Natterer 9377b26ebc added help IDs to all actions representing the toplevel popups and menus
2004-05-02  Michael Natterer  <mitch@gimp.org>

	* app/actions/*-actions.c: added help IDs to all actions
	representing the toplevel popups and menus (as fallbacks for the
	still-to-be-written help system intrgration of GimpUIManager).

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): removed
	call to gtk_ui_manager_ensure_update() because that's done by
	gimp_ui_manager_ui_get() now.

	* app/widgets/gimpmenufactory.[ch]: removed API to register and
	create item factories.

	* app/gui/menus.c: changed accordingly.

	* app/gui/dialogs.c
	* app/actions/plug-in-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-save-dialog.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.[ch]
	* app/widgets/gimpimagedock.c
	* app/widgets/gimpitemtreeview.c: removed leftover item factory
	cruft.

	* app/widgets/widgets-types.h: removed item factory typedefs...

	* app/widgets/gimpitemfactory.h: ...and added them here.

	* app/widgets/gimpactiongroup.[ch]: added new function
	gimp_action_group_add_plug_in_actions().

	* app/actions/plug-in-actions.c: use it here instead of adding
	the actions manually.

	* app/widgets/gimptoolbox.c: ported the code which dynamically
	updates the tool button tooltips on accelerator changes to
	GtkAction. Disabled the whole stuff because GTK+ lacks
	gtk_action_get_accel_closure().
2004-05-02 08:56:07 +00:00
Sven Neumann 8766f89e02 added casts to please the compiler.
2004-04-30  Sven Neumann  <sven@gimp.org>

	* app/gui/tool-options-menu.c: added casts to please the compiler.
2004-04-30 17:11:07 +00:00
Michael Natterer 7d7ef188fa added signal "update" which is G_SIGNAL_RUN_LAST, so handlers can hook in
2004-04-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.[ch]: added signal "update" which
	is G_SIGNAL_RUN_LAST, so handlers can hook in before and after
	the default implementation. Update the action groups
	in the default implementations.

	(gimp_ui_manager_ui_get): make sure we always return a widget
	by calling gtk_ui_manager_ensure_update().

	* app/widgets/gimpdockable.c (gimp_dockable_show_menu): make
	sure the dockable menu is loaded before trying to access its
	widgets/actions.

	Resurrected the dynamic tool options menus:

	* app/actions/tool-options-actions.c: dynamically destroy/create
	actions for the tool options' presets.

	* app/actions/tool-options-commands.[ch]: all callbacks are
	GimpEnumAction::selected() callbacks now.

	* app/gui/tool-options-menu.[ch]: connect and connect_after to
	GimpUIManager::update(). Remove the old preset menu items
	in the former callback, create the new ones in the latter.
	Removed the last item factory entries.

	* app/gui/menus.c
	* app/widgets/gimptooloptionseditor.c: changed accordingly.
2004-04-30 15:29:11 +00:00
Michael Natterer 0e1af3ee5a app/actions/Makefile.am app/actions/file-open-actions.[ch] actions for the
2004-04-29  Michael Natterer  <mitch@gimp.org>

	* app/actions/Makefile.am
	* app/actions/file-open-actions.[ch]
	* app/actions/file-save-actions.[ch]: actions for the <Load> and
	<Save> menus...

	* menus/Makefile.am
	* menus/file-open-menu.xml
	* menus/file-save-menu.xml: ...and the menus.

	* app/gui/file-open-menu.[ch]
	* app/gui/file-save-menu.[ch]: ported to UI Manager.

	* app/widgets/gimpfiledialog.[ch]: ditto.

	* app/actions/actions.c
	* app/gui/menus.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c: changed accordingly.

	* app/widgets/gimpuimanager.c: removed debugging code which
	automatically loaded all registered menus. They are now loaded on
2004-04-29 17:47:53 +00:00
Michael Natterer 4654280114 Switch from GtkItemFactory to GtkUIManager. The migration is almost
2004-04-29  Michael Natterer  <mitch@gimp.org>

	Switch from GtkItemFactory to GtkUIManager. The migration is
	almost complete, still stuff missing/incomplete, definitely added
	a bunch of new bugs...

	* app/actions/*-commands.[ch]: converted all callback from
	GtkItemFactory callbacks to GtkAction callbacks.

	* app/actions/debug-actions.c
	* app/actions/gradient-editor-actions.c
	* app/actions/help-actions.c
	* app/actions/plug-in-actions.c
	* app/actions/qmask-actions.c
	* app/actions/tool-options-actions.c: various fixes.

	* app/display/gimpdisplay.[ch]
	* app/display/gimpdisplayshell-appearance.[ch]
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.[ch]: move everything from
	GtkItemFactory to GtkUIManager.

	* app/gui/dialogs.[ch]: added new function dialogs_get_toolbox().
	Needed because the action callbacks don't have a widget parameter
	and sometimes we need a parent window for showing dialogs.

	* app/gui/Makefile.am
	* app/gui/brushes-menu.[ch]
	* app/gui/buffers-menu.[ch]
	* app/gui/channels-menu.[ch]
	* app/gui/colormap-editor-menu.[ch]
	* app/gui/dialogs-menu.[ch]
	* app/gui/documents-menu.[ch]
	* app/gui/error-console-menu.[ch]
	* app/gui/fonts-menu.[ch]
	* app/gui/gradient-editor-menu.[ch]
	* app/gui/gradients-menu.[ch]
	* app/gui/images-menu.[ch]
	* app/gui/layers-menu.[ch]
	* app/gui/palette-editor-menu.[ch]
	* app/gui/palettes-menu.[ch]
	* app/gui/patterns-menu.[ch]
	* app/gui/qmask-menu.[ch]
	* app/gui/templates-menu.[ch]
	* app/gui/vectors-menu.[ch]: removed these files.

	* app/gui/gui.c: create a global UI manager for the image popup
	menu and the toolbox menubar.

	* app/gui/menus.[ch]: removed all GtkItemFactory code.

	* app/gui/image-menu.[ch]
	* app/gui/toolbox-menu.[ch]: removed everything except the trivial
	setup_funcs.

	* app/gui/file-open-menu.c
	* app/gui/file-save-menu.c
	* app/gui/tool-options-menu.c: don't use the macros from menus.h
	any more, they are gone.

	* app/gui/gui-vtable.c
	* app/gui/plug-in-menus.[ch]: create/destroy the dynamic plug-in
	menu entries.

	* app/tools/gimpimagemaptool.c: s/gimp_item_factory_update/
	gimp_ui_manager_update/g

	* app/widgets/gimpuimanager.[ch]: added API to get an action
	group by name.

	* app/widgets/gimpmenufactory.c: don't choke on the item_factory
	entries being NULL.

	* app/widgets/gimpactiongroup.c: make sure booleans set using
	g_object_set() only have TRUE or FALSE values.

	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpdockable.[ch]
	* app/widgets/gimpdocked.[ch]
	* app/widgets/gimpeditor.[ch]
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptoolbox.c
	* app/widgets/gimptooloptionseditor.c: removed all GtkItemFactory
	code and enable the #if 0'ed UI manager stuff.

	* menus/gradient-editor-menu.xml: fixed typos.

	* menus/image-menu.xml: duplicate everything so we have both
	an image menubar and an image popup menu. Badly cries for an
	XSL processor.

	* menus/toolbox-menu.xml: added an "Extensions" placeholder.
2004-04-29 12:52:29 +00:00
Michael Natterer aae726ee94 app/widgets/Makefile.am app/widgets/widgets-types.h new GtkAction subclass
2004-04-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppluginaction.[ch]: new GtkAction subclass which
	remembers the PlugInProcDef.

	* app/widgets/gimpactiongroup.[ch]: added "gpointer user_data" to
	the GimpActionGroup struct and to gimp_action_group_new(). Removed
	the user_data parameter from gimp_action_group_add_*_actions().

	* app/widgets/gimpactionfactory.[ch]: changed accordingly.

	* app/actions/*-actions.[ch]: removed user_data from all setup_funcs.

	* app/actions/plug-in-actions.c: use a GimpPlugInAction and
	finally use the right user_data for the callback so plug-in
	callbacks have a proper context.

	* app/gui/plug-in-menus.[ch]: renamed plug_in_menus_create2() to
	plug_in_menus_setup().

	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: changed accordingly.
2004-04-27 13:55:26 +00:00
Michael Natterer a5130581db removed "translation-domain" property and simply use gettext(). Plug-In
2004-04-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactiongroup.[ch]: removed "translation-domain"
	property and simply use gettext(). Plug-In domains are handled
	by plug-in-actions.c

	The following change finally starts breaking the old menu system
	while the new one is not fully in place yet. Have fun:

	* menus/image-menu.xml: added several <placeholder>s for plug-ins
	to register their menu entries in the middle of already existing
	menus.

	* app/gui/menus.c
	* plug-ins/common/mail.c
	* plug-ins/print/print.c
	* plug-ins/script-fu/scripts/copy-visible.scm: use the new
	placeholders to register menu entries.
2004-04-27 12:51:08 +00:00
Michael Natterer 4e8105c12f Correctly translated & sorted plug-in actions & menu entries:
2004-04-27  Michael Natterer  <mitch@gimp.org>

	Correctly translated & sorted plug-in actions & menu entries:

	* app/widgets/gimpuimanager.[ch]: added a "gchar *name" property
	and a hash table which keeps all created UI managers (similar to
	GimpActionGroup's hash table). Added function
	gimp_ui_managers_from_name() which returns a list of all managers
	with the given name.

	* app/widgets/gimpmenufactory.c: register a name per UI manager
	and pass the name to gimp_ui_manager_new().

	* app/actions/plug-in-actions.c: added code which correctly
	translates the created plug-in actions and also creates translated
	menu actions for the plug-in's menu_path elements.

	* app/gui/plug-in-menus.[ch]: sort the plug-ins' menu entries
	using a GTree. For each entry, recursivlely create submenus
	from the dynamic menu actions created above before creating
	the plug-in's menu entry itself.

	* app/gui/image-menu.c (image_menu_setup2)
	* app/gui/toolbox-menu.c (toolbox_menu_setup2): call
	plug_in_menus_create2().

	* app/gui/gui-vtable.c (gui_menus_create_entry)
	(gui_menus_delete_entry): added some uglyness which maps old <Prefix>
	menu identifiers to new-style UI manager plus ui_path tuples and
	call plug_in_menus_add,remove_proc() accordingly.

	* menus/image-menu.xml
	* menus/toolbox-menu.xml: added name="Foo" attributes to all menus
	so plug-in entries find their place.
2004-04-27 12:28:27 +00:00
Michael Natterer 11309f8e5e call actions_init() (gui_exit_after_callback): call actions_exit().
2004-04-27  Michael Natterer  <mitch@gimp.org>

	* app/gui/gui.c (gui_restore_callback): call actions_init()
	(gui_exit_after_callback): call actions_exit().

	* app/gui/menus.c (menus_init)
	(menu_exit): don't call them here.
2004-04-27 10:23:35 +00:00
Michael Natterer bb0f359ac4 added GimpUIManagerSetupFunc typedef.
2004-04-26  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-types.h: added GimpUIManagerSetupFunc typedef.

	* app/widgets/gimpuimanager.[ch]: added the setup_func to the
	GimpUIManagerUIEntry struct and to gimp_ui_manager_ui_register().
	Call the setup_func after creating the UI. Replaced the term
	"identifier" by "ui_path".

	* app/widgets/gimpmenufactory.c: ditto.

	* app/gui/menus.c (menus_init): register the new setup_funcs below.

	* app/gui/menus.[ch] (menus_open_recent_add)
	* app/gui/image-menu.[ch] (image_menu_setup2)
	* app/gui/toolbox-menu.[ch] (toolbox_menu_setup2): new setup_funcs
	which add the "Open Recent" menu items.

	* app/actions/file-actions.c: removed "file-open-recent-empty"
	action because it's not needed.

	* menus/image-menu.xml
	* menus/toolbox-menu.xml: removed "file-open-recent-empty" menu
	items and added <placeholder>s for the "Open Recent" menu items.
2004-04-26 15:51:21 +00:00
Michael Natterer af517f93aa changed GimpMenusDeleteFunc to take a PlugInProcDef* instead of a const
2004-04-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: changed GimpMenusDeleteFunc to take
	a PlugInProcDef* instead of a const gchar*.

	* app/plug-in/plug-ins.c
	* app/gui/gui-vtable.c
	* app/gui/plug-in-menus.[ch]: changed accordingly.
2004-04-25 08:22:22 +00:00
Michael Natterer 1f7a5870cc fixed some typos in the UI Manager registration code.
2004-04-22  Michael Natterer  <mitch@gimp.org>

	* app/gui/menus.c (menus_init): fixed some typos in the UI Manager
	registration code.
2004-04-22 16:18:40 +00:00
Michael Natterer 0b8c4b3ec9 app/widgets/Makefile.am app/widgets/widgets-types.h new GtkUIManager
2004-04-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpuimanager.[ch]: new GtkUIManager subclass. Adds
	API to update all action groups and knows which UIs it can create
	from which XML files.

	* app/widgets/gimpmenufactory.[ch]: register the XML file
	basenames along with path of their toplevel menus. Create
	GimpUIManagers instead of GtkUIManagers and register the
	XML files and menu paths with them.

	* app/gui/menus.c: register all XML files and their toplevel
	menu paths.

	* app/widgets/gimpeditor.[ch]: also create a GimpUIManager when
	creating the GtkItemFactory. Added "const gchar *ui_identifier"
	parameter to gimp_editor_create_menu().

	* app/widgets/gimpcontainereditor.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdatafactoryview.[ch]
	* app/widgets/gimpitemtreeview.[ch]: added "ui_identifier"
	parameters to all constructors.

	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcolormapeditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimpfontview.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpimageview.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimppatternfactoryview.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptooloptionseditor.c
	* app/gui/dialogs-constructors.c
	* app/gui/gradient-select.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c: pass UI identifiers to the changed
	functions above.

	* app/display/gimpdisplayshell.[ch]: added a GimpUIManager for
	the menubar (menubar creating code still commented out).

	* app/display/gimpdisplay.c
	* app/gui/gui-vtable.c: update the ui manager.
2004-04-21 16:33:17 +00:00