Commit Graph

36 Commits

Author SHA1 Message Date
Jehan 7056f1b960 app, libgimpwidgets: move gimp_prop_spin_scale_new() and…
… gimp_prop_widget_set_factor() to libgimpwidgets.

Now that GimpSpinScale is in libgimpwidgets, it's time to move the
associated prop too, to make it a prop widget with such a widget easily
creatable by plug-ins.

While doing so, I update both these functions logic, binding properties
together with the g_object_bind_property*() APIs (as we do already in
some other recent prop functions) rather than connecting to signals
ourselves. It makes for much simpler code.
2022-02-19 00:14:44 +01:00
Jehan 578c078590 app: GimpFilterTool displays a "Sample merged" checkbox.
In several GeglOperation filters, it is possible to pick a color. Up to
now, it was only possible to pick a color from the active layer (the one
you run the operation on). With this change, we can also pick in Sample
merged mode, same as Color Picker tool and other color tools.
2020-09-26 12:40:54 +02:00
Jehan 578e3b0bd9 Issue #5630: Sample Merged as defaults in Color Picker tool.
The rational: advanced users won't really care about defaults (they know
to switch this option on/off depending on situation) but maybe beginners
would be less confused to pick "what they see" on first use, rather than
picking on the active layer? Now whatever is the default won't change
anyone's daily usage of GIMP. Clearly every image and use case is
different, so both with or without sample merged are useful one time or
another (this is why the option exists). It's really about the less
surprising option for beginners, based on usage statistics.

I ran a small poll on Twitter/Reddit/Patreon/Tipeee and ended up with
numbers of 131 for switching to "Sample merged" as default and 43
against, which is about 75% in favor. So let's just switch. It makes
sense anyway.
2020-09-25 21:44:27 +02:00
Michael Natterer 9593121431 app, libgimpwidgets: return visible widgets from all gimp_prop_foo_new()
and remove a gazillion gtk_widget_show() all over the place, some
places need a gtk_widget_hide() now, and I'm pretty sure I broke at
least one thing in all those files...
2019-09-25 20:24:06 +02:00
Michael Natterer 63695b4b21 libgimbase: merge gimpparam.h into gimpparamspecs.h
which means that it's now included normally via gimpbase.h
and not any longer via gimpbasetypes.h which we only did out
of lazyness. A *lot* of files in libgimp* and app/ now need to
2019-07-31 10:16:21 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Jehan 8111ad62da Bug 776417 - improve Sample Average and Sample Merged description.
The "accumulated" (color value) adjective does not look like the best
word in both descriptions. Respectively, the first is an averaged
value whereas the second would be a "merged" or "composited" value.
If native speakers have comments or better propositions, they are
welcome to speak up.
2017-01-03 04:21:42 +01:00
Jehan c2665a2e43 app: tooltip of Color Picker's "Sample average" option mixed up.
This should be "Sample merge"'s tooltip.
2017-01-01 19:22:29 +01:00
Michael Natterer 619a885696 Bug 775391 - Collapse "Radius" widget when "Sample average" is unchecked
Use gimp_prop_expanding_frame_new() for the widgets.
2016-12-07 12:51:48 +01:00
Michael Natterer 13b1e6aafc app: clean up a lot of werid code in GimpColorOptions and GimpFilterOptions
First of all, derive GimpFilterOptions from GimpColorOptions, not the
other way around, which was a sick way of magically showing the right
options for various tools. That approach has failed and needed
additional hacks to do the right thing. Simply have the right class
hierarchy and call the right tool options GUI constructors and done.

Remove gimp_histogram_options_gui(), we don't need histogram scale
controls in tool options when we already have them next to the
histograms in the tool dialogs.

Also remove gimp_histogram_options_connect_view() and use a simple
g_object_bind_property() instead.
2016-05-13 22:06:14 +02:00
Michael Natterer 6a9ce551cb app: rename GimpImageMapTool to GimpFilterTool 2016-05-10 13:52:24 +02:00
Michael Natterer e5b6806fe2 app: port tons of files to the new GIMP_CONFIG_PROP_FOO() macros
and remove lots of labels from calls to gimp_prop_foo_new(). Also
had to manually remove some unwanted labels that are now added
automatically, fixes bug #761880.
2016-02-11 23:46:24 +01:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 3184c0f339 app: use g_object_bind_property() to set sensitivity here too 2011-05-11 11:43:19 +02:00
Michael Natterer 0a98d16814 app: use spin scales for all trivial cases in tool options 2010-11-01 21:48:59 +01:00
Stephen Griffiths 2ff4bbd111 make action_message() visible externally and use it.
* app/actions/actions.h: added prototype for action_message()
* app/actions/actions.c: removed static keyword from action_message()
removed private prototype for action_message()
made action_message() use icons for objects derived from GimpViewable

* app/actions/context-commands.c:
context_brush_radius_cmd_callback()
context_brush_angle_cmd_callback()
context_paint_mode_cmd_callback()
context_brush_shape_cmd_callback()
call acton_message(), these callbacks had use cases where they could not
use generic code

* app/tools/gimpcoloroptions.c: added "average-radius" blurb
and mark for translarion
2009-05-16 15:34:41 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

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

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

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


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 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
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Michael Natterer e1ceed5147 define GIMP_PARAM_STATIC_STRINGS which is G_PARAM_STATIC_NAME|NICK|BLURB.
2006-01-18  Michael Natterer  <mitch@gimp.org>

	* app/config/config-types.c: define GIMP_PARAM_STATIC_STRINGS
	which is G_PARAM_STATIC_NAME|NICK|BLURB. Also define
	GIMP_PARAM_READABLE, _WRITABLE and _READWRITE which include
	GIMP_PARAM_STATIC_STRINGS.

	* app/*/*.c: use them for all object properties so their
	strings are not copied.
2006-01-18 20:29:40 +00:00
Michael Natterer 8b8c784a5b port to G_DEFINE_TYPE() and friends. Some related cleanup.
2005-12-13  Michael Natterer  <mitch@gimp.org>

	* app/tools/*.c: port to G_DEFINE_TYPE() and friends. Some related
	cleanup.
2005-12-13 09:13:50 +00:00
Sven Neumann 976f0598c5 increased maximum radius for color picking to 300 pixels and made the
2005-02-12  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcoloroptions.c: increased maximum radius for color
	picking to 300 pixels and made the slider logarithmic.
2005-02-12 21:06:05 +00:00
William Skaggs a395b02f6f Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimppropwidgets.[ch]: magic-copied from app/widgets
	and un-movable things then removed.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.def
	* libgimpwidgets/gimpwidgets.h: corresponding changes

	* app/widgets/gimppropwidgets.[ch]: remove functions that were
	moved.

	* app/dialogs/stroke-dialog.c
	* app/dialogs/tips-dialog.c
	* app/dialogs/user-install-dialog.c
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcoloroptions.c
	* app/tools/gimpcolorpickeroptions.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcropoptions.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpflipoptions.c
	* app/tools/gimphistogramoptions.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpinkoptions-gui.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmagnifyoptions.c
	* app/tools/gimpmeasureoptions.c
	* app/tools/gimpmoveoptions.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformoptions.c
	* app/tools/gimpvectoroptions.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpgrideditor.c
	* app/widgets/gimphistogrambox.c
	* app/widgets/gimphistogrameditor.c
	* app/widgets/gimpsizebox.c
	* app/widgets/gimpstrokeeditor.c
	* app/widgets/gimptemplateeditor.c
	* app/widgets/gimptooloptionseditor.c: fix includes.
2005-02-04 20:47:42 +00:00
William Skaggs 1cee9b7298 continuing commit after broken pipe 2005-01-25 19:11:26 +00:00
Michael Natterer 27c2be7cea libgimpwidgets/gimpwidgets.c app/widgets/gimpenumwidgets.[ch]
2004-10-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpwidgets.c
	* app/widgets/gimpenumwidgets.[ch]
	* app/widgets/gimppropwidgets.c
	* app/actions/layers-commands.c
	* app/dialogs/convert-dialog.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcoloroptions.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpinkoptions-gui.c
	* app/tools/gimplevelstool.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptransformoptions.c: the child of a GimpFrame must
	not have any border width. Fixes many subtle misalignments.
2004-10-14 15:44:13 +00:00
Michael Natterer ff68106bf1 app/paint/gimpairbrushoptions.c app/paint/gimpcloneoptions.c
2004-09-24  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpairbrushoptions.c
	* app/paint/gimpcloneoptions.c
	* app/paint/gimpconvolveoptions.c
	* app/paint/gimpdodgeburnoptions.c
	* app/paint/gimperaseroptions.c
	* app/paint/gimpinkoptions.c
	* app/paint/gimppaintoptions.c
	* app/paint/gimppenciloptions.c
	* app/paint/gimpsmudgeoptions.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpcoloroptions.c
	* app/tools/gimpcolorpickeroptions.c
	* app/tools/gimpcropoptions.c
	* app/tools/gimpflipoptions.c
	* app/tools/gimphistogramoptions.c
	* app/tools/gimpimagemapoptions.c
	* app/tools/gimpmagnifyoptions.c
	* app/tools/gimpmeasureoptions.c
	* app/tools/gimpmoveoptions.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptextoptions.c
	* app/tools/gimptransformoptions.c
	* app/tools/gimpvectoroptions.c: code cleanup: untabified and
	trailing whitespace removal, removed empty instance_init()
	funcions, cleaned up variable declarations/initializations.
2004-09-24 12:01:35 +00:00
William Skaggs b4197cf30e Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/tools/*.c: HIGify capitalization for dialogs.  More
	progress on bug #123699.
2004-06-23 20:29:46 +00:00
Sven Neumann 6fd0eeac65 app/tools/gimpblendoptions.c app/tools/gimpbucketfilloptions.c
2004-05-04  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpcoloroptions.c
	* app/tools/gimpinkoptions.c
	* app/tools/gimppaintoptions-gui.c
	* app/tools/gimpselectionoptions.c
	* app/tools/gimptooloptions-gui.c
	* app/tools/gimptransformoptions.c: use GimpFrames where GtkFrame
	was used. Put "Pressure Sensitivity" frame into a GtkExpander.
2004-05-04 21:11:06 +00:00
Sven Neumann 5077aa4c85 Let all GimpImageMap tools remember the state of the preview toggle (bug
2004-02-22  Sven Neumann  <sven@gimp.org>

	Let all GimpImageMap tools remember the state of the preview toggle
	(bug #135059):

	* app/tools/Makefile.am
	* app/tools/gimpimagemapoptions.[ch]
	* app/tools/tools-types.h: added new GimpToolOptions class to hold
	the preview setting.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcoloroptions.[ch]
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool.[ch]
	* app/tools/gimpposterizetool.c
	* app/tools/tools-types.h: use the new class.
2004-02-22 14:28:53 +00:00
Michael Natterer 2d8df2555f app/tools/gimpblendoptions.c (gimp_blend_options_gui)
2003-12-12  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpblendoptions.c (gimp_blend_options_gui)
	* app/tools/gimpcoloroptions.c (gimp_color_options_gui)
	* app/tools/gimpinkoptions.c (gimp_ink_options_gui): removed calls
	to gtk_frame_set_shadow_type (frame, GTK_SHADOW_ETCHED_IN) because
	that's the default anyway.
2003-12-12 11:41:08 +00:00
Sven Neumann 6c44628a4b app/tools/Makefile.am new tool options class GimpHistogramOptions, derived
2003-10-24  Sven Neumann  <sven@gimp.org>

	* app/tools/Makefile.am
	* app/tools/gimphistogramoptions.[ch]: new tool options class
	GimpHistogramOptions, derived from GimpColorOptions.

	* app/tools/gimpcoloroptions.c (gimp_color_options_gui): add
	gimp_histogram_options_gui() when called with GimpHistogramOptions.
	This a bit weird since the class hierarchy is the other way around
	but it makes things easier.

	* app/tools/gimphistogramtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpthresholdtool.c: use GimpHistogramOptions and
	connect the histogram views to the "histogram-scale" property.
	Perhaps not perfect GUI-wise but it let's you choose the histogram
	scale and stores this setting per tool. Fixes bug #125306.

	* app/widgets/gimphistogramview.c: prefixed property names with
	"histogram-" so they match the GimpHistogramOptions property.

	* app/widgets/gimphistogrambox.c: minor cleanup.
2003-10-24 08:12:21 +00:00
Sven Neumann 1758feb8f4 changed the default value for "sample_average" to TRUE (for Levels and
2003-10-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcoloroptions.c: changed the default value for
	"sample_average" to TRUE (for Levels and Curves tools).

	* app/tools/gimpcolorpickeroptions.c: override the default value
	for "sample_average" and set it back to FALSE (for Color Picker).
2003-10-21 12:45:58 +00:00
Michael Natterer 8dd2e80792 Getting rid of some legacy filenames:
2003-06-29  Michael Natterer  <mitch@gimp.org>

	Getting rid of some legacy filenames:

	* app/core/Makefile.am
	* app/core/gimptooloptions.[ch]: new files.

	* app/paint/gimppaintoptions.h: changed #include accordingly.
	#define GIMP_PAINT_OPTIONS_CONTEXT_MASK here.

	* app/tools/paint_options.[ch]
	* app/tools/tool_options.[ch]: removed these files.

	* app/tools/gimppaintoptions-gui.[ch]
	* app/tools/gimptooloptions-gui.[ch]: new files.

	* app/tools/gimppainttool.h: removed GIMP_PAINT_TOOL_OPTIONS_MASK
	define again.

	* app/tools/Makefile.am
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendoptions.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcoloroptions.[ch]
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcropoptions.[ch]
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpflipoptions.[ch]
	* app/tools/gimpinkoptions.c
	* app/tools/gimpmagnifyoptions.[ch]
	* app/tools/gimpmeasureoptions.[ch]
	* app/tools/gimpmoveoptions.[ch]
	* app/tools/gimppaintbrushtool.c
	* app/tools/gimppenciltool.c
	* app/tools/gimpselectionoptions.[ch]
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptextoptions.[ch]
	* app/tools/gimptransformoptions.[ch]
	* app/tools/tool_manager.c
	* app/gui/tool-options-dialog.c: changed accordingly.

	* app/tools/tools.c: moved the vector tool before iscissors.
2003-06-29 20:40:45 +00:00
Sven Neumann b1c437b4f8 use OPAQUE_OPACITY instead of 255.
2003-06-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_get_color_at):
	* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at):
	use OPAQUE_OPACITY instead of 255.

	* app/core/gimpimage-pick-color.[ch]: factored out code that
	averages over colors so it can be used from GimpImageTool.

	* app/tools/gimpimagemaptool.[ch]: derived from GimpColorTool and
	added a GimpColorTool::pick implementation.

	* app/tools/gimpcoloroptions.c
	* app/tools/gimpcolorpickeroptions.c: add the toggle for
	"sample_merged" in gimp_color_picker_options_gui().

	* app/tools/gimpcolortool.c (gimp_color_tool_cursor_update): check
	if the cursor is over the active drawable or if "sample_merged" is
	active.

	* app/tools/gimplevelstool.c: simplified since all color-picking is
	now handled by the parent classes. Fixes bug #112668.
2003-06-05 18:47:23 +00:00
Sven Neumann 21b4aba939 changed the default radius.
2003-06-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpcoloroptions.c: changed the default radius.

	* app/tools/gimpcolortool.[ch]: pass GimpColorOptions to
	gimp_color_tool_enable(). Added gimp_color_tool_disable() and
	gimp_color_tool_is_enabled().

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

	* app/tools/gimppainttool.[ch]: derived GimpPaintTool from
	GimpColorTool and removed most color picking code.

	* app/tools/gimpdodgeburntool.c (gimp_dodgeburn_tool_modifier_key)
	* app/tools/gimperasertool.c (gimp_eraser_tool_modifier_key):
	chain up to the parent class.

	* app/tools/gimppaintbrushtool.c: purely cosmetic change.
2003-06-05 15:43:49 +00:00
Sven Neumann 737bf44e28 app/tools/Makefile.am app/tools/gimpcoloroptions.[ch] new files that
2003-06-04  Sven Neumann  <sven@gimp.org>

        * app/tools/Makefile.am
        * app/tools/gimpcoloroptions.[ch]
        * app/tools/gimpcolortool.[ch]: new files that implement base
        classes moved out of GimpColorPickerOptions and GimpColorPickerTool.

        * app/tools/gimpcolorpickeroptions.[ch]
        * app/tools/gimpcolorpickertool.[ch]: derive from the new obejcts.

        * app/tools/gimpimagemaptool.h
        * app/tools/gimppainttool.c
        * app/tools/tools-types.h: moved typedefs into the types file.
2003-06-04 15:48:17 +00:00