Commit Graph

13 Commits

Author SHA1 Message Date
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
Michael Natterer 90438eaaae removed debugging output, added #warning about runtime version check that
2004-05-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.c: removed debugging output, added
	#warning about runtime version check that can be removed as soon
	as we depend on GTK+ 2.4.1.
2004-05-04 15:09:53 +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 25589863a3 app/display/gimpdisplayshell-callbacks.c app/display/gimpdisplayshell.c
2004-04-15  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell.c
	* app/widgets/gimpcontainertreeview.c: removed runtime version
	checks and workarounds for bugs which are fixed in GTK+ 2.4.

	* app/widgets/gimpfiledialog.c
	(gimp_file_dialog_selection_changed): added runtime check for GTK+
	2.4.1 and work around GtkFileChooser's missing "update_preview"
	functionality for multiple selections if the dependency is not
	met.

	* app/widgets/gimpwidgets-utils.c (gimp_menu_position)
	(gimp_menu_button_position): call gtk_menu_set_monitor() until
	bug #139187 is fixed.
2004-04-15 16:54:44 +00:00
Michael Natterer 2f2301c905 derive it from GtkFileChooser instead of GtkFileSelection.
2004-04-15  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.[ch]: derive it from GtkFileChooser
	instead of GtkFileSelection.

	* app/gui/file-dialog-utils.c
	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c
	* app/widgets/gimpthumbbox.c: changed accordingly.

	* app/gui/gradients-commands.c
	* app/gui/vectors-commands.c
	* app/tools/gimpimagemaptool.c
	* app/widgets/gimperrorconsole.c
	* app/widgets/gimptexteditor.c
	* libgimpwidgets/gimpfileentry.c: use file choosers instead of
	file selectors.
2004-04-15 16:28:26 +00:00
Michael Natterer 999a4f7a91 eek, the separator crept back in while hacking GimpFileDialog. Removed it
2004-03-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.c (gimp_file_dialog_init): eek, the
	separator crept back in while hacking GimpFileDialog. Removed it
	again.
2004-03-04 13:48:35 +00:00
Michael Natterer 4a199a3e48 new function which configures the dialog to load an image.
2004-03-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.[ch] (gimp_file_dialog_set_uri):
	new function which configures the dialog to load an image.

	* app/gui/file-open-dialog.c: use it. Don't use file-dialog-utils
	any more and allow setting the uri of an already visible file open
	dialog.

	* app/gui/file-dialog-utils.c: took the file open menu entries out
	of that insane logic that makes the menus insensitive while any
	file dialog is open.
2004-03-01 13:40:46 +00:00
Michael Natterer ca2f7f88de new function which configures the dialog to save an image.
2004-03-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.[ch] (gimp_file_dialog_set_image):
	new function which configures the dialog to save an image.

	* app/gui/file-save-dialog.c: use it.

	* app/gui/file-open-dialog.c
	* app/gui/file-save-dialog.c: removed useless #inlcudes.
2004-03-01 12:27:33 +00:00
Michael Natterer 705114f02f added unused "GSList *file_procs" parameter.
2004-03-01  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.[ch] (gimp_file_dialog_new): added
	unused "GSList *file_procs" parameter.

	* app/gui/file-open-dialog.c: pass gimp->load_procs.
	* app/gui/file-save-dialog.c: pass gimp->save_procs.
2004-03-01 11:57:38 +00:00
Michael Natterer 5bdd1635c8 app/gui/file-dialog-utils.c app/widgets/gimpfiledialog.c some irrelevant
2004-02-27  Michael Natterer  <mitch@gimp.org>

	* app/gui/file-dialog-utils.c
	* app/widgets/gimpfiledialog.c
	* libgimpwidgets/gimpfileentry.[ch]: some irrelevant micro changes
	to make that patch smaller.
2004-02-27 22:25:37 +00:00
Michael Natterer da90ac6bfd removed the thumbnail box.
2004-02-27  Michael Natterer  <mitch@gimp.org>

	* app/gui/file-open-dialog.c: removed the thumbnail box.

	* app/widgets/gimpfiledialog.c: and added it here.
2004-02-27 15:43:58 +00:00
Michael Natterer 527aa849cb app/widgets/Makefile.am app/widgets/widgets-types.h new widget swallowing
2004-02-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpfiledialog.[ch]: new widget swallowing most
	of file-dialog-utils.[ch]'s functionality.

	* app/widgets/widgets-types.h: added "gpointer callback_data" to
	GimpItemFactorySetupFunc so the setup_funcs can create items in
	the same context as the item factory's default items.

	* app/widgets/gimpmenufactory.c (gimp_menu_factory_menu_new):
	pass "callback_data" to setup_func().

	* app/gui/file-open-menu.[ch]
	* app/gui/file-save-menu.[ch]: use the passed callback_data
	when creating the menus and attach the file_proc to the
	menu items using g_object_set_data().

	* app/gui/file-commands.[ch]: merged separate file type callbacks
	for open and save dialogs into one callback which simply
	calls gimp_file_dialog_set_file_proc().

	* app/gui/file-dialog-utils.[ch]: removed file_dialog_new()
	and file_dialog_set_proc().

	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.[ch]: use the new widget and removed
	global variables except the dialog pointer itself.

	* app/gui/image-menu.[ch]
	* app/gui/tool-options-menu.[ch]
	* app/gui/toolbox-menu.[ch]: changed accordingly.
2004-02-27 14:20:19 +00:00