Commit Graph

300 Commits

Author SHA1 Message Date
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer afb767fcc1 app: use 0..1 axes in GimpCurveTool's curves widgets on != 8-bit images 2013-06-13 00:23:49 +02:00
Michael Natterer 6c97908a9e app: add "gboolean gamma_corrected" to gimp_histogram_new()
so we can make histograms of the gamma-corrected image data. Pass
TRUE all over the place so the histogram works perceptually. This
needs more thinking...
2013-06-12 01:02:25 +02:00
Michael Natterer a7f42de4c0 app: turn GimpHistorgram into a GimpObject, no other changes 2013-06-11 21:23:32 +02:00
Michael Natterer b8558f8859 app: add coordinates to GimpColorTool's and GimpImageMapTool's "picked"
signals and vfuncs. This is currently unused, but GEGL operations
can soon pick coordinates just like they can pick colors.
2013-05-30 19:29:36 +02:00
Michael Natterer 2a0472b57e app: don't forward key events to the curves tool graph if the tool isn't active 2013-04-26 00:11:51 +02:00
Michael Natterer b71ffeca60 app: do more stuff generically in gimp_image_map_tool_initialize()
- reset the config object if it exists
- trigger the first preview of the filter
- remove the same stuff from all subclasses
2013-04-16 23:28:02 +02:00
Michael Natterer 9bb4c3d484 app: pull some GEGL operation logic from subclasses into GimpImageMapTool
- connect to the config object's notify generically and update the preview
- allow to properly exchange the operation at runtime to remove major
  uglyness from GimpOperationTool
- return undo_desc from GimpImageMapTool::get_operation() so we have
  proper strings in the undo history, not always "GEGL operation"
- simplify all get_operation() implementations
2013-04-16 22:06:48 +02:00
Massimo Valentini c743a4fc0a app: don't pass a NULL widget to gtk_widget_event
<Alt>C C <Ctrl>1 <ESC> used to print:

(gimp-2.8:1): Gtk-CRITICAL **: IA__gtk_widget_event:
                assertion `GTK_IS_WIDGET (widget)' failed
2012-07-05 18:08:01 +02:00
Michael Natterer 7101ee191a app: move all GEGL operations to new directory app/operations/ 2012-05-10 21:22:44 +02:00
Michael Natterer 36e982e2ed app: port gimp_image_pick_color() to return a Babl format
instead of a GimpImageType.
2012-05-02 17:50:39 +02:00
Michael Natterer 8d5471502e app: move GimpHistogram from base/ to core/ 2012-05-02 17:46:13 +02:00
Michael Natterer a34b19774b app: remove the legacy curves cruft
and move PDB parameter collection into GimpCurvesConfig convenience
constructors.
2012-05-02 17:46:11 +02:00
Michael Natterer 38b8f0596d app: use the new modifier API instead of constants in all tools
There are still many uses of literal SHIFT and MOD1 left, but all uses
of CONTROL are gone. Should work exactly as before on Win/X11, and
still has some glitches on OSX.
2011-10-06 21:59:07 +02:00
Michael Natterer 3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
Michael Natterer 036c5aff73 app: constify "color" parameter in GimpColorTool::picked() 2011-04-04 00:08:57 +02:00
Michael Natterer 6378e9fc4d app: rename member GimpImageMapTool->shell to ->dialog
"shell" has confused me once too often today...
2011-03-20 18:27:11 +01:00
Michael Natterer ec196a8ac4 app: allow to set a color for GimpCurveView's primary curve
and redo how the curves tool sets its curves in order to support this
without code duplication. Also change the color of the yellow curve in
the dynamics output editor to orange because yellow is hardly visible.
2011-02-10 20:05:50 +01:00
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