Commit Graph

28 Commits

Author SHA1 Message Date
Joao S. O. Bueno Calligaris ea9a919220 avoids function call with an invalid drawable id
2007-08-15  Joao S. O. Bueno Calligaris <gwidion@mpc.com.br>

        * plug-ins/pygimp/pygimp-drawable.c: avoids function call
          with an invalid drawable id


svn path=/trunk/; revision=23272
2007-08-15 14:01:01 +00:00
Manish Singh 6f26979be4 plug-ins/pygimp/gimpcolormodule.c plug-ins/pygimp/gimpenumsmodule.c
2007-05-28  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/gimpcolormodule.c
        * plug-ins/pygimp/gimpenumsmodule.c
        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/gimpthumbmodule.c
        * plug-ins/pygimp/gimpuimodule.c
        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-image.c
        * plug-ins/pygimp/pygimp-pdb.c
        * plug-ins/pygimp/pygimp-tile.c: cleanups.

svn path=/trunk/; revision=22644
2007-05-28 22:26:22 +00:00
Manish Singh f7c0e8ce13 a FALSE return from gimp_drawable_mask_bounds doesn't mean failure.
2006-10-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c: a FALSE return from
        gimp_drawable_mask_bounds doesn't mean failure. Restore old
        behavior. Fixes bug #357223.
2006-10-04 07:26:12 +00:00
Sven Neumann 48e52e674a plug-ins/pygimp/gimpui.override (_wrap_gimp_dialog_new) allow String or
2006-09-21  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/gimpui.override (_wrap_gimp_dialog_new)
	* plug-ins/pygimp/pygimp-drawable.c (drw_set_name): allow String
	or Unicode objects.

	* plug-ins/pygimp/plug-ins/colorxhtml.py: prepared for translation.
2006-09-21 11:19:43 +00:00
Sven Neumann cf62a51605 use PyUnicode_Check() instead of PyString_Check().
2006-09-20  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/pygimp-drawable.c (drw_set_name): use
	PyUnicode_Check() instead of PyString_Check().

	* plug-ins/pygimp/plug-ins/clothify.py: reverted localisation;
	this plug-in isn't installed by default.
2006-09-20 11:52:19 +00:00
Manish Singh c46a34fdf0 plug-ins/pygimp/pygimp-drawable.c reorder includes to avoid preprocessor
2006-09-08  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-pdb.c: reorder includes to avoid preprocessor
        symbol redefinition warnings.
2006-09-08 21:05:38 +00:00
Manish Singh 793da2025f plug-ins/pygimp/pygimp-drawable.c #define NO_IMPORT_PYGOBJECT, so the
2006-09-08  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-pdb.c: #define NO_IMPORT_PYGOBJECT, so
        the internal pygobject API symbol is only defined once.
2006-09-08 20:54:10 +00:00
Manish Singh cbd3a1930d This is the start of wrapping much more of the GIMP API in Python. It's
2006-07-19  Manish Singh  <yosh@gimp.org>

        This is the start of wrapping much more of the GIMP API in Python.
        It's not complete yet, some things are broken.

        * plug-ins/pygimp/gimpcolormodule.c
        * plug-ins/pygimp/pygimpcolor.h
        * plug-ins/pygimp/pygimpcolor-api.h
        * plug-ins/pygimp/pygimp-colors.c: wrapped GimpHSV, GimpHSL, and
        GimpCMYK. Fleshed out a bit more of GimpRGB as well. Made the API
        exportable to other modules.

        * plug-ins/pygimp/pygimp-rgb.c: removed, subsumed into
        pygimp-colors.c.

        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-pdb.c: PDB calls receive and create
        gimpcolor.RGB objects now.

        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/pygimp-api.h: export pygimp_drawable_new.

        * plug-ins/pygimp/gimpcolor-types.defs
        * plug-ins/pygimp/gimpenums-types.defs
        * plug-ins/pygimp/gimpui.defs
        * plug-ins/pygimp/gimpui.override
        * plug-ins/pygimp/gimpuimodule.c: new module for GIMP UI widget
        bindings.

        * plug-ins/pygimp/gimpui.py
        * plug-ins/pygimp/gimpfu.py: use some of the new widgets.

        * plug-ins/pygimp/Makefile.am: hook all the above into the build
        system.

        * plug-ins/pygimp/plug-ins/palette-sort.py: use new color API.
2006-07-20 04:53:47 +00:00
Sven Neumann f64b986b48 plug-ins/common/curve_bend.c plug-ins/common/plugin-browser.c
2005-08-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/curve_bend.c
	* plug-ins/common/plugin-browser.c
	* plug-ins/helpbrowser/dialog.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/jpeg/jpeg-load.c: use canonical procedure names with
	gimp_run_procedure().

2005-08-19  Sven Neumann  <sven@gimp.org>

	* gimpmodule.c
	* gimp-drawable.c: use canonical procedure names with
	gimp_run_procedure().
2005-08-19 16:35:48 +00:00
Manish Singh 1612db6507 plug-ins/pygimp/gimpmodule.c revert to old behavior of parasite_find
2005-07-17  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/pygimp-drawable.c: revert to old behavior of
        parasite_find functions returning None when there isn't a parasite
        found. Fixed bug #310666.
2005-07-17 19:49:01 +00:00
Manish Singh e68206f09f actually return a value.
2005-07-10  Manish Singh  <yosh@gimp.org>

        * libgimp/gimplayer.c (gimp_layer_set_preserve_trans): actually
        return a value.

        * plug-ins/pygimp/pygimp-drawable.c: create new lock_alpha attribute,
        and deprecate old preserve_trans attribute.

        * plug-ins/pygimp/plug-ins/shadow_bevel.py: use new lock_alpha API.
2005-07-10 22:05:11 +00:00
Manish Singh e8c7a7a497 plug-ins/pygimp/pygimp-api.h export our API to other modules in a saner
2005-06-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-api.h
        * plug-ins/pygimp/gimpmodule.c: export our API to other modules
        in a saner fashion. Also add checks_get_shades method.

        * plug-ins/pygimp/procbrowser.c: Use new export API.

        * plug-ins/pygimp/pygimp-drawable.c (drw_mask_intersect):
        use Py_BuildValue to build the tuple.

        * plug-ins/pygimp/pygimp-image.c (img_repr): capitalization fix.

        * plug-ins/pygimp/pygimp-rgb.c
        * plug-ins/pygimp/pygimpcolor.h
        * plug-ins/pygimp/gimpcolormodule.c: beginnings of a wrapper to
        libgimpcolor.

        * plug-ins/pygimp/gimpfu.py
        * plug-ins/pygimp/gimpenums.py
        * plug-ins/pygimp/gimpenumsmodule.c: use gimp enum API to find out
        our enums.

        * plug-ins/pygimp/Makefile.am: hook in all of the above.
2005-06-04 00:17:06 +00:00
Manish Singh 6344fe823b default args for layer constructor.
2005-03-05  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c: default args for layer
        constructor.
2005-03-05 08:05:23 +00:00
Manish Singh 553e840768 include Parasite flag values.
2005-03-04  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/enumcode-py.pl: include Parasite flag values.

        * plug-ins/pygimp/gimpenums.py: regenerated.

        * plug-ins/pygimp/pygimp-drawable.c: minor change for type
        consistency.

        * plug-ins/pygimp/pygimp-image.c: add keyword args, is_dirty getter.
2005-03-05 07:59:15 +00:00
Manish Singh ebe37283ed wrap fonts_refresh and fonts_get_list, clean up some of the other resource
2005-03-04  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/gimpmodule.c: wrap fonts_refresh and fonts_get_list,
        clean up some of the other resource list plugins.

        * plug-ins/pygimp/pygimp-drawable.c: more keyword args and better
        exception messages.

        * plug-ins/pygimp/pygimp-parasite.c: support keyword args for
        parasite constructor.
2005-03-05 06:17:23 +00:00
Manish Singh a56d6b41ad no need to export PLUG_IN_INFO symbol.
2005-03-04  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/Makefile.am: no need to export PLUG_IN_INFO symbol.

        * plug-ins/pygimp/pygimp-image.c: more descriptive exception for
        Image constructor.

        * plug-ins/pygimp/pygimp-pdb.c: cosmetic changes.

        * plug-ins/pygimp/pygimp-drawable.c: wrap transform API, add keyword
        arguments to several drawable methods, wrap
        layer_resize_to_image_size.
2005-03-05 00:30:29 +00:00
Manish Singh 872c501ee6 Make a compatibility wrapper for PyBool_FromLong for pre-2.3 versions of
2005-03-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp.h: Make a compatibility wrapper for
        PyBool_FromLong for pre-2.3 versions of python.

        * plug-ins/pygimp/gimpfu.py
        * plug-ins/pygimp/gimpui.py: Update to use some more modern python
        features.

        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/pygimp-display.c
        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-image.c
        * plug-ins/pygimp/pygimp-parasite.c
        * plug-ins/pygimp/pygimp-pdb.c
        * plug-ins/pygimp/pygimp-tile.c: Throw exceptions on failures for
        libgimp wrappers (fixes bug #160136), and make the exception strings
        a lot more descriptive to aid debugging. Also return proper Bools when
        appropriate. Some new API wrapped as well. Still a work in progress.

        * plug-ins/pygimp/gimpplugin.py
        * plug-ins/pygimp/gimpshelf.py
        * plug-ins/pygimp/plug-ins/clothify.py
        * plug-ins/pygimp/plug-ins/foggify.py
        * plug-ins/pygimp/plug-ins/sphere.py: Add some whitespace to make
        things more readable.
2005-03-03 08:43:55 +00:00
Manish Singh 9fe4d3bbc3 remove add/remove_layer_mask methods...
2003-12-23  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-image.c: remove add/remove_layer_mask
        methods...

        * plug-ins/pygimp/pygimp-drawable.c: ... and put them here, as methods
        of the layer object.

        * plug-ins/pygimp/plug-ins/foggify.py: update for the above new API.
2003-12-24 00:41:12 +00:00
Manish Singh 24ef6784bb made linked an attribute of GimpDrawable.
2003-12-04  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c: made linked an attribute of
        GimpDrawable.
2003-12-04 19:12:41 +00:00
Michael Natterer a90e63ca9b renamed gimp_layer_mask() to gimp_layer_get_mask().
2003-12-04  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/layer.pdb: renamed gimp_layer_mask() to
	gimp_layer_get_mask().

	* libgimp/gimplayer.h: removed gimp_layer_get_mask_id #define.

	* libgimp/gimpcompat.h: added old stuff.

	* app/pdb/layer_cmds.c
	* libgimp/gimplayer_pdb.[ch]: regenerated.

	* libgimp/gimpexport.c
	* plug-ins/common/curve_bend.c
	* plug-ins/pygimp/pygimp-drawable.c
	* plug-ins/script-fu/scripts/image-structure.scm
	* plug-ins/xjt/xjt.c: changed accordingly.

2003-12-04  Michael Natterer  <mitch@gimp>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimplayer.sgml: fllow gimp_layer_get_mask() change.
2003-12-04 14:05:17 +00:00
Michael Natterer 78def81895 renamed gimp_drawable_image() to gimp_drawable_get_image() for symmetry
2003-12-04  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb: renamed gimp_drawable_image() to
	gimp_drawable_get_image() for symmetry with
	gimp_drawable_set_image().

	* libgimp/gimpchannel.h: removed gimp_channel_get_image_id #define.
	* libgimp/gimpdrawable.h: removed gimp_drawable_image_id #define.
	* libgimp/gimplayer.h:: removed gimp_layer_get_image_id #define.

	* libgimp/gimpcompat.h: added the old stuff here.

	* app/pdb/drawable_cmds.c
	* libgimp/gimpdrawable_pdb.[ch]: regenerated.

	* libgimp/gimpmiscui.c
	* plug-ins/Lighting/lighting_main.c
	* plug-ins/MapObject/mapobject_main.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/film.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/ps.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/smooth_palette.c
	* plug-ins/common/warp.c
	* plug-ins/imagemap/imap_cmd_gimp_guides.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_preview.c
	* plug-ins/maze/maze.c
	* plug-ins/pygimp/pygimp-drawable.c
	* plug-ins/rcm/rcm_misc.c
	* plug-ins/script-fu/scripts/addborder.scm
	* plug-ins/script-fu/scripts/carve-it.scm
	* plug-ins/script-fu/scripts/weave.scm: changed accordingly.

	* plug-ins/maze/maze.c: completely reindented.

	* plug-ins/script-fu/siod/trace.c: removed trailing whitespace.

2003-12-04  Michael Natterer  <mitch@gimp.org>

	* libgimp/libgimp-sections.txt
	* libgimp/tmpl/gimpchannel.sgml
	* libgimp/tmpl/gimpdrawable.sgml
	* libgimp/tmpl/gimplayer.sgml: updated after
	gimp_drawable_get_image() cleanup.
2003-12-04 13:21:27 +00:00
Michael Natterer a62e834b95 made it compile again.
2003-12-04  Michael Natterer  <mitch@gimp.org>

	* plug-ins/pygimp/pygimp-drawable.c (lay_set_linked): made it
	compile again.
2003-12-04 11:13:39 +00:00
Manish Singh 0518761f23 plug-ins/pygimp/gimpmodule.c plug-ins/pygimp/pygimp-drawable.c
2003-12-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/gimpmodule.c
        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-image.c
        * plug-ins/pygimp/pygimp-pdb.c
        * plug-ins/pygimp/pygimp-tile.c: some cosmetic changes to error
        messages.

        * plug-ins/pygimp/pygimp-drawable.c: accessors for name, tattoo, and
        visible live in the drawable class now, so layer and channel objects
        inherit it.
2003-12-03 21:52:09 +00:00
Manish Singh ce07d9eaa4 plug-ins/pygimp/pygimp-drawable.c quick fix to make it build with the
2003-12-03  Manish Singh  <yosh@gimp.org>

        * plug-ins/pygimp/pygimp-drawable.c
        * plug-ins/pygimp/pygimp-tile.c: quick fix to make it build with the
        below. Real fix later.
2003-12-03 17:41:36 +00:00
James Henstridge e7d1c4fa91 update to list all methods. Convert no arg functions to METH_NOARG (slight
2002-08-30  James Henstridge  <james@daa.com.au>

    * pygimp-*.c: update to list all methods.  Convert no arg
    functions to METH_NOARG (slight code size reduction).
2002-08-30 15:00:00 +00:00
James Henstridge 29aa6f5037 add getsets for common drawable attributes. (PyGimpLayer_Type): convert
2002-08-30  James Henstridge  <james@daa.com.au>

    * pygimp-drawable.c (PyGimpDrawable_Type): add getsets for common
    drawable attributes.
    (PyGimpLayer_Type): convert getattr and setattr to getsets.
    (PyGimpChannel_Type): convert to getsets.

    * gimpmodule.c (new_parasite): remove.  Superceded by
    gimp.Parasite constructor.
    (pygimp_image_list): rename to match actual API.

    * pygimp-parasite.c (PyGimpParasite_Type): switch to getsets.
    (para_init): add constructor.
2002-08-30 12:46:27 +00:00
James Henstridge 47f86d9f89 many updates to Python code to work with new PyGTK. I can start a plug in
2002-08-29  James Henstridge  <james@daa.com.au>

    * *.py, plug-ins/*.py: many updates to Python code to work with
    new PyGTK.  I can start a plug in now.
2002-08-29 01:53:26 +00:00
James Henstridge dc70b17ac0 split module into multiple files, and convert types to Python 2.2 style
2002-08-28  James Henstridge  <james@daa.com.au>

    * *.c, pygimp.h: split module into multiple files, and convert
    types to Python 2.2 style types.  Still need to fix some of the
    getattr routines.
2002-08-28 15:17:29 +00:00