Commit Graph

83 Commits

Author SHA1 Message Date
Michael Natterer d57ab7faf2 libgimpwidgets: move all GimpSizeEntry members to private 2018-05-25 19:15:00 +02:00
Simon Budig 72e63887ba libgimpwidgets: convert GimpSizeEntry to a GtkGrid. 2018-05-20 21:06:32 +02:00
Michael Natterer 05e5a1d1cd libgimpwidgets: get rid of (GtkObject **) casts 2018-05-20 21:06:26 +02:00
Ell 9fee677b5c libgimpwidgets: use default unit for eevl ratio quantity in size boxes
Pass the ratio quantity to be used for eevl ratio expressions in
terms of the default unit of the size box, instead of as a
dimensionless value.
2017-10-05 08:54:10 -04:00
Ell f2a80a093a libgimpwidgets: enable ratio expressions for size entries with two fields
When a size entry has exactly two fields, enable ratio expressions
in eevl.  Set the reference value to the value of the field that is
not currently being evaluated, and invert the ratio when evaluating
the second field.
2017-10-04 14:25:01 -04:00
Ell 7362d47922 libgimpwidgets: use struct, not parameters, to pass eevl options
Pass the evaluation options to gimp_eevl_evaluate() using a single
parameter of type GimpEevlOptions, instead of using individual
parameters for each option.  Add a GIMP_EEVL_OPTIONS_INIT macro,
used to initialize a GimpEevlOptions struct to the default set of
options.  This would allow us to add evaluation options more
easily.
2017-10-04 14:25:01 -04:00
Jehan 28d3897086 libgimpwidgets: fix typo s/shold/should/. 2017-06-27 21:31:10 +02:00
Michael Natterer 4df9a1d568 Get rid of gtk_misc_set_alignment(label) and use gtk_label_set_x,yalign() 2016-09-08 19:11:20 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer b78d9c9f35 libgimpwidgets: forgot two gimp_spin_button_new() 2014-06-22 00:00:46 +02:00
Michael Natterer 5fd46384a5 libgimpwidgets: include <gegl.h> in all files that include gimpcolordisplay.h 2013-11-01 22:32:31 +01:00
Michael Natterer d1503ead83 Bug 694477 - GimpSizeEntry input validation doesn't snap to min/max values
gimp_size_entry_eevl_input_callback(): CLAMP() the input value before
passing it back to GtkSpinButton, or it will revert too large/small
inputs back to the old value, instead of using the field's max/min
values.
2013-02-22 21:22:03 +01:00
Michael Natterer 4a4994f4db libgimpwidgets: bring back unit format strings in GimpSizeEntry
Use the user-provided format string as long-format and try to create a
short-format by replacing "%s" and "%p" by "%a" for the popup. Works
nicely for all cases I've seen so far.
2010-11-05 16:30:23 +01:00
Michael Natterer 9e28a0406b libgimpwidgets: use accessors for GtkAdjustment members
so it builds with GSEAL_ENABLE. Also keep around the adjustments as
GtkAdjustment not GtkObject to avoid casting all the time.
2010-10-19 18:38:00 +02:00
Michael Natterer b25ac7b68d libgimpwidgets: add "percent" support to GimpUnitStore
and enable "menu_show_percent" again in GimpSizeEntry.
2010-10-15 01:27:02 +02:00
Michael Natterer e5faf090ca libgimpwidgets: add gimp_unit_store_set,get_has_pixels()
to allow having unit combos without "pixels". Adapt GimpUnitComboBox
to not assume that the unit is equal to the index in the store and
enable "menu_has_pixels" in GimpSizeEntry again.
2010-10-15 00:15:48 +02:00
Michael Natterer c36f762f7d libgimpwidgets: deprecate GimpUnitMenu and gimp_prop_unit_menu_new()
Add gimp_prop_unit_combo_box_new() and adapt all places using the
prop_unit_menu. Some things are broken now, like there are no pixel
digits set, resolution unit menus show "pixels" and warn badly when
pixels is selected, and file-pdf-load is not built right now.
More fixes to come...
2010-10-14 23:03:34 +02:00
Michael Natterer b3ee51794d libgimpwidgets: fix most gtk-doc warnings 2010-07-05 19:04:15 +02:00
Michael Natterer 1f7ff98c45 libgimpwidgets: move docs from template files to inline comments
but leave the template file for gimpstock there because its contents
would be too much for gimpstock.h.
2010-07-05 18:01:28 +02:00
Michael Natterer fcd346a227 Build with GSEAL_ENABLE with a few exceptions
Use the new accessors in GTK+ 2.18 and #undef GSEAL_ENABLE where
accessors are missing or where I'm not quite sure how to fix the
stuff yet.
2009-10-17 18:51:48 +02:00
Michael Natterer ee48b7b06e Use accessors instead of table->children and adjustment->value 2009-10-17 18:49:12 +02:00
Martin Nordholts eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02:00
Fredrik Alströmer bcee243fa3 Bug 76616 – Size entry widgets could use some simple math
Add a simple parser to the GimpSizeEntry widget so that one can write
things such as "40in" and "50%" in a size entry widget and get that
converted to the current unit.

The parser also handles basic expresions such as "20cm + 20px" and
"2 * 3.14in".
2009-05-17 13:47:37 +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 16ec38275c libgimpwidgets/gimpsizeentry.c allocate structs using GSlice.
2007-05-22  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpquerybox.c: allocate structs using GSlice.

svn path=/trunk/; revision=22562
2007-05-22 11:49:24 +00:00
Sven Neumann 24f6ad1b51 comment.
2006-12-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.c: comment.
2006-12-28 11:30:24 +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
Sven Neumann f2df31a50e converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 10:53:28 +00:00
Michael Natterer 33ae55f873 libgimp/*.c libgimpconfig/*.c libgimpmodule/*.c libgimpthumb/*.c port to
2005-12-20  Michael Natterer  <mitch@gimp.org>

	* libgimp/*.c
	* libgimpconfig/*.c
	* libgimpmodule/*.c
	* libgimpthumb/*.c
	* libgimpwidgets/*.c: port to G_DEFINE_TYPE() and friends. Some
	related cleanup.
2005-12-20 20:35:23 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
Manish Singh 76c85d918a #include gimpwidgets.h for gimp_spin_button_new().
2005-04-18  Manish Singh  <yosh@gimp.org>

        * libgimpwidgets/gimpsizeentry.c: #include gimpwidgets.h for
        gimp_spin_button_new().

        * plug-ins/jpeg/jpeg-load.c
        * plug-ins/jpeg/jpeg-save.c
        * plug-ins/metadata/interface.c
        * plug-ins/metadata/xmp-parse.c: 64-bit safety for some of the
        debugging g_prints.
2005-04-18 23:38:25 +00:00
Sven Neumann b73e908ca5 use gimp_spin_button_new() which calls gtk_spin_button_set_numeric() for
2005-04-17  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.c: use gimp_spin_button_new() which
	calls gtk_spin_button_set_numeric() for us. Part of a fix for bug
	#300935.

	* libgimpwidgets/gimpwidgets.c: improved the API docs for
	gimp_spin_button_new().

	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimplevelstool.c
	* plug-ins/common/screenshot.c
	* plug-ins/ifscompose/ifscompose.c
	* plug-ins/rcm/rcm_dialog.c
	* plug-ins/script-fu/script-fu-interface.c
	* plug-ins/winsnap/winsnap.c: use gimp_spin_button_new().
2005-04-17 15:28:28 +00:00
Sven Neumann bd1dba3a61 added "Since: GIMP 2.4" to the docs.
2005-03-10  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.c (gimp_size_entry_show_unit_menu):
	added "Since: GIMP 2.4" to the docs.

	* libgimpwidgets/gimpwidgets.def: added the new symbol.
2005-03-09 23:47:39 +00:00
William Skaggs ed9bc27163 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimpsizeentry.[ch]: added function
	gimp_size_entry_show_unit_menu() for convenience.

	* app/tools/gimprectangleoptions.[ch]
	* app/tools/gimprectangletool.[ch]:  more work on
	controls in Tool Options.  Can now resize rectangle
	by dragging any corner or edge -- move rectangle by
	clicking inside and dragging.
2005-03-09 22:22:38 +00:00
Sven Neumann 381e762ee6 libgimpwidgets/gimpsizeentry.[ch] added new function
2005-02-09  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.[ch]
	* libgimpwidgets/gimpwidgets.def: added new function
	gimp_size_entry_set_activates_default().

	* app/dialogs/image-new-dialog.c: set the initial focus on the
	Width entry and set the activates_default flag for the size entry.
	Fixes bug #165748.
2005-02-09 16:57:18 +00:00
Sven Neumann b298b90cc7 return the created label widget so that it can for example be put into a
2004-05-18  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.[ch] (gimp_size_entry_attach_label):
	return the created label widget so that it can for example be put
	into a GtkSizeGroup.

	* plug-ins/libgimpoldpreview/gimpoldpreview.[ch]: removed the
	optional "Preview" frame. Always put the preview into a sunken
	frame.

	* plug-ins/common/AlienMap2.c
	* plug-ins/common/blinds.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/glasstile.c
	* plug-ins/common/grid.c
	* plug-ins/common/illusion.c
	* plug-ins/common/jigsaw.c
	* plug-ins/common/max_rgb.c
	* plug-ins/common/nlfilt.c
	* plug-ins/common/noisify.c
	* plug-ins/common/nova.c
	* plug-ins/common/plasma.c
	* plug-ins/common/polar.c
	* plug-ins/common/waves.c
	* plug-ins/common/wind.c: changed accordingly, HIG-ified.
2004-05-18 17:06:06 +00:00
Marc Lehmann d9aa5e9971 *** empty log message *** 2004-02-16 07:16:41 +00:00
Michael Natterer 5221d4daa6 libgimpbase/Makefile.am libgimpbase/gimpbase-private.[ch] new files
2003-11-15  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbase-private.[ch]
	* libgimpbase/gimpunit.c: new files implementing GimpUnitVTable
	(formerly known as GimpWidgetsVTable). Now the unit functions
	finally live in the same library as their header declarations.

	* libgimpbase/gimpunit.h: removed comment about being a header for
	two different files.

	* libgimpwidgets/gimpwidgets-private.[ch]: removed
	GimpWidgetsVTable.

	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpunitmenu.c
	* libgimpwidgets/gimpwidgets.c: use normal gimp_unit functions
	again.

	* libgimp/gimpui.c
	* app/gui/gui.c: removed GimpWidgetVTable stuff.

	* libgimp/Makefile.am
	* libgimp/gimpunitcache.[ch]: new files.

	* libgimp/gimpunit.c: removed (moved to gimpunitcache.c).

	* libgimp/gimp.c (gimp_main): initialize GimpUnitVTable using the
	gimp_unit_cache functions.

	* app/Makefile.am
	* app/units.[ch]: new files implementing GimpUnitVTable.

	* app/libgimp_glue.[ch]: removed.

	* app/app_procs.[ch]: made "the_gimp" a static variable. Call
	units_init().

	* app/main.c: changed accordingly.
2003-11-15 22:53:28 +00:00
Michael Natterer cbc503c1fb moved all signal emissions to their resp update() functions (e.g.
2003-10-30  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpsizeentry.c: moved all signal emissions to
	their resp update() functions (e.g. "value_changed" is emitted
	from gimp_size_entry_value_update() now). Should fix all bugs ;)
	for the cost of a few extra signal emissions. We definitely
	emitted too few signals before so it's at least less broken.
	Removed "gboolean value_boundaries" stuff because this fix should
	always update the reference values correctly now.
2003-10-30 20:58:37 +00:00
Sven Neumann 1d370ebe1b setup size entries in the order suggested by the GimpSizeEntry
2003-10-23  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimppropwidgets.c: setup size entries in the order
	suggested by the GimpSizeEntry documentation.

	* libgimpwidgets/gimpsizeentry.c: added an internal flag so the
	size entry knows if the boundaries are set on the value or on the
	reference value.  Needed to make gimp_size_entry_update_unit() do
	the right thing.
2003-10-23 17:35:18 +00:00
Sven Neumann d86e56e4d7 added new function gimp_size_entry_get_help_widget() to make it possible
2003-10-15  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.[ch]: added new function
	gimp_size_entry_get_help_widget() to make it possible to set
	tooltips on a GimpSizeEntry.
2003-10-15 11:57:36 +00:00
Sven Neumann 6552547760 emit "value_changed" again.
2003-10-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpsizeentry.c (gimp_size_entry_update_unit):
	emit "value_changed" again.
2003-10-01 00:05:18 +00:00
Sven Neumann 2f855afa6a added an API to allow for sub-pixel sizes in spinbuttons connected to a
2003-10-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpunitmenu.[ch]:
	* libgimpwidgets/gimpwidgets.c: added an API to allow for
	sub-pixel sizes in spinbuttons connected to a GimpUnitMenu.
	Make GimpUnitMenu emit "unit-changed" when the unit is changed
	programmatically.

	* libgimpwidgets/gimpsizeentry.[ch}: added a similar API here.
	Make GimpSizeEntry emit "unit-changed" when the unit is changed
	programmatically. The other signals will need similar changes.

	* plug-ins/common/gauss_rle.c
	* plug-ins/common/gauss_iir.c
	* app/widgets/gimpstrokeeditor.c: use the new API.
2003-09-30 23:19:48 +00:00
Sven Neumann 62dffea661 libgimpwidgets/Makefile.am new files. Moved gimp_widgets_init() here and
2003-05-23  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets-private.[ch]: new files. Moved
	gimp_widgets_init() here and added a vtable parameter. The vtable
	has entries for all the symbols that are either provided by libgimp
	or gimp itself depending on who is using the library.

	* libgimpwidgets/libgimp-glue.c: removed this file that uses to
	provide a Win32 only hack that is now not needed any longer.

	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpunitmenu.c
	* libgimpwidgets/gimpwidgets.[ch]: don't call the offending
	functions directly, but use the vtable entries. This is ugly but
	the ugliness is restricted to our code. There are plans to clean
	this up further... (Fixes #113410 once more.)

	* app/gui/gui.c (gui_libs_init)
	* libgimp/gimpui.c (gimp_ui_init): initialize libgimpwidgets with
	the proper vtable.
2003-05-23 18:27:05 +00:00
Sven Neumann d26c1ce51b libgimp/gimpui.c libgimp/gimpunit.c libgimpbase/gimpenv.c
2003-02-06  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpui.c
	* libgimp/gimpunit.c
	* libgimpbase/gimpenv.c
	* libgimpmodule/gimpmodule.c
	* libgimpmodule/gimpmoduledb.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimpfileselection.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpquerybox.c
	* libgimpwidgets/gimpsizeentry.c
	* libgimpwidgets/gimpunitmenu.c
	* libgimpwidgets/gimpwidgets.c: documentation fixes / improvements.
2003-02-06 21:17:12 +00:00
Manish Singh 1a44f2126c cleanup, removed unecessary G_OBJECT() casts. Should do the same for
2003-01-05  Manish Singh  <yosh@gimp.org>

        * many files in app, modules and libgimp*: cleanup, removed unecessary
        G_OBJECT() casts. Should do the same for plug-ins, when more of them
        get undeprecated.
2003-01-05 22:07:10 +00:00
Michael Natterer 424ed1f480 changed "Number of Colors" to "Max Number of Colors" to clarify what this
2002-09-06  Michael Natterer  <mitch@gimp.org>

	* app/gui/convert-dialog.c: changed "Number of Colors" to
	"Max Number of Colors" to clarify what this parameter does.
	(fixes #92194).

	* app/gui/menus.c: use GIMP_STOCK_INFO for "View/Info Window".

	Specify spibutton sizes in chars, not pixels (eek) all over
	the place. Also removed explicit sizes where the GtkSpinButton
	default size does not disturbe tabular widget layouts.

	* libgimpwidgets/gimpwidgets.c: removed the hardcoded width of 75
	pixels in gimp_spin_button_new(). Changed gimp_scale_entry_new()
	and gimp_coordinates_new() to interpret their "spinbutton_width"
	parameters as chars if < 16, and as pixels otherwise. This gives
	reasonable results and doesn't cause unchanged plug-ins to
	suddenly have spinbuttons of dozens of chars width :)

	* libgimpwidgets/gimpsizeentry.c: added the same heuristic here.

	* libgimpwidgets/gimpquerybox.c
	* app/gui/color-notebook.c
	* app/gui/convert-dialog.c
	* app/tools/gimpairbrushtool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpinktool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/paint_options.c
	* app/tools/selection_options.c
	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimpbrushfactoryview.c
	* app/widgets/gimppaletteeditor.c: changed accordingly.

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/FractalExplorer/FractalExplorer.c
	* plug-ins/Lighting/lighting_ui.c
	* plug-ins/common/AlienMap.c
	* plug-ins/common/AlienMap2.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/bumpmap.c
	* plug-ins/common/checkerboard.c
	* plug-ins/common/cubism.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/depthmerge.c
	* plug-ins/common/despeckle.c
	* plug-ins/common/diffraction.c
	* plug-ins/common/emboss.c
	* plug-ins/common/film.c
	* plug-ins/common/flarefx.c
	* plug-ins/common/fractaltrace.c
	* plug-ins/common/gauss_iir.c
	* plug-ins/common/gauss_rle.c
	* plug-ins/common/glasstile.c
	* plug-ins/common/grid.c
	* plug-ins/common/illusion.c
	* plug-ins/common/iwarp.c
	* plug-ins/common/jigsaw.c
	* plug-ins/common/lic.c
	* plug-ins/common/max_rgb.c
	* plug-ins/common/mblur.c
	* plug-ins/common/newsprint.c
	* plug-ins/common/nova.c
	* plug-ins/common/pixelize.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/common/scatter_hsv.c
	* plug-ins/common/shift.c
	* plug-ins/common/sinus.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/spread.c
	* plug-ins/common/tile.c
	* plug-ins/common/tileit.c
	* plug-ins/common/unsharp.c
	* plug-ins/common/vpropagate.c
	* plug-ins/common/waves.c
	* plug-ins/common/whirlpinch.c
	* plug-ins/gflare/gflare.c
	* plug-ins/mosaic/mosaic.c
	* plug-ins/rcm/rcm_dialog.c: changed accordingly, which involves
	removals of gtk_widget_set_size_request(spinbutton), removal of
	lots of explicit spinbutton sizes in gimp_scale_entry_new(), and
	adding of new ones because GtkSpinButton's auto-size trashed
	tabular layouts.

	Lots of cleanup & indentation while browsing the plug-ins'
	code. Changed spacings, moved toggle buttons into frame titles,
	use stock items, stuff...
2002-09-06 20:44:47 +00:00
Michael Natterer 74195d1f3f set the spinbutton which is attached right of the label as mnemonic_widget
2002-05-27  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpsizeentry.c (gimp_size_entry_attach_label):
	set the spinbutton which is attached right of the label as
	mnemonic_widget for the label.
2002-05-27 16:56:28 +00:00
Maurits Rijk 3c5cefc8e9 More enabling of mnemonics. 2002-05-25 18:10:04 +00:00