1. 04 May, 2005 1 commit
    • Michael Natterer's avatar
      new function which finds a proc_def in a GSList by its procedure name. · 4f2e5afc
      Michael Natterer authored
      2005-05-04  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-proc-def.[ch] (plug_in_proc_def_find): new
      	function which finds a proc_def in a GSList by its procedure name.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-ins.c
      	* tools/pdbgen/pdb/plug_in.pdb: use it instead of iterating and
      	comparing manually.
      
      	* app/pdb/plug_in_cmds.c: regenerated.
      
      	* app/plug-in/plug-in-def.c: minor cleanups.
      4f2e5afc
  2. 14 Dec, 2004 1 commit
    • Michael Natterer's avatar
      added "gint ref_count" to the PlugInProcFrame struct. Added new functions · 0449deee
      Michael Natterer authored
      2004-12-14  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-proc-frame.[ch]: added "gint ref_count" to
      	the PlugInProcFrame struct. Added new functions
      	plug_in_proc_frame_ref/unref().
      
      	(plug_in_proc_frame_new): set the ref_count to 1.
      
      	* app/plug-in/plug-in.[ch] (plug_in_proc_frame_push): return the
      	new proc_frame.
      
      	(plug_in_proc_frame_pop): use unref() instead of free().
      
      	* app/plug-in/plug-in-run.c (plug_in_temp_run): ref the proc_frame
      	while running its main loop. Removed the call to
      	plug_in_proc_frame_pop().
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_temp_proc_return):
      	call plug_in_proc_frame_pop() immediately after
      	plug_in_main_loop_quit() so the proc_frame goes away from the
      	stack and can't be used accidentially if the core is too busy to
      	return to the main loop before the next command arrives on the
      	wire. Really fixes bug #161114 this time.
      0449deee
  3. 19 Nov, 2004 1 commit
    • Michael Natterer's avatar
      tools/pdbgen/lib.pl added support for deprecated procedures without any · ebf18dce
      Michael Natterer authored
      2004-11-19  Michael Natterer  <mitch@gimp.org>
      
      	* tools/pdbgen/lib.pl
      	* tools/pdbgen/stddefs.pdb: added support for deprecated procedures
      	without any replacement.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): added
      	a special warning for procedures without replacement.
      
      	* tools/pdbgen/pdb/drawable.pdb: deprecated drawable_set_image()
      	without any replacement and made it a nop (which fails if the
      	passed image is different from the drawable's image). It's not
      	needed any longer since 2.0 and moreover dangerous to use.
      
      	* app/pdb/drawable_cmds.c
      	* libgimp/gimpdrawable_pdb.[ch]: regenerated.
      
      	* app/core/gimpitem.c (gimp_item_set_image): replaced assertion
      	for gimp_item_is_floating() by !gimp_item_is_attached(). The
      	former warned when adding a layer with already added mask to the
      	image (which is a perfectly valid operation).
      ebf18dce
  4. 06 Oct, 2004 2 commits
    • Michael Natterer's avatar
      changed new member "deprecated" from "gboolean" to a "gchar*" which holds · 6f42c42d
      Michael Natterer authored
      2004-10-06  Michael Natterer  <mitch@gimp.org>
      
      	* app/pdb/procedural_db.h (struct ProcRecord): changed new member
      	"deprecated" from "gboolean" to a "gchar*" which holds the name of
      	the replacement procedure.
      
      	* tools/pdbgen/app.pl: changed accordingly.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): show
      	the name of the replacement procedure in the warning message.
      
      	* tools/pdbgen/stddefs.pdb: added utility function
      	std_pdb_deprecated() which takes the name of the replacement
      	procedure and fills the blurb, help, author, copyright, date and
      	deprecated fields of the procedure definition.
      
      	* tools/pdbgen/pdb/brushes.pdb
      	* tools/pdbgen/pdb/gradients.pdb
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/palettes.pdb
      	* tools/pdbgen/pdb/patterns.pdb
      	* tools/pdbgen/pdb/text_tool.pdb: use it instead of duplicating
      	the same code and strings for all deprecated procedures.
      
      	* app/pdb/*_cmds.c: regenerated.
      6f42c42d
    • Michael Natterer's avatar
      return the mask's bpp and the brush's pixmap data if it has one. · 7ed9a288
      Michael Natterer authored
      2004-10-06  Michael Natterer  <mitch@gimp.org>
      
      	* tools/pdbgen/pdb/brush.pdb: return the mask's bpp and the
      	brush's pixmap data if it has one.
      
      	* tools/pdbgen/pdb/pattern.pdb: cleaned up.
      
      	* tools/pdbgen/pdb/image.pdb: added $deprecated = 1 to deprecated
      	functions even if they are not exported to libgimp any more.
      
      	* app/pdb/procedural_db.h (struct ProcRecord): added member
      	"gboolean deprecated".
      
      	* tools/pdbgen/app.pl
      	* app/xcf/xcf.c: fill it accordingly.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): warn
      	not only for deprecated procedured which are in the compat hach
      	table, but also for procedures with deprecated flag set to TRUE.
      
      	* app/pdb/*_cmds.c
      	* libgimp/gimpbrush_pdb.[ch]
      	* libgimp/gimppattern_pdb.[ch]: regenerated.
      
      	* libgimp/gimpbrushmenu.c
      	* plug-ins/gfig/gfig-style.c: changed accordingly.
      7ed9a288
  5. 24 Sep, 2004 1 commit
  6. 22 Sep, 2004 6 commits
    • Michael Natterer's avatar
      removed warning about entering a dead code path. That path is not dead at · 6d186af5
      Michael Natterer authored
      2004-09-23  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_return_priv):
      	removed warning about entering a dead code path. That path is not
      	dead at all :)
      6d186af5
    • Michael Natterer's avatar
      removed assertion about proc_rec != NULL because that happens when · 2dffdbeb
      Michael Natterer authored
      2004-09-22  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-proc-frame.[ch] (plug_in_proc_frame_init):
      	removed assertion about proc_rec != NULL because that happens
      	when query()ing and init()int plug-ins.
      
      	Replaced "context" by "main_context" plus "context_stack".
      
      	* app/plug-in/plug-in-context.c: implement plug_in_context_push()
      	and plug_in_context_pop().
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c: changed accordingly.
      
      	* tools/pdbgen/pdb/context.pdb: use the return values of
      	plug_in_context_push() and _pop().
      
      	* app/pdb/context_cmds.c: regenerated.
      
      	* plug-ins/script-fu/scripts/test-sphere.scm: use
      	gimp-context-push and gimp-context-pop instead of remembering the
      	old values for FG, BG etc.
      2dffdbeb
    • Sven Neumann's avatar
      tools/pdbgen/Makefile.am new files that will hold context related PDB · 4069dd9d
      Sven Neumann authored
      2004-09-22  Sven Neumann  <sven@gimp.org>
      
      	* tools/pdbgen/Makefile.am
      	* tools/pdbgen/pdb/context.pdb: new files that will hold context
      	related PDB functions.
      
      	* tools/pdbgen/groups.pl
      	* app/pdb/Makefile.am
      	* app/pdb/context_cmds.c
      	* app/pdb/internal_procs.c
      	* app/pdb/progress_cmds.c
      	* libgimp/gimp_pdb.h
      	* libgimp/gimpcontext_pdb.[ch]: (re)generated.
      
      	* app/plug-in/Makefile.am
      	* app/plug-in/plug-in-context.[ch]: new files that will hold code
      	that implements a context stack in the plug-in's proc-frame.
      
      	* app/plug-in/plug-in.[ch]: new function plug_in_get_proc_frame().
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c: use the new function instead of
      	duplicating it all over the place.
      4069dd9d
    • Michael Natterer's avatar
      app/plug-in/Makefile.am removed... ...and added with a new name. · 9ffc00be
      Michael Natterer authored
      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.
      9ffc00be
    • Michael Natterer's avatar
      app/plug-in/Makefile.am new files containing utility functions for · fcc13b8c
      Michael Natterer authored
      2004-09-22  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/Makefile.am
      	* app/plug-in/plug-in-proc-frame.[ch]: new files containing
      	utility functions for initializing/freeing PlugInProcFrames.
      	Added the progress stuff to the proc_frame.
      
      	* app/plug-in/plug-in.[ch]: removed the progress stuff from the
      	PlugIn struct and use the new proc_frame utility functions.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-run.c: changed accordingly.
      fcc13b8c
    • Michael Natterer's avatar
      Prepare for enabling private contexts for plug-ins and scripts: · 77ba473f
      Michael Natterer authored
      2004-09-22  Michael Natterer  <mitch@gimp.org>
      
      	Prepare for enabling private contexts for plug-ins and scripts:
      
      	* app/plug-in/plug-in.[ch]: removed the "context" member from
      	the PlugIn struct and added it to PlugInProcFrame instead.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-run.c: changed accordingly.
      77ba473f
  7. 21 Sep, 2004 1 commit
    • Michael Natterer's avatar
      app/plug-in/plug-in-types.h · 459964ba
      Michael Natterer authored
      2004-09-22  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-types.h
      
      	* app/plug-in/plug-in.[ch]: added struct PlugInProcFrame which
      	contains the ProcRecord, the proc's GMainLoop and its return
      	values.
      
      	Use the same struct for the plug-in's main proc and its
      	temp_procs, so we finally have one set of return values per call
      	frame, and not just one per plug-in.
      
      	Added plug_in_proc_frame_push()/pop() and changed
      	plug_in_main_loop[_quit]() accordingly.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-run.c: changed accordingly.
      459964ba
  8. 11 Aug, 2004 1 commit
  9. 10 Aug, 2004 1 commit
    • Michael Natterer's avatar
      Redid the whole internal progress stuff: don't pass around · 02d2b990
      Michael Natterer authored
      2004-08-10  Michael Natterer  <mitch@gimp.org>
      
      	Redid the whole internal progress stuff: don't pass around
      	progress_callback and progress_data; instead, provide a
      	pointer to a GimpProgressInterface which can be implemented
      	by a variety of backends.
      
      	Addresses (but not yet fixes) bugs #6010, #97266 and #135185.
      
      	* app/display/Makefile.am
      	* app/display/gimpprogress.[ch]: removed the old progress hack.
      
      	* app/core/Makefile.am
      	* app/core/core-types.h
      	* app/core/gimpprogress.[ch]: implement GimpProgressInterface.
      
      	* app/widgets/Makefile.am
      	* app/widgets/widgets-types.h
      	* app/widgets/gimpprogressdialog.[ch]: the standalone progress
      	dialog as widget implementing GimpProgressInterface.
      
      	* app/display/gimpdisplay.c
      	* app/display/gimpstatusbar.[ch]
      	* app/widgets/gimpfiledialog.[ch]
      	* app/widgets/gimpthumbbox.[ch]: added GimpProgressInterface
      	implementation to these classes.
      
      	* app/core/gimp-gui.[ch]
      	* app/gui/gui-vtable.c: replaced the old progress vtable entries
      	by two new to create and destroy a GimpProgressDialog in case
      	no other progress is available.
      
      	* app/pdb/procedural_db.[ch]
      	* app/plug-in/plug-in-run.[ch]
      	* tools/pdbgen/app.pl: pass a GimpProgress to all PDB wrappers and
      	all plug-ins.
      
      	* app/plug-in/plug-in.[ch]
      	* app/plug-in/plug-ins.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c: handle the case there the
      	plug-in was crated with a progress as well as the case where it
      	wasn't.
      
      	* app/app_procs.c
      	* app/batch.c
      	* app/xcf/xcf.c
      	* app/file/file-open.[ch]
      	* app/file/file-save.[ch]
      	* app/widgets/gimphelp.c
      	* app/widgets/gimpbrushselect.c
      	* app/widgets/gimpfontselect.c
      	* app/widgets/gimpgradientselect.c
      	* app/widgets/gimppaletteselect.c
      	* app/widgets/gimppatternselect.c: changed accordingly.
      
      	* app/core/gimpimagefile.[ch]
      	* app/display/gimpdisplayshell-dnd.c
      	* app/gui/file-open-dialog.c
      	* app/gui/file-open-location-dialog.c
      	* app/gui/file-save-dialog.c
      	* app/widgets/gimplayertreeview.c
      	* app/widgets/gimptoolbox-dnd.c: pass a GimpProgress to all file
      	related functions. Embed the progress in the file dialog where
      	possible.
      
      	* app/core/gimpdrawable-blend.[ch]
      	* app/core/gimpdrawable-transform.[ch]
      	* app/core/gimpimage-convert.[ch]
      	* app/core/gimpimage-flip.[ch]
      	* app/core/gimpimage-resize.[ch]
      	* app/core/gimpimage-rotate.[ch]
      	* app/core/gimpimage-scale.[ch]
      	* app/core/gimpitem-linked.[ch]
      	* app/core/gimpitem.[ch]
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable.c
      	* app/core/gimplayer.c
      	* app/core/gimpselection.c
      	* app/vectors/gimpvectors.c: replaced callback/data by GimpProgress.
      
      	* app/tools/gimpblendtool.c
      	* app/tools/gimptransformtool.c
      	* app/gui/convert-dialog.c
      	* app/actions/documents-commands.c
      	* app/actions/file-commands.c
      	* app/actions/image-commands.c
      	* app/actions/layers-commands.c
      	* app/actions/plug-in-commands.c
      	* app/actions/vectors-commands.c
      	* tools/pdbgen/pdb/convert.pdb
      	* tools/pdbgen/pdb/edit.pdb
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/layer.pdb: changed callers accordingly.
      
      	* app/pdb/*_cmds.c: regenerated.
      02d2b990
  10. 07 May, 2004 2 commits
    • Michael Natterer's avatar
      removed member "accelerator". It was never set and this is the · 9b7196a0
      Michael Natterer authored
      2004-05-07  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-proc.[ch]: removed member "accelerator".
      	It was never set and this is the conceptually wrong place to store
      	it anyway.
      
      	* app/actions/file-dialog-actions.c
      	* app/actions/plug-in-actions.c
      	* app/plug-in/plug-in-message.c
      	* app/xcf/xcf.c: changed accordingly.
      
      	* tools/pdbgen/pdb/plug_in.pdb (plugins_query): always return NULL
      	as accelerator. Cleaned up the function a bit and made it aware of
      	proc_def->menu_label added below.
      
      	* app/pdb/plug_in_cmds.c: regenerated.
      9b7196a0
    • Michael Natterer's avatar
      Changed plug-in menu registration again to allow passing just the menu · ca179a77
      Michael Natterer authored
      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.
      ca179a77
  11. 06 May, 2004 1 commit
    • Michael Natterer's avatar
      Enabled multiple menu entries per plug-in procedure: · 7b943b64
      Michael Natterer authored
      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.
      7b943b64
  12. 15 Apr, 2004 2 commits
    • Tor Lillqvist's avatar
      app/plug-in/plug-in-message.c (plug_in_handle_proc_install) · 2e103fa8
      Tor Lillqvist authored
      2004-04-15  Tor Lillqvist  <tml@iki.fi>
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install)
      	* app/plug-in/plug-in-proc.h (struct _PlugInProcDef)
      	* app/plug-in/plug-in-rc.c (plug_in_rc_write)
      	* app/plug-in/plug-ins.c (plug_ins_init): Make PDB procedures
      	(including their menu entries) installed during a plug-ins init()
      	phase show up. Add a flag to PlugInProcDef that tells whether the
      	proc was installed during the init() phase. Such procs aren't
      	saved to the pluginrc. Move the code that initializes plug-ins
      	that need initialization earlier, before the procs are added to
      	the PDB and menus are built. Fixes bug #139969.
      2e103fa8
    • Michael Natterer's avatar
      Context cleanup continued: · 837fa429
      Michael Natterer authored
      2004-04-15  Michael Natterer  <mitch@gimp.org>
      
      	Context cleanup continued:
      
      	* app/core/gimpitem.[ch]: added context parameter to
      	GimpItem::stroke().
      
      	* app/core/gimpchannel.c (gimp_channel_stroke)
      	* app/vectors/gimpvectors.c (gimp_vectors_stroke): use it to get
      	default values from instead of gimp_get_user_context().
      
      	* app/core/gimpselection.c
      	* app/gui/stroke-dialog.c
      	* tools/pdbgen/pdb/edit.pdb
      	* tools/pdbgen/pdb/paths.pdb: changed accordingly.
      
      	* app/pdb/edit_cmds.c
      	* app/pdb/paths_cmds.c: regenerated.
      
      	* app/plug-in/plug-in.[ch]: added GimpContext member to the PlugIn
      	struct. Added context parameter to plug_in_new(),
      	plug_in_call_query() and plug_in_call_init().
      
      	* app/plug-in/plug-in-run.[ch]: added context parameters to
      	plug_in_run() and plug_in_repeat().
      
      	* app/gui/plug-in-commands.c
      	* app/gui/vectors-commands.c
      	* app/pdb/procedural_db.c
      	* app/widgets/gimphelp.c: pass a context to plug_in_run() and
      	plug_in_repeat().
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): call
      	procedures with the plug-in's context.
      
      	* app/plug-in/plug-ins.c: use a temporary context for running the
      	plug-ins' query() and init() functions. Use the same context for
      	running automatic extensions. This temporarily separates the main
      	Script-Fu extension from the user context (i.e. scripts have no
      	way of setting/getting the global FG, BG, brush etc.).
      837fa429
  13. 14 Apr, 2004 1 commit
    • Michael Natterer's avatar
      Get rid of the "current_context" which was in fact just a bunch of global · 18d9161e
      Michael Natterer authored
      2004-04-15  Michael Natterer  <mitch@gimp.org>
      
      	Get rid of the "current_context" which was in fact just a bunch of
      	global variables. Instead, pass the needed context all the way
      	from the GUI and the PDB to the core. This is a prerequisite for
      	macro recording and generally helps separating the various
      	subsystems from each other. Work in progress...
      
      	* app/core/gimp.[ch]: removed member "current_context" and
      	gimp_[get|set]_current_context().
      
      	* app/core/gimp-edit.[ch]
      	* app/core/gimpdrawable-blend.[ch]
      	* app/core/gimpdrawable-bucket-fill.[ch]
      	* app/core/gimpdrawable-offset.[ch]
      	* app/core/gimpdrawable-transform.[ch]
      	* app/core/gimpimage-crop.[ch]
      	* app/core/gimpimage-flip.[ch]
      	* app/core/gimpimage-merge.[ch]
      	* app/core/gimpimage-resize.[ch]
      	* app/core/gimpimage-rotate.[ch]
      	* app/core/gimpimage.[ch]
      	* app/core/gimpimagefile.[ch]
      	* app/core/gimpitem-linked.[ch]
      	* app/core/gimpitem.[ch]
      	* app/core/gimplayer.[ch]
      	* app/core/gimpselection.[ch]
      	* app/core/gimptemplate.[ch]
      	* app/file/file-open.[ch]
      	* app/file/file-save.[ch]
      	* app/pdb/procedural_db.[ch]
      	* app/text/gimptext-compat.[ch]
      	* app/text/gimptextlayer-transform.[ch]
      	* app/gui/brush-select.[ch]
      	* app/gui/font-select.[ch]
      	* app/gui/gradient-select.[ch]
      	* app/gui/palette-select.[ch]
      	* app/gui/pattern-select.[ch]: added tons of "GimpContext *context"
      	parameters and use the passed context instead of
      	gimp_get_current_context().
      
      	* app/app_procs.c
      	* app/batch.c
      	* app/core/gimpchannel.c
      	* app/core/gimpdrawable.c
      	* app/paint/gimperaser.c
      	* app/paint/gimppaintbrush.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-ins.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimpblendtool.c
      	* app/tools/gimpbucketfilltool.c
      	* app/tools/gimpcroptool.c
      	* app/tools/gimpeditselectiontool.c
      	* app/tools/gimpfliptool.c
      	* app/tools/gimpinktool.c
      	* app/tools/gimptransformtool.c
      	* app/vectors/gimpvectors.c
      	* app/gui/convert-dialog.c
      	* app/gui/drawable-commands.c
      	* app/gui/edit-commands.c
      	* app/gui/file-commands.c
      	* app/gui/file-new-dialog.c
      	* app/gui/file-open-dialog.c
      	* app/gui/file-save-dialog.c
      	* app/gui/image-commands.c
      	* app/gui/layers-commands.c
      	* app/gui/offset-dialog.c
      	* app/gui/select-commands.c
      	* app/gui/vectors-commands.c
      	* app/widgets/gimpdnd.c
      	* app/widgets/gimpdocumentview.c
      	* app/widgets/gimphelp.c
      	* app/widgets/gimpthumbbox.c: pass gimp_get_user_context() or
      	GIMP_CONTEXT(tool_options) or whatever is the right context
      	to the changed core functions.
      
      	* tools/pdbgen/app.pl: pass "GimpContext *context" to all
      	generated PDB invokers.
      
      	* tools/pdbgen/pdb/brush_select.pdb
      	* tools/pdbgen/pdb/brushes.pdb
      	* tools/pdbgen/pdb/drawable.pdb
      	* tools/pdbgen/pdb/edit.pdb
      	* tools/pdbgen/pdb/font_select.pdb
      	* tools/pdbgen/pdb/gradient_select.pdb
      	* tools/pdbgen/pdb/gradients.pdb
      	* tools/pdbgen/pdb/image.pdb
      	* tools/pdbgen/pdb/layer.pdb
      	* tools/pdbgen/pdb/paint_tools.pdb
      	* tools/pdbgen/pdb/palette.pdb
      	* tools/pdbgen/pdb/palette_select.pdb
      	* tools/pdbgen/pdb/palettes.pdb
      	* tools/pdbgen/pdb/paths.pdb
      	* tools/pdbgen/pdb/pattern_select.pdb
      	* tools/pdbgen/pdb/patterns.pdb
      	* tools/pdbgen/pdb/selection.pdb
      	* tools/pdbgen/pdb/text_tool.pdb
      	* tools/pdbgen/pdb/transform_tools.pdb: pass the new context
      	parameter to the changed core functions.
      
      	* app/pdb/*_cmds.c: regenerated.
      18d9161e
  14. 20 Jan, 2004 1 commit
    • Michael Natterer's avatar
      changed member "ProcRec *current_temp_proc" to "GList *temp_proc_recs", a · e8b27df0
      Michael Natterer authored
      2004-01-20  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in.[ch]: changed member
      	"ProcRec *current_temp_proc" to "GList *temp_proc_recs", a stack
      	of temporary procedures, just as the "temp_main_loops" member is
      	supposed to be the stack of main loops for waiting for the
      	temp_procs' return values.
      
      	* app/plug-in/plug-in-run.c (plug_in_temp_run): changed accordingly.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-run.c
      	* libgimp/gimp.c: added #define ENABLE_TEMP_RETURN 1.
      
      	Enables return values for temporary procedures. On the libgimp
      	side, this just enables the code which returns the values, on the
      	app side it enables per-plug-in stacks of proc_recs and main_loops
      	and a message handler for the GP_TEMP_PROC_RETURN message.
      	A temp_proc's caller now blocks until the proc is finished.
      	Fixes bug #50649.
      
      	Left the #ifdefs there so it can be easily disabled if things
      	break. Please play with Script-Fu and test this.
      e8b27df0
  15. 19 Jan, 2004 2 commits
    • Sven Neumann's avatar
      include "libgimpbase/gimpbase.h" where needed; removed now unnecessary · 6d506d51
      Sven Neumann authored
      2004-01-19  Sven Neumann  <sven@gimp.org>
      
      	* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
      	now unnecessary inclusions of "file/file-utils.h".
      6d506d51
    • Sven Neumann's avatar
      removed file_utils_filename_to_utf8() ... · a70698c4
      Sven Neumann authored
      2004-01-19  Sven Neumann  <sven@gimp.org>
      
      	* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...
      
      	* libgimpbase/gimputils.[ch]: ... and added it here as
      	gimp_filename_to_utf8(). Added some docs that promise less than
      	the current implementation holds so that we can change the
      	implementation later.
      
      	* app/*/*.c: use gimp_filename_to_utf8() where
      	file_utils_filenames_to_utf8() has been used before.
      
      	* libgimpbase/gimpbase.def: changed accordingly.
      
      	* configure.in: reset GIMP_INTERFACE_AGE.
      a70698c4
  16. 14 Jan, 2004 1 commit
    • Tor Lillqvist's avatar
      Add new function file_utils_filename_to_utf8(), which is to be used when · 18485018
      Tor Lillqvist authored
      2004-01-14  Tor Lillqvist  <tml@iki.fi>
      
      	* app/file/file-utils.[ch]: Add new function
      	file_utils_filename_to_utf8(), which is to be used when converting
      	file names (which are kept in the on-disk encoding) to UTF-8 for
      	passing to GTK, or to g_print() etc.
      
      	* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
      	of the warnings generated by non-UTF8 pathnames. See #130118.
      
      	* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
      	strings in the on-disk encoding.
      
      	* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
      	g_filename_to_utf8()) before passing to g_print().
      18485018
  17. 08 Dec, 2003 1 commit
    • Michael Natterer's avatar
      code review / cleanup. · b2ff2897
      Michael Natterer authored
      2003-12-08  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimpdatafactory.c: code review / cleanup.
      
      	* app/plug-in/plug-in.c
      	* app/plug-in/plug-in-message.c: unified messages about plug-in
      	errors. Changed lots of g_warning()s to g_message()s because
      	g_warning() is for programming errors and the user should be
      	informed that the plug-in was killed and did not simply crash.
      b2ff2897
  18. 05 Dec, 2003 2 commits
    • Michael Natterer's avatar
      added enum GimpPDBCompatMode which can be one of { OFF, ON, WARN }. · ca45a5c6
      Michael Natterer authored
      2003-12-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/pdb/pdb-types.h: added enum GimpPDBCompatMode which can
      	be one of { OFF, ON, WARN }.
      
      	* app/main.c: added --pdb-compat-mode command line option. Renamed
      	--enable-stack-trace to --stack-trace-mode. Made default values of
      	stack_trace_mode and pdb_compat_mode depend on GIMP_MINOR_VERSION
      	(default to compat ON and stack_trace NEVER).
      
      	* app/app_procs.[ch]: pass pdb_compat_mode to gimp_new().
      
      	* app/core/gimp.[ch]: added pdb_compat_mode to the Gimp struct
      	and to gimp_new().
      
      	* app/pdb/procedural_db.c: leave the compat table empty for
      	GIMP_PDB_COMPAT_OFF.
      
      	* app/plug-in/plug-in-message.c: warn when a deprecated procedure
      	is called for GIMP_PDB_COMPAT_WARN.
      
      	* docs/gimp-1.3.1.in: changed accordingly.
      ca45a5c6
    • Michael Natterer's avatar
      Made 3rd party scripts work again after all that PDB function renaming: · 062c2fd4
      Michael Natterer authored
      2003-12-05  Michael Natterer  <mitch@gimp.org>
      
      	Made 3rd party scripts work again after all that PDB function
      	renaming:
      
      	* app/core/gimp.[ch]: added "GHashTable *procedural_compat_ht" to
      	the Gimp struct which maps old procedure names to new ones.
      	Call new function procedural_db_init_procs() instead of
      	internal_procs_init().
      
      	* app/pdb/procedural_db.[ch]: create and destroy the new compat
      	hash table. Added new function procedural_db_init_procs() which
      	registers the internal procedures and fills the compat hash table.
      
      	(procedural_db_execute): minor fixes.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): if
      	the requested procedure was not found, try the compat table.
      
      	* tools/pdbgen/pdb/procedural_db.pdb: made all PDB query
      	procedures compat aware. For compat procedures, return help
      	strings which declare the procedure as deprecated and tell
      	the new name of the procedure. Cleanup.
      
      	* app/pdb/procedural_db_cmds.c: regenerated.
      062c2fd4
  19. 14 Nov, 2003 1 commit
    • Michael Natterer's avatar
      libgimpwidgets/gimpquerybox.c configure the labels in the message dialog · 6eb77294
      Michael Natterer authored
      2003-11-14  Michael Natterer  <mitch@gimp.org>
      
      	* libgimpwidgets/gimpquerybox.c
      	* app/widgets/gimpwidgets-utils.c: configure the labels in the
      	message dialog and the query boxes to do automatic word wrapping
      	to be HIG compliant.
      
      	* app/app_procs.c
      	* app/batch.c
      	* app/config/gimpconfig-deserialize.c
      	* app/config/gimpconfig-path.c
      	* app/config/gimpconfig-utils.c
      	* app/config/gimpconfigwriter.c
      	* app/config/gimpscanner.c
      	* app/core/gimpbrush.c
      	* app/core/gimpbrushgenerated.c
      	* app/core/gimpbrushpipe.c
      	* app/core/gimpdatafactory.c
      	* app/core/gimpgradient.c
      	* app/core/gimpimage-merge.c
      	* app/core/gimpimage.c
      	* app/core/gimpimagefile.c
      	* app/core/gimplayer-floating-sel.c
      	* app/core/gimppalette.c
      	* app/core/gimppattern.c
      	* app/core/gimpselection.c
      	* app/display/gimpdisplayshell.c
      	* app/file/file-utils.c
      	* app/gui/brush-select.c
      	* app/gui/dialogs-commands.c
      	* app/gui/drawable-commands.c
      	* app/gui/edit-commands.c
      	* app/gui/file-commands.c
      	* app/gui/file-new-dialog.c
      	* app/gui/font-select.c
      	* app/gui/gradient-select.c
      	* app/gui/gui.c
      	* app/gui/image-commands.c
      	* app/gui/layers-commands.c
      	* app/gui/palette-select.c
      	* app/gui/palettes-commands.c
      	* app/gui/pattern-select.c
      	* app/gui/preferences-dialog.c
      	* app/gui/select-commands.c
      	* app/gui/stroke-dialog.c
      	* app/gui/tool-options-menu.c
      	* app/gui/vectors-commands.c
      	* app/gui/view-commands.c
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in.c
      	* app/plug-in/plug-ins.c
      	* app/text/gimptextlayer-xcf.c
      	* app/text/gimptextlayer.c
      	* app/tools/gimpcurvestool.c
      	* app/tools/gimphuesaturationtool.c
      	* app/tools/gimplevelstool.c
      	* app/tools/gimptransformtool.c
      	* app/vectors/gimpvectors-export.c
      	* app/widgets/gimpdatafactoryview.c
      	* app/widgets/gimphelp.c
      	* app/widgets/gimptemplateview.c
      	* app/widgets/gimptooloptionseditor.c
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
      	messages. Reduced number of translatable strings by making many
      	file error messages the same. Quote single words and filenames
      	with 'foo', not "foo". Replaced some more "drawable" by "layer".
      	General message cleanup and consistency check.
      
      	* app/pdb/image_cmds.c: regenerated.
      6eb77294
  20. 25 Aug, 2003 1 commit
    • Michael Natterer's avatar
      removed the "locale_domain" and "help_path" parameters since the function · dec69db1
      Michael Natterer authored
      2003-08-25  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-ins.[ch] (plug_ins_temp_proc_def_add): removed
      	the "locale_domain" and "help_path" parameters since the function
      	can figure them by itself.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
      	changed accordingly.
      
      	* app/plug-in/plug-in-proc.[ch] (plug_in_proc_def_get_help_id):
      	new function which will soon be implemented correctly :-)
      
      	* app/gui/file-open-menu.c (file_open_menu_setup)
      	* app/gui/file-save-menu.c (file_save_menu_setup)
      	* app/gui/plug-in-menus.c (plug_in_menus_create_entry): use it
      	here instead of duplicating broken code.
      dec69db1
  21. 23 Jun, 2003 1 commit
    • Michael Natterer's avatar
      added separate GMainLoops for waiting for extension_ack and for · ba91aeb8
      Michael Natterer authored
      2003-06-23  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in.[ch]: added separate GMainLoops for waiting
      	for extension_ack and for procedure_run's return value. The stack
      	of main loops is currently unused, it will be used for temp_proc
      	return values (which are currently disabled for no good reason).
      	Removed the boolean "recurse" and "starting_ext" states because
      	they are redundant now (we check for the presence of the dedicated
      	main loops instead).
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-progress.c
      	* app/plug-in/plug-in-run.c: changed accordingly.
      ba91aeb8
  22. 19 Jun, 2003 1 commit
    • Michael Natterer's avatar
      Changed the semantics of GIMP_EXTENSION and (to some extent) of · ecb0b584
      Michael Natterer authored
      2003-06-19  Michael Natterer  <mitch@gimp.org>
      
      	Changed the semantics of GIMP_EXTENSION and (to some extent)
      	of GIMP_PLUGIN:
      
      	The old meaning of EXTENSION was "I live in the toolbox" and
      	PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I
      	am invoked interactively)". This is completely useless, since
      	living in the toolbox means having "<Toolbox>" in the menu_path
      	and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of
      	what type of procedure we are.
      
      	The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure,
      	I am invoked, do my job and finish", while GIMP_EXTENSION means
      	"I will install temporary procedures and I will keep running to
      	keep them available".
      
      	(A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the
      	core that it's ready to run, or the core will block waiting for
      	the message !!!).
      
      	* configure.in: bumped version number to 1.3.16.
      
      	* libgimpbase/gimpprotocol.h: increased protocol version number so
      	old extensions will refuse to load.
      
      	* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't
      	blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but
      	look at their parameters and pass them either RUN-MODE, or
      	RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE.
      
      	* app/pdb/procedural_db.c: cleaned up, better error reporting,
      	replaced an impossible error message by g_return_if_fail()
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
      	better error messages.
      
      	* app/plug-in/plug-in-params.c: allocate parameter arrays using
      	g_new0() so we don't have to worry about uninitialized stuff
      	later.
      
      	* app/plug-in/plug-in-run.c (plug_in_run): wait for
      	gimp_extension_ack() installation confirmation for ALL extensions,
      	not just for automatically started ones.
      
      	* app/plug-in/plug-ins.c: cleanup.
      
      	* libgimp/gimp.[ch]: cleaned up and API-documented massively. Made
      	all magic values given in the GPConfig message static and added
      	accessor functions for them. Added gimp_tile_width()/height().
      	Added new function gimp_extension_enable() which turns on
      	asynchronous processing of temp_proc run requests without having
      	to enter an endless gimp_extension_process() loop. Moved all
      	private functions to the end of the file. Added tons of
      	g_return_if_fail() all over the place.  Call gimp_run_procedure2()
      	from gimp_run_procedure() instead of duplicating the
      	code. Indentation, spacing, stuff...
      
      	* libgimp/gimptile.[ch]: removed gimp_tile_width()/height().
      
      	* libgimp/gimpdrawable.c
      	* libgimp/gimppixelrgn.c
      	* libgimp/gimptile.c: use the gimp_tile_width()/height() accessor
      	functions.
      
      	* libgimp/gimp.def: added gimp_extension_enable.
      
      	* libgimp/gimpmenu.c: removed evil code which connected to
      	_readchannel manually and use gimp_extension_enable() for watching
      	temp_procs.
      
      	* plug-ins/helpbrowser/helpbrowser.c: removed the same evil code
      	here and call gimp_extension_enable(). Call gimp_extension_ack()
      	to let the core know that the temp_proc is installed.
      
      	* plug-ins/script-fu/script-fu.c: made all procedures except the
      	permanently running "extension_script_fu" ordinary GIMP_PLUGIN
      	procedures.
      
      	* plug-ins/common/curve_bend.c
      	* plug-ins/common/plugindetails.c
      	* plug-ins/common/screenshot.c
      	* plug-ins/common/uniteditor.c
      	* plug-ins/common/winclipboard.c
      	* plug-ins/dbbrowser/dbbrowser.c
      	* plug-ins/gfli/gfli.c
      	* plug-ins/twain/twain.c
      	* plug-ins/webbrowser/webbrowser.c
      	* plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN
      	procedures and renamed them from "extension_*" to "plug_in_*".
      	Random cleanups.
      
      	* app/widgets/gimphelp.c
      	* plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
      ecb0b584
  23. 11 Feb, 2003 2 commits
    • Michael Natterer's avatar
      added lots of members for the complete state of the plug-ins. · af330e96
      Michael Natterer authored
      2003-02-11  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimp.h: added lots of members for the complete
      	state of the plug-ins.
      
      	* app/plug-in/plug-in-types.h: added PlugInShm typedef.
      
      	* app/plug-in/plug-in-message.c
      	* app/plug-in/plug-in-rc.[ch]
      	* app/plug-in/plug-in-run.[ch]
      	* app/plug-in/plug-in-shm.c
      	* app/plug-in/plug-in.[ch]
      	* app/plug-in/plug-ins.[ch]: removed all global & static variables
      	and pass around more "Gimp" pointers.
      
      	* app/plug-in/plug-in-debug.c: use G_N_ELEMENTS().
      
      	* app/gui/image-menu.c
      	* app/gui/plug-in-commands.c
      	* app/gui/plug-in-menus.c
      	* app/gui/toolbox-menu.c
      	* app/xcf/xcf.c
      	* tools/pdbgen/pdb/fileops.pdb
      	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.
      
      	* app/pdb/fileops_cmds.c
      	* app/pdb/plug_in_cmds.c: regenerated.
      af330e96
    • Manish Singh's avatar
      added hooks for running plug-ins under a memory debugger. Also, removed · 96e7d31f
      Manish Singh authored
      2003-02-10  Manish Singh  <yosh@gimp.org>
      
              * app/plug-in/plug-in.[ch]: added hooks for running plug-ins under
              a memory debugger. Also, removed the args array from the PlugIn
              structure, replacing with simply a variable for the path to the
              plug-in (and one for a precalculated basename).
      
              * app/plug-in/plug-in-debug.[ch]: helper routines for the above
      
              * app/plug-in/plug-in-message.c
              * app/plug-in/plug-in-proc.c
              * app/plug-in/plug-in-progress.c: reflect new and renamed args members
      
              * app/plug-in/Makefile.am: added plug-in-debug.[ch]
      
              * app/core/core-types.h: added forward declaration for GimpPlugInDebug
      
              * app/core/gimp.[ch]: added structure member for GimpPlugInDebug
      
              * devel-docs/debug-plug-ins.txt: documented new feature
      96e7d31f
  24. 03 Feb, 2003 1 commit
    • Michael Natterer's avatar
      removed gimp_main_loop() and gimp_main_loop_quit() because they were a · 2db2ef61
      Michael Natterer authored
      2003-02-03  Michael Natterer  <mitch@gimp.org>
      
      	* app/core/gimp.[ch]: removed gimp_main_loop() and
      	gimp_main_loop_quit() because they were a temp_hack until plug-ins
      	have their own main loops. Added gimp_threads_enter() and
      	gimp_threads_leave() instead.
      
      	* app/gui/gui.c: ditto: removed the main loop stuff and added
      	functions which call GDK_THREADS_ENTER() and GDK_THREADS_LEAVE()
      	instead.
      
      	* app/app_procs.c: create the main GMainLoop here and use
      	gimp_threads_enter,leave().
      
      	* app/plug-in/plug-in.[ch]: added a ref_count per plug-in so the
      	plug-in is not destroyed under our feet while running a recursive
      	main loop. Added plug_in_ref(). Changed plug_in_destroy() to
      	plug_in_unref(). Don't destroy the plug-in if plug_in_open()
      	fails. Call gimp_threads_enter,leave() around g_main_loop_run().
      	Changed the way plug_in_push,pop() are used: "current_plug_in" is
      	no longer the plug-in which currently uses the wire, but the
      	plug-in which currently preforms a PDB call (the former meaning
      	was needed when wire callbacks had no plug-in context but needed
      	to get the plug-in from the global "current_plug_in" variable).
      	Removed all calls to plug_in_push,pop() from this file.
      
      	* app/plug-in/plug-in-message.c (plug_in_handle_proc_run): added
      	plug_in_push,pop() around procedural_db_execute(). No need
      	to construct an error return value if the procedure was not found
      	because procedural_db_execute() already does this.
      
      	Removed all other plug_in_push,pop(). Added more checks to plug-in
      	message handlers and kill the plug-in if it misbehaves. Cleanup.
      
      	* app/plug-in/plug-in-progress.c (plug_in_progress_cancel): if the
      	plug-in runs synchronously, provide a GIMP_PDB_CANCEL return value
      	so we don't see error messages about the "failed" procedure.
      
      	* app/plug-in/plug-in-run.c: removed plug_in_push,pop() stuff.
      	Set the new plug_in->starting_ext boolean while starting an
      	extension so the extension_ack handler knows that it wasn't called
      	from a buggy plug-in. Cleanup.
      
      	* app/plug-in/plug-ins.c: Cleanup.
      2db2ef61
  25. 30 Jan, 2003 1 commit
    • Michael Natterer's avatar
      renamed plug_in->busy to plug_in->in_temp_proc. Added a stack of · a3c38814
      Michael Natterer authored
      2003-01-30  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in.[ch]: renamed plug_in->busy to
      	plug_in->in_temp_proc. Added a stack of GMainLoops to each
      	plug-in. Added the "current_return_vals" to the PlugIn
      	struct. Renamed plug_in_kill() to plug_in_exit(). Removed
      	the stuff added below. Cleanup.
      
      	* app/plug-in/Makefile.am
      	* app/plug-in/plug-in-message.[ch]
      	* app/plug-in/plug-in-run.[ch]
      	* app/plug-in/plug-in-shm.[ch]: new files taking out functionality
      	from the overloaded plug-in.c. Added the code back in that implements
      	temp proc return messages (inside an #ifdef) because i don't
      	really get why it was removed on Sep 19 1998.
      
      	* app/plug-in/plug-ins.c: changed accordingly.
      
      	* app/plug-in/plug-in-def.c
      	* app/plug-in/plug-in-params.c: removed inclusion of <gtk/gtk.h>.
      
      	* app/gui/file-save-dialog.c
      	* app/gui/paths-dialog.c
      	* app/gui/plug-in-commands.c
      	* app/gui/plug-in-menus.c
      	* app/pdb/procedural_db.c
      	* app/widgets/gimphelp.c: changed plug-in includes accordingly.
      
      	* app/gui/plug-in-commands.c: don't use "the_gimp" from
      	"app_procs.h" but get it from the GimpItemFactory that invoked the
      	plug-in callback.
      a3c38814
  26. 20 Jan, 2003 1 commit
    • Michael Natterer's avatar
      renamed plug_in_progress_init() to plug_in_progress_start() so it matches · d407244f
      Michael Natterer authored
      2003-01-20  Michael Natterer  <mitch@gimp.org>
      
      	* app/plug-in/plug-in-progress.[ch]: renamed plug_in_progress_init()
      	to plug_in_progress_start() so it matches plug_in_progress_end().
      	Added g_return_if_fail() to all functions.
      
      	* app/plug-in/plug-in.[ch]: plug_in_new(): require the passed
      	path to be absolute. Removed plug_in_search_in_path(). Replaced
      	some if(plug_in){...} by g_return_if_fail(plug_in!=NULL). Cleanup.
      
      	* app/plug-in/plug-ins.c: plug_ins_def_add_from_rc(): refuse to
      	add plug_in_defs with non-absolute paths (should never happen).
      	Misc cleanup all over the place like s/GSList *tmp/GSList *list/.
      
      	* app/plug-in/plug-in-params.c: cleanup.
      
      	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.
      
      	* app/pdb/plug_in_cmds.c: regenerated.
      
      	* app/gui/brush-select.c
      	* app/gui/gradient-select.c
      	* app/gui/palette-select.c
      	* app/gui/pattern-select.c: some code review & cleanup.
      d407244f
  27. 17 Jan, 2003 1 commit
    • Michael Natterer's avatar
      One more Plug-In cleanup, it's still a mess... · a31c0f7d
      Michael Natterer authored
      2003-01-17  Michael Natterer  <mitch@gimp.org>
      
      	One more Plug-In cleanup, it's still a mess...
      
      	* app/plug-in/plug-in-def.[ch]: renamed "gboolean query" field
      	to "needs_query". Added setters for all values. Added
      	g_return_if_fail() stuff to all functions.
      
      	* app/plug-in/plug-in-proc.[ch]: added plug_in_proc_def_new().
      	Removed the "gboolean data_only" parameter from
      	plug_in_proc_def_destroy() and renamed it to
      	plug_in_proc_def_free().  Added plug_in_proc_def_get_progname()
      	which handles GIMP_TEMPORARY procedures correctly.
      
      	* app/plug-in/plug-in-rc.c: use the new stuff above.
      
      	* app/plug-in/plug-in.[ch]: renamed field "user_data" to
      	"plug_in_def" and added a comment that it is valid only during
      	query() and init().  Use the new APIs above. Pass meaningful
      	locale_domains and help_paths when adding temporary procedures
      	(fixes Scrip-Fu menu translation the right way (TM)). Cleanup.
      
      	* app/plug-in/plug-ins.[ch]: renamed plug_ins_def_add() to
      	plug_ins_def_add_from_rc(). Renamed plug_ins_proc_def_[add|remove]()
      	to plug_ins_temp_proc_def_[add|remove](). Added "Gimp" parameters
      	to plug_ins_help_path() and plug_ins_locale_domain(). Removed
      	unused pre-1.2 cruft "gimprc_prof_defs" and plug_ins_image_types().
      	Reverse gimp->load_procs and gimp->save_procs after all procedures
      	are registered. Removed Script-Fu translation hack. Reordered stuff.
      
      	* app/gui/plug-in-menus.[ch]: changed accordingly. Named all
      	public functions plug_in_menus_*(). Fixed Script-Fu menu translation
      	by using plug_in_proc_def_get_progname(). Cleanup.
      
      	* app/gui/file-open-menu.c
      	* app/gui/file-save-menu.c: don't g_slist_reverse() gimp->load_procs
      	and gimp->save_procs here.
      
      	* app/gui/toolbox-menu.c
      	* app/gui/image-menu.c
      	* tools/pdbgen/pdb/help.pdb
      	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.
      
      	* app/pdb/help_cmds.c
      	* app/pdb/plug_in_cmds.c: regenerated.
      
      	Unrelated:
      
      	* app/gui/image-menu.c
      	* app/widgets/gimpitemfactory.c: s/"tearoff1"/"tearoff"/g. I don't
      	get why the "1" was there. Minor cleanup.
      a31c0f7d
  28. 07 Jan, 2003 1 commit
    • Michael Natterer's avatar
      removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init() · bbc13c51
      Michael Natterer authored
      2003-01-07  Michael Natterer  <mitch@gimp.org>
      
      	* libgimpwidgets/gimphelpui.[ch]: removed gimp_help_init() and
      	gimp_help_free(). Added _gimp_help_init() instead.
      
      	* libgimpwidgets/gimpwidgets.def: changed accordingly.
      
      	* libgimpwidgets/gimpwidgets.c (gimp_widgets_init): call
      	_gimp_help_init() so it doesn't need to be done in all plug-ins
      	manually.
      
      	* libgimp/gimpcompat.h: added gimp_help_init() and gimp_help_free()
      	here as COMPAT_CRUFT.
      
      	* app/gui/gui.c
      	* plug-ins/FractalExplorer/Dialogs.c
      	* plug-ins/Lighting/lighting_ui.c
      	* plug-ins/MapObject/mapobject_ui.c
      	* plug-ins/common/AlienMap.c
      	* plug-ins/common/AlienMap2.c
      	* plug-ins/common/CML_explorer.c
      	* plug-ins/common/blur.c
      	* plug-ins/common/curve_bend.c
      	* plug-ins/common/gtm.c
      	* plug-ins/common/illusion.c
      	* plug-ins/common/jigsaw.c
      	* plug-ins/common/plasma.c
      	* plug-ins/common/polar.c
      	* plug-ins/common/ps.c
      	* plug-ins/common/randomize.c
      	* plug-ins/common/sinus.c
      	* plug-ins/common/snoise.c
      	* plug-ins/common/sparkle.c
      	* plug-ins/common/uniteditor.c
      	* plug-ins/common/warp.c
      	* plug-ins/common/wind.c
      	* plug-ins/gap/gap_arr_dialog.c
      	* plug-ins/gap/gap_mov_dialog.c
      	* plug-ins/gap/gap_navigator_dialog.c
      	* plug-ins/gdyntext/gdyntext_ui.c
      	* plug-ins/gfig/gfig.c
      	* plug-ins/gflare/gflare.c
      	* plug-ins/gimpressionist/gimpressionist.c
      	* plug-ins/maze/maze_face.c
      	* plug-ins/print/gimp_main_window.c
      	* plug-ins/sel2path/sel2path.c: removed the calls to
      	gimp_help_init() and gimp_help_free().
      
      	Fixed bug #81017:
      
      	* libgimpbase/gimpprotocol.[ch]: added "guint8 show_tool_tips"
      	to the GPConfig message. Increased the protocol version number.
      
      	* app/plug-in/plug-in.c: pass the value of gui_config->show_tool_tips.
      
      	* libgimp/gimp.[ch]: added gimp_show_tool_tips() to get the value
      	which was passed in the GPConfig message.
      
      	* libgimp/gimpui.c (gimp_ui_init): disable the tooltips
      	if show_tool_tips is FALSE.
      
      	* plug-ins/MapObject/mapobject_main.[ch]
      	* plug-ins/MapObject/mapobject_ui.c
      	* plug-ins/common/jigsaw.c
      	* plug-ins/gap/gap_navigator_dialog.c
      	* plug-ins/gfig/gfig.c: removed all plug-in specific GUI for
      	enabling/disabling tooltips.
      bbc13c51
  29. 05 Jan, 2003 1 commit
    • Manish Singh's avatar
      app/undo_history.c app/core/gimpbrush.c app/core/gimpimage-new.c · 013e30db
      Manish Singh authored
      2003-01-05  Manish Singh  <yosh@gimp.org>
      
              * app/undo_history.c
              * app/core/gimpbrush.c
              * app/core/gimpimage-new.c
              * app/core/gimpobject.c
              * app/core/gimppalette-import.c
              * app/core/gimppattern.c
              * app/plug-in/plug-in.c
              * app/tools/gimpbezierselecttool.c
              * libgimpwidgets/gimpunitmenu.c
              * plug-ins/MapObject/mapobject_ui.c
              * plug-ins/common/convmatrix.c
              * plug-ins/common/curve_bend.c
              * plug-ins/common/sample_colorize.c
              * plug-ins/common/tiff.c
              * plug-ins/flame/flame.c
              * plug-ins/gflare/gflare.c
              * plug-ins/gimpressionist/general.c
              * plug-ins/gimpressionist/orientation.c
              * plug-ins/gimpressionist/preview.c
              * plug-ins/gimpressionist/size.c
              * plug-ins/imagemap/imap_grid.c
              * plug-ins/imagemap/imap_menu.c
              * plug-ins/maze/algorithms.c
              * plug-ins/script-fu/interp_regex.c
              * plug-ins/script-fu/interp_sliba.c
              * plug-ins/script-fu/script-fu-console.c
              * plug-ins/script-fu/script-fu-server.c
              * plug-ins/webbrowser/webbrowser.c: added GINT_TO_POINTER and friends,
              fixed format strings, for 64-bitness.
      
              * modules/colorsel_triangle.c
              * plug-ins/tools/tool-safe-mode-plug-in.c: #include missing header
              files
      013e30db