Commit Graph

282 Commits

Author SHA1 Message Date
Alexia Death 45c835aaa2 app: Add API to remove all background curves from the curve view
Also, use this change in cuves tool.
2010-02-27 19:22:48 +02:00
Michael Natterer 088368079c app: make the coordinates display in the curve view configurable
Add API for X and Y ranges, default to 0.0..1.0 and configure the view
for 0..255 in the curves tool.
2010-02-23 11:39:35 +01:00
Michael Natterer bd151ac84e app: add background curves when editing the R, B or G curve
Show the other two RGB channels in the background.
2010-02-20 20:32:19 +01:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer ec6600a0b3 Refuse to edit locked drawables
Check whether the drawable to edit is locked in GimpTool::initialize()
and bail out with an appropriate error if it is. This currently
prevents cloning from locked drawables, will fix that later.
2009-08-20 17:05:23 +02:00
Sven Neumann ef8dabcc7f tools: improve status-bar hints for the Curves tool 2009-05-24 18:20:01 +02:00
Michael Natterer f9c64f092b if the curve view didn't handle the key press, chain up so the normal
2009-02-08  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcurvestool.c (gimp_curves_tool_key_press): if the
	curve view didn't handle the key press, chain up so the normal
	GimpImageMapTool keys for reset/cancel/ok works.


svn path=/trunk/; revision=28003
2009-02-08 20:28:41 +00: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 b37c8bcf0a app/core/Makefile.am added GIMP_ERROR as general error domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimperror.[ch]: added GIMP_ERROR as general error 
domain.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/core/gimptooloptions.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/vectors/gimpvectors-import.c: use GIMP_ERROR as error 
domain
	instead of 0, which is not accepted by g_set_error_literal().

	* app/gui/session.c
	* app/menus/menus.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdevices.c: use G_FILE_ERROR as error domain 
for
	file errors.


svn path=/trunk/; revision=27628
2008-11-12 10:56:06 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer f7287be7b5 app/tools/gimptool.[ch] made all GimpCoords* in the tool API const.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
	API const.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbrushtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsourcetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly and added const
	to all GimpCoords* in utility functions too.

	* app/tools/gimptexttool.c: don't modify the passed coords. In
	fact, simply removed the code that did because it had no effect.


svn path=/trunk/; revision=27517
2008-11-01 15:17:36 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Michael Natterer e21935a7b9 Bug 134956 – Curves tool doesn't save free curves
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Bug 134956 – Curves tool doesn't save free curves

	* app/core/gimpmarshal.list
	* app/widgets/gimpsettingsbox.[ch]: add signal "file-dialog-setup"
	and emit it when the export/import file chooser is fully
	constructed. Callbacks can then do additional things to the
	dialog, like adding custom buttons.

	* app/tools/gimpcurvestool.h
	* app/tools/gimplevelstool.h: add boolean member
	"export_old_format".

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c (gimp_*_tool_dialog): connect to
	the settings box' "file-dialog-setup".

	(gimp_*_tool_export_setup): new callback which adds a toggle to
	the file choosers that allows to export to the old format.
	Default saving the new format, we defaulted to the old one before.

	(gimp_*_tool_settings_export): check the "export_old_format"
	boolean and only save the cruft format if it is TRUE; chain up
	otherwise, which generically saves the new format.

	* app/tools/gimplevelstool.c (gimp_levels_tool_settings_import):
	add the same file format detection code as in the curves tool
	so it transparently loads old and new levels files.


svn path=/trunk/; revision=27194
2008-10-09 15:25:59 +00:00
Michael Natterer 52c61f6b5f keep a "default_config" object around and use it to reset the tool if it
2008-09-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: keep a "default_config" object
	around and use it to reset the tool if it exists.

	(gimp_image_map_tool_edit_as): set the default_config on the new
	tool so "reset" goes back to the values the tool was started with.

	* app/tools/gimpcolorbalencetool.c (gimp_color_balance_tool_reset)
	* app/tools/gimpcurvestool.c (gimp_curves_tool_reset)
	* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_reset)
	* app/tools/gimplevelstool.c (gimp_levels_tool_reset): use the
	default config to reset the tool here too if it exists.


svn path=/trunk/; revision=27090
2008-09-30 13:46:08 +00:00
Michael Natterer 7df6950e19 parse the first line of the file manually and detect whether we are
2008-06-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcurvestool.c (gimp_curves_tool_settings_import):
	parse the first line of the file manually and detect whether we
	are importing an old curves file or a GimpConfig one.


svn path=/trunk/; revision=25988
2008-06-25 08:16:48 +00:00
Sven Neumann 1d4d2be2dd changed descriptions for GimpHistogramScale enum.
2008-06-03  Sven Neumann  <sven@gimp.org>

	* app/widgets/widgets-enums.[ch]: changed descriptions for
	GimpHistogramScale enum.

	* app/tools/gimpimagemaptool.[ch]

	* app/tools/gimpimagemaptool-settings.c: added a GtkSizeGroup for
	aligning with the "Presets" label. Added an accessor for the
	dialog's vbox.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: use the new accessor. Minor
	dialog cleanups in a few places.

svn path=/trunk/; revision=25884
2008-06-03 10:51:04 +00:00
Michael Natterer 9f85ee0070 s/save/export/g, s/load/import/g, removed button tooltip members.
2008-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: s/save/export/g,
	s/load/import/g, removed button tooltip members.

	* app/tools/gimpimagemaptool-settings.[ch]
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: changed accordingly.

	* app/tools/gimpimagemaptool-settings.c: clean up menu item creation.


svn path=/trunk/; revision=25752
2008-05-22 11:00:50 +00:00
Sven Neumann b3ac4eadb6 make the mnemonic work
svn path=/trunk/; revision=25750
2008-05-22 09:05:30 +00:00
Sven Neumann e161a6148c use a combo-box for the curve type.
2008-05-22  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcurvestool.c (gimp_curves_tool_dialog): use a
	combo-box for the curve type.

svn path=/trunk/; revision=25748
2008-05-22 08:39:30 +00:00
Michael Natterer 48fbb509a4 remove unused variable.
2008-05-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcurvestool.c: remove unused variable.


svn path=/trunk/; revision=25740
2008-05-21 19:12:49 +00:00
Michael Natterer 353283b8e8 app/tools/Makefile.am new files containing all the recent settings and
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimpimagemaptool-settings.[ch]: new files containing
	all the recent settings and settings load/save GUI and code.  Got
	rid of shortcut loading/saving using shift+click. Added default
	implementations of ::settings_load() and ::settings_save().
	The GUI is currently horrible, work in progress!

	* app/tools/gimpimagemaptool.c: removed the settings code here.

	* app/tools/gimpcurvestool.c * app/tools/gimplevelstool.c: don't
	pack the load and save buttons, this is done generically for all
	tools now.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: set the load/save related members
	of GimpImageMapToolClass.


svn path=/trunk/; revision=25718
2008-05-20 14:17:13 +00:00
Michael Natterer 62719d6703 Unabstract image map tool settings load/save a bit before it's turned into
2008-05-19  Michael Natterer  <mitch@gimp.org>

	Unabstract image map tool settings load/save a bit before it's
	turned into generic load/save for all image map tools:

	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]: add GError** to save_cruft()
	functions.

	* app/tools/gimpimagemaptool.[ch]: add GError to
	::settings_save(), changed "file" parameter of ::settings_load()
	and ::settings_save() to "filename", removed
	gimp_image_map_tool_load_save() utility function and moved the
	code to the settings_load() and settings_save() utility functions.

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: changed accordingly. Open and close
	the settings files here.


svn path=/trunk/; revision=25714
2008-05-19 18:22:01 +00:00
Sven Neumann 6e6a0355aa app/core/Makefile.am
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpcurve.[ch]:
	* app/core/gimpcurve-map.[ch]: split curve map functions into
	seperate files.

	* app/gegl/gimpoperationcurves.c
	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: changed accordingly.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=25642
2008-05-11 14:56:57 +00:00
Sven Neumann a392a231d3 renamed gimp_curve_map() to gimp_curve_map_value(). Added new function
2008-05-11  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.[ch]: renamed gimp_curve_map() to
	gimp_curve_map_value(). Added new function 
gimp_curve_map_pixels()
	which will allow for better optimization.

	* app/gegl/gimpoperationcurves.c 
(gimp_operation_curves_process):
	use gimp_curve_map_pixels().

	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: follow API change.


svn path=/trunk/; revision=25641
2008-05-11 14:48:22 +00:00
Mukund Sivaraman 0708ffea76 Fixes for some Sparse reported issues in app/
2008-03-28  Mukund Sivaraman  <muks@mukund.org>

        Fixes for some Sparse reported issues in app/

        * app/core/gimpdrawable-operation.c: Added prototype for            
        gegl_node_add_child().

        * app/core/gimpcurve.c: Remove C99 code       
                                
        * app/tools/gimpcurvestool.c 
        * app/tools/gimpperspectiveclonetool.c 
        * app/vectors/gimpstroke.c: Mark functions as static.

        * app/base/siox.c: state is a pointer.

        * app/plug-in/gimppluginprocframe.c: values is a pointer.

        * app/plug-in/plug-in-rc.c: plug_in_rc_parse() returns a pointer.

        * app/plug-in/gimpinterpreterdb.c: Check program[0] for '\0'
        instead of the pointer program itself.


svn path=/trunk/; revision=25292
2008-03-28 23:18:19 +00:00
Michael Natterer f4378d6237 get rid of fixed-size arrays and allocate the points and curve arrays
2008-02-28  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: get rid of fixed-size arrays and
	allocate the points and curve arrays dynamically. Added "n-points"
	and "n-samples" CONSTRUCT_ONLY properties. Renamed member "curve"
	to "samples". Lots of code changes to work with dynamic limits
	rather than 17 and 256.

	* app/core/gimpdrawable-curves.c
	* app/gegl/gimpcurvesconfig.c
	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c: changed accordingly.


svn path=/trunk/; revision=24995
2008-02-28 12:34:46 +00:00
Michael Natterer e831300587 port the "xpos" API to [0.0..1.0] doubles too.
2008-02-09  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcurveview.[ch]: port the "xpos" API
	to [0.0..1.0] doubles too.

	* app/tools/gimpcurvestool.[ch]: rename "col_value" member to
	"picked_color" and use gdouble instead of gint. Also use GimpCurve
	API to map the values instead of accessing the curve directly.
	Fixes setting curve anchor points by color picking.


svn path=/trunk/; revision=24838
2008-02-09 10:56:25 +00:00
Michael Natterer 044359f93d changed all values to be [0.0..1.0] doubles instead of [0..255] integers.
2008-02-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: changed all values to be [0.0..1.0]
	doubles instead of [0..255] integers. Also changed the API to use
	doubles instead of ints. Still have the fixed-size arrays though.

	(gimp_curve_map): new function to map values.

	* app/gegl/gimpoperationcurves.c: remove private map() function
	and use the one from GimpCurve.

	* app/gegl/gimpcurvesconfig.c
	* app/core/gimpdrawable-curves.c: port to the new gdouble API.

	* app/tools/gimpcurvestool.c: use gimp_curve_get_uchar() to get
	the arrays for the color bars.

	* app/widgets/gimpcurveview.[ch]: port to gdouble and some cleanup.


svn path=/trunk/; revision=24837
2008-02-09 10:01:51 +00:00
Michael Natterer 50ad5cfd32 add refcounting and replace free() API by ref() and unref().
2008-02-04  Michael Natterer  <mitch@gimp.org>

	* app/base/gimphistogram.[ch]: add refcounting and replace free()
	API by ref() and unref().

	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-levels.c
	* app/widgets/gimphistogrameditor.c
	* tools/pdbgen/pdb/color.pdb: replace calls to
	gimp_histogram_free() by gimp_histogram_unref().

	* app/pdb/color_cmds.c: regenerated.

	* app/widgets/gimphistogramview.c: reference the histograms so we
	don't need the widget's users to keep them around while the widget
	exists.

	* app/tools/gimpcurvestool.[ch]: remove the histogram from the
	tool struct and just create one locally to set it on the histogram
	view widget.

	Unrelated:

	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpthresholdtool.[ch]: renamed "hist" members to
	"histogram" plus some cleanup.


svn path=/trunk/; revision=24792
2008-02-04 21:41:57 +00:00
Michael Natterer 743dac7d36 app/tools/gimplevelstool.[ch] remove boolean "color" and "alpha" members
2008-02-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimplevelstool.[ch]
	* app/tools/gimpcurvestool.[ch]: remove boolean "color" and "alpha"
	members from the tool structs and ask the drawable instead when
	needed.


svn path=/trunk/; revision=24779
2008-02-03 23:53:00 +00:00
Michael Natterer bcf2abe247 fix various curves tool brokenness. Should behave (TM) now.
2008-02-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcurvestool.c: fix various curves tool brokenness.
	Should behave (TM) now.


svn path=/trunk/; revision=24771
2008-02-01 18:18:16 +00:00
Michael Natterer b8ca285631 add "GObject **config" return value to GimpImageMapTool::get_operation()
2008-01-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: add "GObject **config" return
	value to GimpImageMapTool::get_operation() and memory-manage the
	config object here.

	Add default implementation of GimpImageMapTool::reset() which
	calls gimp_config_reset() on the config object.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: return the config object in
	get_operation() and don't unref it in finalize().

	Connect to the config object's "notify" signal and update the GUI
	in the callback. Also call gimp_image_map_tool_preview() there.
	Removed all other GUI update functions and all calls to preview().

	Removed reset() implementations which only called
	gimp_config_reset().


svn path=/trunk/; revision=24752
2008-01-30 18:31:43 +00:00
Michael Natterer f200f9ca29 app/gegl/gimpcolorbalanceconfig.[ch] app/gegl/gimpcolorizeconfig.[ch]
2008-01-27  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcolorbalanceconfig.[ch]
	* app/gegl/gimpcolorizeconfig.[ch]
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimphuesaturationconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]
	* app/gegl/gimpposterizeconfig.[ch]
	* app/gegl/gimpthresholdconfig.[ch]: implement the GimpConfig
	interface and remove public reset() functions except special ones
	which reset only parts of the objects. Add lots of property
	notifications.

	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: use gimp_config_reset(), misc.
	related changes and cleanups.


svn path=/trunk/; revision=24724
2008-01-27 17:39:01 +00:00
Michael Natterer 3fd067de7c app/tools/gimpbrightnesscontrasttool.c app/tools/gimpcolorbalancetool.c
2008-01-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: remove includes which are no
	longer needed.


svn path=/trunk/; revision=24709
2008-01-25 13:15:53 +00:00
Michael Natterer f848ac07ca app/gegl/gimpcurvesconfig.[ch] add load_cruft() and save_cruft() functions
2008-01-25  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]: add load_cruft() and
	save_cruft() functions which load/save the old (current) curves
	and levels file formats.

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: use them here and remove a lot of
	includes.


svn path=/trunk/; revision=24708
2008-01-25 13:02:37 +00:00
Michael Natterer 52fbc5cd09 app/tools/gimpcurvestool.[ch] remove the "channel" member from the tool
2008-01-25  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcurvestool.[ch]
	* app/tools/gimplevelstool.[ch]: remove the "channel" member from
	the tool struct and use the channel from the options object
	instead.


svn path=/trunk/; revision=24705
2008-01-25 10:02:11 +00:00
Michael Natterer 8990062156 app/gegl/Makefile.am app/gegl/gegl-types.h app/gegl/gimpcurvesconfig.[ch]
2008-01-23  Michael Natterer  <mitch@gimp.org>

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimpoperationcurves.[ch]: add curves operation and its
	config object. Hack around badly to be able to use GimpCurve from
	app/core.

	* app/gegl/gimp-gegl.c: register the curves operation.

	* app/tools/gimpcurvestool.[ch]: added get_operation() implemenetation
	and use the new config object instead of keeping around 5 curves.


svn path=/trunk/; revision=24683
2008-01-23 09:28:16 +00:00
Michael Natterer dc65f5fc20 add typedef GimpImageMapApplyFunc here.
2008-01-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: add typedef GimpImageMapApplyFunc here.

	* app/core/gimpimagemap.[ch] (gimp_image_map_new): add apply_func
	and apply_data parameters.

	(gimp_image_map_apply): remove them here and add a GeglRectangle
	parameter which is the visible area of the affected drawable.

	* app/tools/gimpimagemaptool.[ch]: keep apply_func and apply_data
	around in the GimpImageMapTool struct.

	(gimp_image_map_tool_create_map): pass them to gimp_image_map_new().

	(gimp_image_map_tool_map): call gimp_image_map_apply() here and
	pass the drawable's visible rectangle.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c (init): set apply_func and
	apply_data in the parent instance.

	(map): remove calls to gimp_image_map_apply().


svn path=/trunk/; revision=24573
2008-01-09 01:06:46 +00:00
Michael Natterer 5780913e2f app/tools/gimpcolorbalancetool.c app/tools/gimpcolorizetool.c
2007-12-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: #include <gegl.h>. Fixes the build.


svn path=/trunk/; revision=24489
2007-12-30 17:54:51 +00:00
Michael Natterer ab465c742d add read-only property "frozen" and new API
2007-11-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: add read-only property "frozen" and
	new API gimp_viewable_preview_is_fozen(). Emit property notifications.

	* app/widgets/gimphistogramview.[ch]: add API to show a second
	histogram in the background. Remove member "light_histogram" from
	the GimpHistogramViewClass struct.

	* app/widgets/gimpcurveview.c: don't set "light_histogram".

	* app/tools/gimpcurvestool.c: set the background histogram instead.

	* app/widgets/gimphistogrameditor.[ch]: connect to "notify::frozen"
	of the drawable and show its histogram at the freezing point in
	the background. This way the original histogram is visible while
	we are doing color corrections.


svn path=/trunk/; revision=24159
2007-11-15 10:33:51 +00:00
Michael Natterer 21b3675ea8 don't recalculate the curve if the data object is frozen. Recalculate on
2007-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: don't recalculate the curve if the data
	object is frozen. Recalculate on thaw instead. Made
	gimp_curve_calculate() private and emit some GimpData::dirty
	signals where appropriate.

	* app/tools/gimpcurvestool.c
	* app/widgets/gimpcurveview.c
	* tools/pdbgen/pdb/color.pdb: changed accodingly (connect to "dirty"
	instead of "notify" and added some freeze/thaw where approproate).

	* app/pdb/color_cmds.c: regenerated.


svn path=/trunk/; revision=24063
2007-11-05 10:02:20 +00:00
Michael Natterer 2d827be2f3 added event handling and completely edit the curve here.
2007-11-05  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcurveview.[ch]: added event handling and
	completely edit the curve here.

	* app/tools/gimpcurvestool.[ch]: remove all event handling and
	curve editing code and only listen to curve signals.


svn path=/trunk/; revision=24060
2007-11-05 08:59:09 +00:00
Michael Natterer ae1f2eb2bc app/widgets/Makefile.am app/widgets/widgets-types.h new GimpHistogramView
2007-11-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpcurveview.[ch]: new GimpHistogramView subclass
	which does all the curve stuff.

	* app/widgets/gimphistorgramview.[ch]: removed all curve code again.

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


svn path=/trunk/; revision=24051
2007-11-04 13:09:10 +00:00
Michael Natterer 6c64c64b07 added API to set the selected point.
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimphistogramview.[ch]: added API to set the
	selected point.

	* app/tools/gimpcurvestool.c: use it.


svn path=/trunk/; revision=24046
2007-11-02 17:08:42 +00:00
Michael Natterer e5927feba1 added API to modify free-form curves and properties to listen to curve
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.[ch]: added API to modify free-form curves
	and properties to listen to curve changes.

	* app/widgets/gimphistogramview.[ch]: added everything that's
	needed for rendering a curve with all its color and cursor
	indicators on top of a histogram. This code will move to a
	subclass soon.

	* app/tools/gimpcurvestool.[ch]: removed all curve rendering here.
	Also removed all explicit updating by connecting to curve signals
	and updating in the callback.


svn path=/trunk/; revision=24045
2007-11-02 16:51:18 +00:00
Michael Natterer 5dd23ae18b app/core/Makefile.am app/core/core-types.h app/core/gimpcurve-save.[ch]
2007-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpcurve-save.[ch]
	* app/core/gimpcurve-load.[ch]
	* app/core/gimpcurve.[ch]: new GimpData subclass which keeps a
	curve as known from the curves tool. Pretty much unfinished, but
	can do everything that used to be done by base/curves.c and more.

	* app/base/curves.[ch]: stripped down to plain arrays of
	uchar (the actual curve) and the LUT setup function. All the rest
	is done by GimpCurve now.

	* app/tools/gimpcurvestool.[ch]: use an array of GimpCurves
	instead of the old Curves cruft. Use Curves only for the last step
	of creating the LUT. Pretty much unfinished migration here too.

	* tools/pdbgen/pdb/color.pdb: use a GimpCurve here too.

	* app/pdb/color_cmds.c: regenerated.


svn path=/trunk/; revision=24041
2007-11-02 12:18:50 +00:00
Sven Neumann a5d10b2ff0 renamed gimp_image_active_drawable() to gimp_image_get_active_drawable().
2007-07-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: renamed gimp_image_active_drawable() to
	gimp_image_get_active_drawable().

	* app/[lots of files]
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly.

svn path=/trunk/; revision=22958
2007-07-19 14:59:51 +00:00
Sven Neumann 263567109d introduced local variables in an attempt to make the code a little more
2007-06-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcurvestool.c: introduced local variables in an
	attempt to make the code a little more readable.

svn path=/trunk/; revision=22814
2007-06-21 09:27:55 +00:00
Sven Neumann ab71eb9f6a app/paint/gimppaintoptions.c app/tools/gimpcolorbalancetool.c
2007-05-23  Sven Neumann  <sven@gimp.org>

	* app/paint/gimppaintoptions.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimprectangleoptions.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/tool_manager.c: allocate structs using GSlice.

svn path=/trunk/; revision=22595
2007-05-23 13:49:06 +00:00
Sven Neumann 0fef82fb16 app/base/gimplut.[ch] app/tools/gimpcurvestool.c reverted the changes done
2007-05-05  Sven Neumann  <sven@gimp.org>

	* app/base/gimplut.[ch]
	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c: reverted the changes done for bug
	#331782. See the bug report for an explanation.


svn path=/trunk/; revision=22421
2007-05-05 14:29:37 +00:00