Commit Graph

125 Commits

Author SHA1 Message Date
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
Sven Neumann 3b067cba23 added gimp_image_get_projection().
2008-08-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_projection().

	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scroll.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppainttool.c
	* app/widgets/gimpsamplepointeditor.c
	* tools/pdbgen/pdb/image.pdb: use the new accessor function.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=26413
2008-08-07 09:17:46 +00:00
Michael Natterer 4bdf9a6d2a add marshaller BOOLEAN__STRING for the change below.
2008-06-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpmarshal.list: add marshaller BOOLEAN__STRING for
	the change below.

	* app/widgets/gimpsettingsbox.[ch]: add the import/export dialogs
	here. Add a bunch of parameters to new() to be used by the
	dialogs, they are not properties yet. Changed import() and
	export() signals to pass the selected filename and return a
	boolean indicating success.

	* app/tools/gimpimagemaptool-settings.c: remove the dialog code
	here and connect the import/export functions directly to above
	GimpSettingsBox signals.

	* app/tools/gimpimagemaptool.[ch]: remove file dialog member.


svn path=/trunk/; revision=25991
2008-06-25 14:25:32 +00:00
Michael Natterer 8912b68290 app/widgets/Makefile.am app/widgets/widgets-types.h new widget containing
2008-06-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpsettingsbox.[ch]: new widget containing the
	combo and menu button for the image map tool settings plus most of
	their logic. Has "import" and "export" signals that might go away
	if I figure a way to nicely abstract that. Contains some minor
	bugfixes and cosmetic improvements compared to the old code.

	* app/tools/gimpimagemaptool.[ch]
	* app/tools/gimpimagemaptool-settings.[ch]: changed accordingly,
	mostly removal of lots of code that is now in the widget.


svn path=/trunk/; revision=25943
2008-06-13 11:56:46 +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 8004eba247 check if the tool class has the "settings_name" string set to decide
2008-05-22  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c: check if the tool class has
	the "settings_name" string set to decide whether to add
	the settings GUI.

	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpposterizetool.c: don't set any settings
	strings. Presets make no sense for tools with just one parameter.


svn path=/trunk/; revision=25755
2008-05-22 15:39:00 +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
Michael Natterer 986ba501f5 app/tools/gimpimagemaptool.[ch] turn the ugly row of favorites options
2008-05-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]
	* app/tools/gimpimagemaptool-settings.c: turn the ugly row of
	favorites options buttons into a menu that's attached to an arrow
	button right of the favorites combo.


svn path=/trunk/; revision=25741
2008-05-21 19:14:46 +00:00
Michael Natterer a921d65df6 app/core/Makefile.am app/core/core-types.h new GimpViewable subclass which
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpimagemapconfig.[ch]: new GimpViewable subclass
	which has a "time" property. Sets the object's name to a date
	string if a time != 0 gets set. Has a compare function which first
	sorts the objects with a timestamp in MRU order and then the
	objects without timestamp by name.

	* app/gegl/gimpbrightnesscontrastconfig.[ch]
	* 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]: derive from GimpImageMapConfig.

	* app/tools/gimpimagemaptool.c: sort the settings container with
	above compare function.

	* app/tools/gimpimagemaptool-settings.c: add utility functions
	for loading and saving the settings container. In the settings
	combo, add a separator between MRU items and favorites.

	* app/Makefile.am: make the thing link.


svn path=/trunk/; revision=25724
2008-05-20 21:41:47 +00:00
Michael Natterer d6e3339f1b remove gimp_image_map_tool_add_recent()...
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c: remove
	gimp_image_map_tool_add_recent()...

	* app/tools/gimpimagemaptool-settings.[ch]: ...and add it here.


svn path=/trunk/; revision=25720
2008-05-20 15:50:49 +00:00
Michael Natterer 38ee606813 unref the new settings object after adding it to the recent container.
2008-05-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_add_recent):
	unref the new settings object after adding it to the recent
	container.

	* app/tools/gimpimagemaptool-settings.c: add a "Save to Favorites"
	button which pops a string entry dialog and saves the current
	settings to the recent container.


svn path=/trunk/; revision=25719
2008-05-20 15:03:03 +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
Michael Natterer 4d0b4464ac made the lists of recent settings persistent. Note that the settings of
2008-05-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c: made the lists of recent settings
	persistent. Note that the settings of tools that modify multiple
	channels or ranges are saved incompletely because their settings
	still lack custom serialize() implementations. Work in progress.


svn path=/trunk/; revision=25702
2008-05-18 17:01:48 +00:00
Michael Natterer 228dd93e9d add gimp_image_map_tool_edit_as().
2008-05-17  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: add gimp_image_map_tool_edit_as().

	* app/tools/gimplevelstool.c (levels_to_curves_callback): use it.

	* app/gegl/gimpbrightnesscontrastconfig.[ch]: add
	gimp_brightness_contrast_config_to_levels_config().

	* app/tools/gimpbrightnesscontrasttool.c: implement "Edit as Levels".


svn path=/trunk/; revision=25690
2008-05-17 17:57:39 +00:00
Sven Neumann 9b7a46311f don't reserve Delete for use by tools. Fixes bug #532116.
2008-05-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_events) 
(gimp_display_shell_canvas_tool_events):
	don't reserve Delete for use by tools. Fixes bug #532116.

	* app/tools/gimpimagemaptool.c
	* app/tools/gimptransformtool.c: don't use Delete (you can still
	use the Backspace key to achieve the same).


svn path=/trunk/; revision=25607
2008-05-10 10:20:42 +00:00
Michael Natterer d753ee57f5 don't create the recent settings menu if the tool did not set a config
2008-02-18  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_initialize):
	don't create the recent settings menu if the tool did not set a
	config object.

	* app/tools/gimpgegltool.[ch]: pack the operation's settings in a
	frame and add a label when there is no operation selected.


svn path=/trunk/; revision=24907
2008-02-18 15:31:23 +00:00
Michael Natterer 23456dc253 app/display/gimpdisplayshell-callbacks.c
2008-02-16  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimppolygonselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpcontainerpopup.c
	* app/widgets/gimppaletteview.c
	* libgimpwidgets/gimpcolorhexentry.c
	* libgimpwidgets/gimpnumberpairentry.c
	* plug-ins/script-fu/script-fu-console.c: Unify the handling of
	various "Enter" and "Space" keysyms all over the place. Fixes bug
	#516544 (also see gtk bug #515047).


svn path=/trunk/; revision=24894
2008-02-16 17:51:02 +00:00
Michael Natterer d08028320f do the right thing for operations without "input" pad so we can use all
2008-02-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): do the right
	thing for operations without "input" pad so we can use all source
	operations too.

	* app/tools/gimpimagemaptool.[ch]: make
	gimp_image_map_tool_create_map() public for the time being.

	* app/tools/gimpgegltool.c (gimp_gegl_tool_operation_changed):
	recreate the GimpImageMap so we can switch from filter to source
	operations and back.


svn path=/trunk/; revision=24810
2008-02-05 13:54:25 +00:00
Michael Natterer 0b4a8e2ead don't try to add a NULL config to the recent settings menu.
2008-02-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response): don't
	try to add a NULL config to the recent settings menu.


svn path=/trunk/; revision=24801
2008-02-05 02:00:50 +00:00
Michael Natterer eed2d5a2cd use localtime() instead of localtime_r() and don't use %F in strftime().
2008-02-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_add_recent):
	use localtime() instead of localtime_r() and don't use %F in
	strftime(). Fixes bug #513966.


svn path=/trunk/; revision=24785
2008-02-04 11:53:36 +00:00
Michael Natterer 27f1ccd4bd app/core/core-types.h have app/gegl know app/core's namespace.
2008-02-01  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h
	* app/gegl/gegl-types.h: have app/gegl know app/core's namespace.

	* app/gegl/gimpoperationcurves.h: remove temp hack includes.

	* app/gegl/gimpoperationcurves.c: include "core/gimpcurve.h"

	* app/gegl/gimpbrightnesscontrastconfig.[ch]
	* app/gegl/gimpcolorbalanceconfig.[ch]
	* app/gegl/gimpcolorizeconfig.[ch]
	* app/gegl/gimpcurvesconfig.[ch]
	* app/gegl/gimphuesaturationconfig.[ch]
	* app/gegl/gimplevelsconfig.[ch]
	* app/gegl/gimpoperationcurves.[ch]
	* app/gegl/gimpposterizeconfig.[ch]
	* app/gegl/gimpthresholdconfig.[ch]: derive from GimpViewable, install
	properties using the GimpConfig macros, add implementations of
	GimpConfigInterface::equal() and ::copy() where needed.

	* app/tools/gimpimagemaptool.[ch]: add prototype of a menu of
	recently used settings so the same color correction can easily be
	applied to many images.


svn path=/trunk/; revision=24770
2008-02-01 12:45:32 +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 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
Sven Neumann 64880a8107 added new function gimp_use_gegl().
2008-01-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added new function gimp_use_gegl().

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-levels.c
	* app/core/gimpdrawable-invert.c
	* app/tools/gimpimagemaptool.c
	* app/pdb/color_cmds.c
	* tools/pdbgen/pdb/color.pdb: use it instead of accessing the
	GimpCoreConfig struct directly.

svn path=/trunk/; revision=24668
2008-01-22 11:28:48 +00:00
Michael Natterer e824546886 create the operation in GObject::constructor() so it's available during
2008-01-17  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c: create the operation in
	GObject::constructor() so it's available during the entire tool
	life time (needed soon).


svn path=/trunk/; revision=24635
2008-01-17 12:51:39 +00:00
Michael Natterer c7b8f0599c check for image_map_tool->image_map also when the preview is switched on,
2008-01-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
	check for image_map_tool->image_map also when the preview is
	switched on, not only when it's switched off.


svn path=/trunk/; revision=24618
2008-01-15 14:39:41 +00:00
Michael Natterer 0b74e6e1b5 don't call map() if image_map_tool->image_map is NULL.
2008-01-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_preview):
	don't call map() if image_map_tool->image_map is NULL.


svn path=/trunk/; revision=24610
2008-01-15 00:56:33 +00:00
Michael Natterer dac333f72d Simplify things a bit and enable gegl-only color correction tools (without
2008-01-10  Michael Natterer  <mitch@gimp.org>

	Simplify things a bit and enable gegl-only color correction
	tools (without legacy functions).

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	always create the operation if ::get_operation() is implemented
	and always use it when creating the GimpImageMap if there is no
	legacy apply_func.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c (map): set the operation's
	properties unconditionally since it always exists now if we also
	implement ::get_operation().


svn path=/trunk/; revision=24588
2008-01-10 13:12:44 +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 4324d68141 don't call a NULL GimpImageMapToolClass::get_operation().
2008-01-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	don't call a NULL GimpImageMapToolClass::get_operation().


svn path=/trunk/; revision=24553
2008-01-06 15:18:00 +00:00
Michael Natterer 50335ca918 toggle the image map mode only if an image map currently exists. Fixes
2008-01-06  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_gegl_notify):
	toggle the image map mode only if an image map currently exists.
	Fixes crash when toggling "Use GEGL" while the tool is not active.


svn path=/trunk/; revision=24552
2008-01-06 15:10:04 +00:00
Michael Natterer dd97e60591 add "use-gegl" property but don't serialize it.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpcoreconfig.[ch]: add "use-gegl" property but
	don't serialize it.

	* app/widgets/gimptoolbox.c: add super ugly "Use GEGL" toggle to
	the toolbox so we don't need to have prefs open all the time when
	experimenting with gegl.

	* app/tools/gimpimagemaptool.[ch]: remove "Use GEGL" toggle from
	the tool dialogs and connect to the config property instead.

	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-invert.c: made them runtime-switchable by
	looking at the config property.


svn path=/trunk/; revision=24530
2008-01-04 17:28:49 +00:00
Michael Natterer 61a14f1f70 enable disabling gegl again, which i broke with my last commit.
2008-01-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_create_map):
	enable disabling gegl again, which i broke with my last commit.


svn path=/trunk/; revision=24525
2008-01-04 14:43:03 +00:00
Michael Natterer 48358e3452 keep the central processing node around here...
2008-01-03  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: keep the central processing
	node around here...

	* app/tools/gimpbrightnesscontrasttool.[ch]
	* app/tools/gimpthresholdtool.[ch]: ...instead of here.


svn path=/trunk/; revision=24517
2008-01-03 19:36:23 +00:00
Michael Natterer d6ab4d19bd First actual image processing with GEGL! Wheeeee :-)
2007-12-30  Michael Natterer  <mitch@gimp.org>

	First actual image processing with GEGL! Wheeeee :-)

	* app/core/gimpimagemap.[ch]: added code to use gegl instead of the
	old apply_func and apply_data.

	(gimp_image_map_new): add GeglNode parameter that, if passed,
	switches the whole thing to using a gegl graph with this node
	as central processing node.

	* app/tools/gimpimagemaptool.[ch]: add virtual function
	get_operation() which, if implemented, returns a GeglNode to pass
	to gimp_image_map_new(). Added a "Use GEGL" toggle so we can
	switch between legacy and gegl code for the migration period.

	* app/tools/gimpbrightnesscontrasttool.[ch]: implement
	get_operation() and return a brightness-contrast node.

	(gimp_briughtness_contrast_tool_map): set the node's properties
	from the GUI.


svn path=/trunk/; revision=24488
2007-12-30 17:47:37 +00:00
Sven Neumann 5ec574ba37 Reenabled update of the histogram while doing color corrections (bug
2007-10-26  Sven Neumann  <sven@gimp.org>

	Reenabled update of the histogram while doing color corrections
	(bug 490182):

	* app/core/gimpviewable.[ch]: added new methods preview_freeze()
	and preview_thaw().

	* app/core/gimpimagemap.c
	(gimp_image_map_new): freeze the drawable preview.
	(gimp_image_map_dispose): thaw the  drawable preview.
	(gimp_image_map_do): update the drawable, not the image.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response): no
	need to invalidate the drawable preview any longer.

svn path=/trunk/; revision=23956
2007-10-26 14:42:58 +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
Michael Natterer 4625597ab8 update the image, not the drawable so we avoid constantly invalidating the
2007-06-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_clear)
	(gimp_image_map_do): update the image, not the drawable so we
	avoid constantly invalidating the drawable preview.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_response):
	invalidate the drawable preview here.

	* app/paint/gimppaintcore.c (gimp_paint_core_paste)
	(gimp_paint_core_replace): clean up drawable offset handling code.


svn path=/trunk/; revision=22843
2007-06-26 22:41:06 +00:00
Michael Natterer 8c8d3786d9 Removed useless image flushing which caused the image preview to be
2007-06-27  Michael Natterer  <mitch@gimp.org>

	Removed useless image flushing which caused the image preview to
	be updated needlessly:

	* app/core/gimpimagemap.c (gimp_image_map_do): don't flush the
	image when the idle rendering is completed, emit our own "flush"
	signal instead just as for the incremental display updates.

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_notify_preview):
	when switching off the preview don't flush the image, only flush
	projection and display.


svn path=/trunk/; revision=22842
2007-06-26 22:14:35 +00:00
Sven Neumann d2cb639b5e unset the active color picker when the dialog is unmapped. Fixes bug
2007-06-26  Sven Neumann  <sven@gimp.org>

	* app/tools/gimplevelstool.c: unset the active color picker when
	the dialog is unmapped. Fixes bug #451272.

	* app/tools/gimpimagemaptool.c: formatting.

svn path=/trunk/; revision=22838
2007-06-26 16:02:14 +00:00
Michael Natterer e8edf3f408 added new ugly function gimp_dialog_factory_hide_dialog() which does
2007-03-13  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.[ch]: added new ugly function
	gimp_dialog_factory_hide_dialog() which does gtk_widget_hide() and
	sets the stored visibility state to GIMP_DIALOG_VISIBILITY_INVISIBLE
	in order to avoid re-showing dialogs that were already insivible due
	to TAB-toggling when we gtk_widget_hided them.

	* app/tools/gimptransformtool.c
	* app/tools/gimpimagemaptool.c: use the new function instead of
	gtk_widget_hide() to hide tool dialogs. Fixes bug #414006.


svn path=/trunk/; revision=22111
2007-03-13 22:55:07 +00:00
Michael Natterer 974a74004f remove useless includes. Some minor cleanup.
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: remove useless includes. Some minor cleanup.


svn path=/trunk/; revision=22083
2007-03-09 11:10:40 +00:00
Sven Neumann aae05d4eaf app/actions/error-console-commands.c app/actions/gradients-commands.c
2007-02-02  Sven Neumann  <sven@gimp.org>

	* app/actions/error-console-commands.c
	* app/actions/gradients-commands.c
	* app/actions/text-editor-commands.c
	* app/dialogs/vectors-export-dialog.c
	* app/dialogs/vectors-import-dialog.c
	* app/tools/gimpimagemaptool.c 
(gimp_image_map_tool_settings_dialog):
	set default response and do-overwrite-confirmation on the file
	chooser dialogs. Fixes bug #403449 for all core dialogs.


svn path=/trunk/; revision=21832
2007-02-02 07:50:36 +00:00
Sven Neumann 682b7ec50d show a message in the statusbar when settings are saved.
2006-12-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_load_save):
	show a message in the statusbar when settings are saved.
2006-12-26 23:27:28 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer f5afb754a5 Added message severities and make sure all messages are routed through a
2006-10-09  Michael Natterer  <mitch@gimp.org>

	Added message severities and make sure all messages are routed
	through a central function, so redirecting to the error console or
	stderr work again:

	* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
	WARNING, ERROR }.

	* app/core/gimp.[ch] (gimp_message)
	(gimp_message_valist): added severity parameter. Changed
	"GimpProgress *progress" parameter to "GObject *handler", where
	"handler" can be either a GimpProgress, a GtkWidget or NULL.

	* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
	--console-messages again. Always dispatch to the GUI message
	handler first if it exists.

	* app/gui/gui-message.[ch]: pass severity parameters around.

	(gui_message_error_dialog): if "handler" is a progress, dispatch
	the message to it first. If it is a widget (and *not* a progress),
	use a GtkMessageDialog on top of that widget's toplevel. Fall
	back to the usual GimpErrorDialog otherwise.

	* app/core/gimpprogress.[ch] (gimp_progress_message): added
	severity parameter. Also added boolean return value to the virtual
	function so it can decide to fail if it can't handle the message.

	* app/display/gimpdisplay.c: implement GimpProgress::message() and
	redirect the message to GimpDisplayShell.

	* app/display/gimpdisplayshell-progress.c: implement
	GimpProgress::message() and redirect the message to GimpStatusbar
	if it is not an error and if the status bar is visible.

	* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
	but fail on messages that contain a newline. Show the right icons
	for the message severities (work in progress).

	* app/display/gimpdisplayshell.[ch]: removed
	gimp_display_shell_message() and its _valist() variant.

	* app/widgets/gimperrorconsole.[ch]: show the right icons for the
	message severities.

	* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
	return TRUE to swallow all messages.

	* app/widgets/gimpwidgets-utils.[ch]: removed
	gimp_show_message_dialog(). Added gimp_get_message_stock_id().

	* app/errors.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/select-commands.c
	* app/actions/text-editor-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimagefile.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/pdb/gimppdb.c
	* app/plug-in/gimpplugin.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimptool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/palette.pdb: added severity parameter to
	gimp_message() calls. Convert all calls to
	gimp_show_message_dialog() and gimp_display_shell_message() to
	gimp_message(). Also converted some more g_message() calls.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/palette_cmds.c: regenerated.
2006-10-09 08:17:22 +00:00
Michael Natterer 1b1299aff3 added GError** parameter to GimpPaintCore::start().
2006-09-26  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintcore.[ch]: added GError** parameter to
	GimpPaintCore::start().

	* app/tools/gimppainttool.c (button_press): display the error in
	the statusbar.

	* app/paint/gimppaintcore-stroke.c: pass a NULL error, effectively
	swallowing mssages. Will fix that later.

	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpsourcecore.c: changed accordingly. Set the error
	instead of calling g_message().

	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c: implement start() and bail out
	early on indexed drawables instead of showing a g_message() in
	other functions that are called later.

	* app/tools/gimptool.[ch]: added GError** to GimpTool::initialize().

	* app/tools/gimptool.c (gimp_tool_initialize): display the error
	in the statusbar. Keep the external API GError-free.

	* app/tools/gimprectangletool.[ch]: added GError** to
	gimp_rectangle_tool_initialize().

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c: changed accordingly. Set the
	errors in initialize() instead of using gimp_message().

	* app/tools/gimpblendtool.c: implement initialize() and bail out
	early on indexed images instead of showing a gimp_message() in
	button_press().
2006-09-26 20:55:40 +00:00
Michael Natterer 4f415c13e4 don't restore the entire affected area of the drawable here (it can take
2006-09-24  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): don't restore
	the entire affected area of the drawable here (it can take *long*
	on large selections).

	(gimp_image_map_do): do it here instead, as we idle-process the
	chunks. Slightly reduces overall speed but improves responsiveness
	*massively*

	(gimp_image_map_get_color_at): fixed to honor undo tiles offset
	and be readable.

	(gimp_image_map_commit)
	(gimp_image_map_clear)
	(gimp_image_map_clear): don't unref the image_map here. Objects
	don't memory manage themselves.

	Cleaned up the entire file and got rid of all sorts of uglyness.

	* app/tools/gimpimagemaptool.c: unref the image_map here.

	* app/tools/gimpcurvestool.c (curves_graph_events): update the
	preview on button_press when we are dragging a free curve.
2006-09-24 10:29:21 +00:00
Michael Natterer 6c7f0c6830 added gimp_tool_get_options() so tools don't need to incude
2006-09-05  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added gimp_tool_get_options() so tools
	don't need to incude "core/gimptoolinfo.h" just to get to
	their options.

	* app/tools/gimp*tool.h: added macros GIMP_FOO_TOOL_GET_OPTIONS()
	which return specific tool options types and do all casting
	themselves.

	* app/tools/*.c: use the new macros and don't include
	"core/gimptoolinfo.h" in most files.

	* app/tools/gimpcolorpickertool.c (gimp_color_picker_tool_register):
	make it use the parent context's FG and BG.

	* app/tools/gimpcolortool.c (gimp_color_tool_real_picked): set the
	color on the tool's options, not on the user context.
2006-09-05 18:25:31 +00:00