Commit Graph

65 Commits

Author SHA1 Message Date
Michael Natterer 9bcbfb96b1 app, libgimpbase: move enums GimpCapStyle and GimpJoinStyle to libgimpbase 2015-11-09 02:16:03 +01:00
Michael Natterer e3ea383580 app, libgimpbase: move enum GimpStrokeMethod to libgimpbase
and rename its values.
2015-11-08 22:48:48 +01:00
Michael Natterer 68a9835d56 Bug 756822 - Colors/Desaturate/Luminosity should operate on linear RGB
Add GIMP_DESATURATE_LUMINANCE to enum GimpDesaturateMode and rename
GIMP_DESATURATE_LUMINOSITY to GIMP_DESATURATE_LUMA.

Keep GIMP_DESATURATE_LUMINOSITY as deprecated compat value and add it
to the script-fo and pygimp compat constants.

Change GimpOperationDesaturate to process GIMP_DESATURATE_LUMINANCE
with linear "RGBA float".
2015-10-22 19:50:56 +02:00
David Gowers c6563b676f Bug 665187 - Fuzzy Select by Alpha
Implement 'Alpha' criterion for selection tools
2015-10-22 19:05:01 +02:00
Michael Natterer 90e2d3c993 libgimpbase: remove value assignments from enum GimpTransformResize 2015-04-26 23:25:16 -04:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00
Michael Natterer 6c7fae9e11 app, libgimp*, pdb: move more enums from app/core to libgimpbase 2014-05-14 00:06:01 +02:00
Michael Natterer 9dde82b215 libgimpbase: sort gimpbaseenums.h alphabetically 2014-05-13 23:29:17 +02:00
Michael Natterer 454d5d954b app, libgimpbase: completely remove enum value GIMP_NO_FILL
It should not have been moved to libgimpbase, it was never
PDB-exported and not selectable in the GUI any longer, so its code
paths were dead.
2014-05-13 16:30:02 +02:00
Michael Natterer f636b4ad34 app, libgimpbase: move lots of enums from app/core to libgimpbase
It makes little sense to keep them in one header and parse them with a
pile of perl, just to generate them in another header. Simply keep
them in a place everybody depends on.
2014-05-13 00:27:29 +02:00
Michael Natterer 8aac599579 libgimpbase: properly deprecate old enum values in gimpbaseenums.g 2014-05-12 23:40:59 +02:00
Michael Natterer de08267f06 libgimpbase, *: add enum value GIMP_ICON_TYPE_ICON_NAME
and keep GIMP_ICON_TYPE_STOCK_ID as a deprecated alias. Change all
plug-ins accordingly and increase the pluginrc file version number so
it gets regenerated with "icon-name" instead of "stock-id".
2014-05-11 23:56:30 +02:00
Michael Natterer a4223766f2 all,libgimp*: move GimpConvolveType and GimpInkBlobType to libgimpbase
and make GimpConvolveType's values sane.
2014-04-29 22:44:58 +02:00
Michael Natterer 22c222291d libgimpbase,*: clean up enum values in gimpbaseenums.h
GIMP_ADD_foo_MASK -> GIMP_ADD_MASK_foo
GIMP_foo_MODE -> GIMP_BLEND_foo
GIMP_foo_CLONE -> GIMP_CLONE_foo
GIMP_foo -> GIMP_DODGE_BURN_TYPE_foo
GIMP_foo -> GIMP_TRANSFER_foo

Add compat values for the old names and compat code to script-fu
and pygimp.
2014-04-29 20:58:30 +02:00
Michael Natterer 8ce94d23b9 libgimpbase: move GIMP_REPEAT_TRUNCATE to the end of the enum
New values must go to the end to avoid ABI break.
2014-04-24 23:08:33 +02:00
Michael Natterer 0a9dc8b297 libgimpbase: exclude GIMP_INTERPOLATION_LANCZOS from the PDB again
An unmentioned fix in the previous commit to this file made it visible
to the PDB.
2014-04-24 23:04:52 +02:00
João S. O. Bueno ad4862c60b Adds new blending mode 'Truncate blend'
Bring repeat behavior on par with GEGL and Cairo,
and sane ways of creating square or circular gradient
shapes.
2014-04-24 12:18:26 -03:00
Miroslav Talasek 02505451b1 libgimpbase: enum GimpForegroundExtractMode: add GIMP_FOREGROUND_EXTRACT_MATTING 2013-05-07 23:00:57 +02:00
Nicolas Robidoux 84bb270307 gimpbaseenums.h: point legacy API Lanczos sampler to NoHalo, new GEGL name of LoHalo 2013-01-01 17:35:35 -05:00
Nicolas Robidoux dc19ead94f Add the Nohalo sampler (previously called Lohalo, which now does something different 2012-12-31 15:27:07 -05:00
Øyvind Kolås 76546f7e7c rename lanczos to lohalo
GEGL had a broken lanczos implementation, the lohalo implementation is better
anyways (at least when passed a proper scale matrix).
2012-05-02 17:50:38 +02:00
Alexia Death d2563a69fd app: Cleanup in preparation of merge 2010-11-04 20:27:11 +02:00
Alexia Death aee148a486 Merge branch 'master' into soc-2010-cage-2 2010-08-26 21:50:55 +03:00
Michael Muré 5d483a9517 add an enum for cage mode 2010-08-08 13:24:50 +02:00
Michael Natterer 2d6f808ff8 pdb: add a new PDB group "item" and move lots of functions to it
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).

Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
2010-07-09 09:34:44 +02:00
Michael Natterer 3411c7b63a libgimpbase: move docs from template files to inline comments
and remove all template files. Also fixed all gtk-doc warnings
and fixed/added some docs.
2010-06-29 19:16:51 +02:00
Tim Harder 27d5164f3c libgimpbase: Remove trailing comma from GimpTextHintStyle 2009-08-21 23:02:24 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann 033fcf1628 added new enum GimpTextHintStyle.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpTextHintStyle.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/text/gimptext.[ch]: added new property "hint-style". 
Removed
	"autohint" property and mapped the boolean property "hinting" to
	the new enum property "hint-style".

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	use "hint-style".

	* app/tools/gimptextoptions.[ch]: changed tool options 
accordingly.

	* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
	and introduced getters and setters for "hint-style".

	* app/pdb/text-layer-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimptextlayer_pdb.[ch]: regenerated.


svn path=/trunk/; revision=27432
2008-10-27 07:59:32 +00:00
Sven Neumann 369d991fd2 Complements the fix for bug #344818:
2008-08-19  Sven Neumann  <sven@gimp.org>

	Complements the fix for bug #344818:

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpPDBErrorHandler.

	* tools/pdbgen/enums.pl: regenerated.

	* app/plug-in/gimpplugin.[ch]: added error_handler to 
GimpPlugIn.

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	only display an error message for a failed procedure call if the
	plug-in's error-handler is set to 
GIMP_PDB_ERROR_HANDLER_INTERNAL.
	
	* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
	the plug-in's error-handler.

	* app/pdb/plug-in-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpenums.c.tail
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* plug-ins/common/file-compressor.c
	* plug-ins/file-uri/uri.c: set the error-handler to
	GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding 
the
	error with their return values.


svn path=/trunk/; revision=26656
2008-08-18 22:54:26 +00:00
Sven Neumann 81131c0bb4 Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB colors as
2008-07-14  Sven Neumann  <sven@gimp.org>

	Add new PDB data type PDB_COLORARRAY for using arrays of GimpRGB
	colors as argument or return value.

	* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): replaced
	the unused GIMP_PDB_BOUNDARY with GIMP_PDB_COLORARRAY.

	* libgimpbase/gimpprotocol.h: increased GIMP_PROTOCOL_VERSION.
	(struct _GPParam): added d_colorarray entry to the union.

	* libgimpbase/gimpprotocol.c
	* libgimp/gimp.[ch]
	* app/pdb/gimp-pdb-compat.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/gimpplugin-message.c
	* tools/pdbgen/pdb.pl: deal with the new data type.

	* tools/pdbgen/enums.pl: regenerated.

	* plug-ins/pygimp/pygimp-pdb.c
	* plug-ins/script-fu/scheme-wrapper.c: handle the new data type.


svn path=/trunk/; revision=26189
2008-07-14 14:09:16 +00:00
Sven Neumann b8b305a4e9 app/text/text-enums.[ch] as a first step towards a new text PDB API, moved
2008-03-31  Sven Neumann  <sven@gimp.org>

	* app/text/text-enums.[ch]
	* libgimpbase/gimpbaseenums.[ch]: as a first step towards a new
	text PDB API, moved GimpTextDirection and GimpTextJustification
	enums to libgimpbase.

	* libgimpbase/gimpbase.def: updated.


svn path=/trunk/; revision=25325
2008-03-31 21:48:07 +00:00
Michael Natterer 36bda892a9 libgimpbase/Makefile.am removed.
2007-10-31  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/xdg-user-dir.[ch]: removed.

	* libgimpbase/gimpbaseenums.[ch]: deprecate enum GimpUserDirectory.

	* libgimpbase/gimpenv.[ch]: deprecate gimp_user_directory() and make
	the implementation call g_get_user_special_dir().

	* libgimp/Makefile.am: #undef GIMP_DISABLE_DEPRECATED in gimpenums.c

	* app/widgets/gimpfiledialog.c: use g_get_user_special_dir() instead.

	* plug-ins/pygimp/gimpmodule.c: #undef GIMP_DISABLE_DEPRECATED.


svn path=/trunk/; revision=24018
2007-10-31 13:09:46 +00:00
Michael Natterer 8f05e8a0e9 remove extraneous comma.
2007-08-30  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.h: remove extraneous comma.


svn path=/trunk/; revision=23413
2007-08-30 15:03:38 +00:00
Michael Natterer 0d17856e58 libgimpbase/gimpbaseenums.[ch] changed enum GimpUserDirectory and API of
2007-08-11  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]
	* libgimpbase/gimpenv.[ch]: changed enum GimpUserDirectory and API
	of gimp_user_directory() so that g_get_user_special_dir() can be
	used instead as soon as we depend on GLib 2.14.

	* tools/pdbgen/enums.pl: regenerated.

	* app/widgets/gimpfiledialog.c
	* plug-ins/pygimp/gimpmodule.c: changed accordingly.


svn path=/trunk/; revision=23212
2007-08-11 17:15:52 +00:00
Sven Neumann 6c285197d4 app/file/Makefile.am removed here ...
2007-05-13  Sven Neumann  <sven@gimp.org>

	* app/file/Makefile.am
	* app/file/xdg-user-dir.c[ch]: removed here ...

	* libgimpbase/Makefile.am
	* libgimpbase/xdg-user-dir.[ch]: ... and moved to libgimpbase.

	* libgimpbase/gimpbaseenums.[ch]: added GimpUserDirectory enum.

	* libgimpbase/gimpenv.[ch]: added new function to identify 
special
	user folders. Added Win32 specific code and use 
xdg_user_dir_lookup()
	on other platforms.

	* libgimpbase/gimpbase.def: regenerated.


svn path=/trunk/; revision=22475
2007-05-13 16:31:14 +00:00
Sven Neumann 123a170acf changed strings.
2007-05-07  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch] (GimpCloneType): changed strings.

svn path=/trunk/; revision=22453
2007-05-07 15:04:04 +00:00
Sven Neumann 27192c4a6f changed labels for GimpTransformDirection to make the corrective transform
2007-03-19  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: changed labels for
	GimpTransformDirection to make the corrective transform feature
	more obvious.


svn path=/trunk/; revision=22146
2007-03-19 08:06:51 +00:00
Sven Neumann 3bc37e5117 changed description for GIMP_INTERPOLATION_LANCZOS to "Sinc (Lanczos3)".
2007-02-19  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: changed description for
	GIMP_INTERPOLATION_LANCZOS to "Sinc (Lanczos3)". More correct 
and
	more in sync with the other terms.


svn path=/trunk/; revision=21949
2007-02-19 12:06:01 +00:00
Mukund Sivaraman f0cff0ff92 app/core/Makefile.am app/core/gimp-transform-resize.c
2006-12-24  Mukund Sivaraman  <muks@mukund.org>

        * app/core/Makefile.am
        * app/core/gimp-transform-resize.c
        * app/core/gimpchannel.c
        * app/core/gimpdrawable-transform.c
        * app/core/gimpdrawable-transform.h
        * app/core/gimpdrawable.c
        * app/core/gimpimage-item-list.c
        * app/core/gimpimage-item-list.h
        * app/core/gimpitem-linked.c
        * app/core/gimpitem-linked.h
        * app/core/gimpitem.c
        * app/core/gimpitem.h
        * app/core/gimplayer.c
        * app/pdb/drawable_transform_cmds.c
        * app/text/gimptextlayer-transform.c
        * app/text/gimptextlayer-transform.h
        * app/tools/gimptransformoptions.c
        * app/tools/gimptransformtool.c
        * app/vectors/gimpvectors.c
        * libgimp/gimpdrawabletransform_pdb.c
        * libgimp/gimpdrawabletransform_pdb.h
        * libgimp/gimpenums.c.tail
        * libgimpbase/gimpbase.def
        * libgimpbase/gimpbaseenums.c
        * libgimpbase/gimpbaseenums.h
        * tools/pdbgen/enums.pl
        * tools/pdbgen/pdb/drawable_transform.pdb: implemented UI and PDB
        for new clipping modes for affine transforms (crop to largest
        rectangle, and crop to largest rectangle with the source's aspect
        ratio); fixed various bugs in the largest rectangle computation
        code; set padding to 6 in the transformation tool options.
2006-12-24 16:48:08 +00:00
Simon Budig ab4d8b037c extended gimp_vectors_import() and friends with a parameter for returning
2006-10-25  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpvectors-import.[ch]: extended gimp_vectors_import()
        and friends with a parameter for returning the newly generated vectors.

        * app/actions/edit-commands.c
        * app/actions/vectors-commands.c
        * app/display/gimpdisplayshell-dnd.c
        * app/widgets/gimpvectorstreeview.c: Changed accordingly.

        * app/vectors/vectors-enums.h: moved the GimpVectorsStrokeType to...
        * libgimpbase/gimpbaseenums.h: ... this file.

        * app/vectors/Makefile.am: Changed accordingly
        * app/vectors/vectors-enums.c: removed accordingly.

        * tools/pdbgen/pdb/vectors.pdb: new functions
        gimp_vectors_new_from_file() and gimp_vectors_new_from_string().

        * tools/pdbgen/pdb/paths.pdb: deprecated the previous functions.

        * app/pdb/internal_procs.c
        * app/pdb/paths_cmds.c
        * app/pdb/vectors_cmds.c
        * app/vectors/vectors-enums.c
        * libgimp/gimpenums.h
        * tools/pdbgen/enums.pl
        * libgimp/gimppaths_pdb.[ch]
        * libgimp/gimpvectors_pdb.[ch]
        * libgimpbase/gimpbaseenums.c
        * devel-docs/libgimp/tmpl/gimpfontselectbutton.sgml
        * devel-docs/libgimp/tmpl/gimptools.sgml: regenerated.
2006-10-25 15:14:03 +00:00
Sven Neumann bc3c41b648 removed "(Fastest)" from "None" and added translation context (bug
2006-08-23  Sven Neumann  <sven@gimp.org>

        * libgimpbase/gimpbaseenums.[ch]: removed "(Fastest)" from "None"
        and added translation context (bug #343576).

        * app/actions/select-actions.c (select_actions): added translation
        context for "None" and "All".

        * app/widgets/gimpactiongroup.c: strip translation context from
        all labels.

        * libgimpwidgets/gimppageselector.c: fixed singular form.
2006-08-23 14:55:39 +00:00
Sven Neumann 8fe74cd5bf do the change for bug #343576 here; the .c file is generated.
2006-08-23  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.h: do the change for bug #343576 here;
	the .c file is generated.
2006-08-23 07:55:00 +00:00
Sven Neumann 71d1c678cd use the GimpColorRenderingIntent enum from libgimpconfig instead of
2006-06-27  Sven Neumann  <sven@gimp.org>

	* modules/cdisplay_proof.c: use the GimpColorRenderingIntent
enum
	from libgimpconfig instead of duplicating it.
2006-06-27 20:00:03 +00:00
Michael Natterer 1217dc8d07 Allow to initialize a new layer mask with any of the image's channels.
2006-05-14  Michael Natterer  <mitch@gimp.org>

	Allow to initialize a new layer mask with any of the image's
	channels. Fixes bug #310207.

	* libgimpbase/gimpbaseenums.h (enum GimpAddMaskType): added
	value GIMP_ADD_CHANNEL_MASK.

	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* app/core/gimplayer.[ch] (gimp_layer_create_mask): added
	GimpChannel* parameter. Hacked the GIMP_ADD_SELECTION_MASK code a
	bit so it can handle GIMP_ADD_CHANNEL_MASK too. Cleaned up the
	function a bit.

	* app/dialogs/layer-add-mask-dialog.[ch]: added a menu of the
	image's channels.

	* app/actions/layers-commands.c (layers_add_mask_response): pass
	the channel selected in the menu to gimp_layer_create_mask().

	* tools/pdbgen/pdb/layer.pdb (layer_create_mask): use the image's
	active channel when GIMP_ADD_CHANNEL_MASK is passed. Fail if there
	is no active channel.

	* app/pdb/layer_cmds.c: regenerated.
2006-05-14 16:24:31 +00:00
Sven Neumann 95f9330dbb app/plug-in/plug-in-enums.h moved GimpRunMode enum to libgimpbase.
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-enums.h
	* libgimpbase/gimpbaseenums.h: moved GimpRunMode enum to libgimpbase.

	* app/plug-in/plug-in-enums.c
	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def: updated.
2006-04-06 10:16:39 +00:00
Michael Natterer a0d231b33c renamed GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
2005-12-29  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): renamed
	GIMP_PDB_PATH to GIMP_PDB_VECTORS and add the former as an alias
	for the latter.

	* libgimp/gimp.h (union _GimpParamData): added back d_path member
	to maintian source compatibility.

	* tools/pdbgen/pdb.pl
	* libgimp/gimp.c
	* app/pdb/procedural_db.c
	* app/plug-in/plug-in-params.c
	* libgimpbase/gimpprotocol.[ch]
	* plug-ins/pygimp/pygimp-pdb.c
	* plug-ins/script-fu/siod-wrapper.c: s/GIMP_PDB_PATH/GIMP_PDB_VECTORS/

	* app/pdb/image_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/vectors_cmds.c
	* libgimp/gimpimage_pdb.c
	* libgimp/gimpvectors_pdb.c
	* tools/pdbgen/enums.pl: regenerated.
2005-12-29 01:07:02 +00:00
Sven Neumann f6b370952c app/core/core-enums.[ch] moved GimpGridStyle enum to libgimpbase.
2005-09-30  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.[ch]
	* libgimpbase/gimpbaseenums.[ch]: moved GimpGridStyle enum to
	libgimpbase.

	* app/core/gimpimage-grid.h: indentation.

	* app/pdb/Makefile.am
	* libgimp/Makefile.am
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/grid.pdb: applied slightly modified patch by
	Sylvain FORET that adds a PDB API for the image grid.

	* app/pdb/grid_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpenums.c.tail
	* libgimp/gimpgrid_pdb.[ch]
	* tools/pdbgen/enums.pl
	* tools/pdbgen/groups.pl: (re)generated.

	* libgimp/gimp.def
	* libgimpbase/gimpbase.def: updated.
2005-09-30 16:35:04 +00:00
Michael Natterer b10adabb5e Added parent window API to the GimpProgress interface and to the libgimp
2005-09-09  Michael Natterer  <mitch@gimp.org>

	Added parent window API to the GimpProgress interface and to
	the libgimp progress stuff. Might look strange, but does
	the right thing in almost all cases (image window, file dialog,
	script-fu dialog etc). Fixes bug #62988.

	* app/core/gimpprogress.[ch]: added GimpProgress::get_window()
	which should return a toplevel window ID if the progress is in a
	window that wants to be the transient parent of plug-in dialogs.

	* app/widgets/gimpwidgets-utils.[ch] (gimp_window_get_native): new
	function which returns the window handle of a GtkWindow's GdkWindow.

	* app/widgets/gimpfiledialog.c: implement ::get_window().

	* app/display/gimpdisplay.[ch]: ditto. Removed window handle API.

	* app/gui/gui-vtable.c: changed accordingly.

	* libgimpbase/gimpbaseenums.[ch] (enum GimpProgressCommand):
	added GIMP_PROGRESS_COMMAND_GET_WINDOW.

	* app/plug-in/plug-in-progress.[ch] (plug_in_progress_get_window):
	new function. Also renamed some functions to match the
	GimpProgress interface, and not the legacy PDB procedure names.

	* tools/pdbgen/pdb/progress.pdb
	* app/core/gimppdbprogress.c: implement get_window() on both
	sides of the wire, keeping backward compatibility (hopefully).

	* libgimp/gimpprogress.[ch]: deprecated gimp_progress_install()
	and added gimp_progress_install_vtable() which takes a vtable with
	padding to be extensible. Added get_window() vtable entry and
	dispatch it accordingly. Also added pulse() which was implemented
	in a hackish way before. Everything is of course backward
	compatible.

	* libgimp/gimpprogressbar.c: inmplement the get_window() stuff
	so a plug-in dialog containing a progress can be the transient
	parent of another dialog in another plug-in.

	* libgimp/gimpui.[ch] (gimp_ui_get_progress_window): new function
	which returns a foreign GdkWindow of this plug-ins progress
	window.

	Renamed gimp_window_set_transient_for_default_display() to
	gimp_window_set_transient() and make it use the progress' window
	handle instead of the display's (which is the right thing to do in
	almost all cases).

	* libgimp/gimp.def
	* libgimp/gimpui.def: add the new functions.

	* tools/pdbgen/enums.pl
	* app/pdb/internal_procs.c
	* app/pdb/progress_cmds.c
	* libgimp/gimpprogress_pdb.[ch]: regenerated.

	* libgimp/gimpexport.c
	* plug-ins/*/*.c: follow API change.
2005-09-09 18:07:31 +00:00