Commit Graph

42 Commits

Author SHA1 Message Date
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 3795f9b9c5 libgimpwidgets/gimpchainbutton.c libgimpwidgets/gimpcolorarea.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpmemsizeentry.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpruler.c
	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpwidgets.c: use accessors for various members
	of GTK+ structures that don't exist any longer when GSEAL_ENABLE
	is defined.


svn path=/trunk/; revision=28190
2009-03-22 15:42:42 +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
Michael Natterer b700d22606 remove g_return_val_if_fail(), this is not a public function.
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_expose):
	remove g_return_val_if_fail(), this is not a public function.


svn path=/trunk/; revision=26816
2008-08-29 15:55:07 +00:00
Michael Natterer 58cfcd4f57 libgimp/gimpgradientselectbutton.c libgimp/gimpmenu.c
2008-06-28  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimpgradientselectbutton.c
	* libgimp/gimpmenu.c
	* libgimpwidgets/gimpbrowser.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpenumwidgets.c
	* libgimpwidgets/gimpframe.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimppropwidgets.c
	* libgimpwidgets/gimpscrolledpreview.c: use accessors instead of
	accessing members of GTK+ widgets directly.


svn path=/trunk/; revision=26005
2008-06-28 15:09:46 +00:00
Sven Neumann 7b19c74d10 minor layout tweak.
2007-07-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/channel_mixer.c: minor layout tweak.

	* libgimpwidgets/gimppreviewarea.c 
(gimp_preview_area_set_colormap):
	clear the colormap to all zeros before setting the new colors.


svn path=/trunk/; revision=22893
2007-07-06 20:47:44 +00:00
Sven Neumann 18d85d40b4 bail out early (before checking other parameters) if width or height are
zero

svn path=/trunk/; revision=22268
2007-04-17 19:09:58 +00:00
Sven Neumann 5dde91daab allow the draw, blend, mask and fill methods to be called with zero width
2007-04-17  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: allow the draw, blend, mask
	and fill methods to be called with zero width or height. Nothing
	will be drawn, but it's still a valid call.


svn path=/trunk/; revision=22267
2007-04-17 19:02:55 +00:00
Sven Neumann e640ce4443 fixed clipping (bug #392692).
2007-01-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: fixed clipping (bug 
#392692).


svn path=/trunk/; revision=21642
2007-01-04 12:14: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 7b24dd8e36 moved GIMP_PARAM defines from here ...
2006-01-30  Sven Neumann  <sven@gimp.org>

	* app/config/config-types.h: moved GIMP_PARAM defines from here ...

	* libgimpbase/gimpparam.h: ... to this new files.

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbasetypes.h: include the new header file.

	* libgimp/gimpfontselectbutton.c
	* libgimpconfig/gimpcolorconfig.c
	* libgimpthumb/gimpthumbnail.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolordisplay.c
	* libgimpwidgets/gimpcontroller.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimpenumcombobox.c
	* libgimpwidgets/gimpintcombobox.c
	* libgimpwidgets/gimppageselector.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpzoommodel.c
	* modules/cdisplay_colorblind.c
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/cdisplay_lcms.c
	* modules/cdisplay_proof.c
	* modules/controller_linux_input.c
	* modules/controller_midi.c: use the GIMP_PARAM defines to avoid
	unnecessary string allocations.
2006-01-30 16:10:56 +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
Michael Natterer 48729e774c libgimpcolor/gimpbilinear.c fix some uninitialized stuff gcc 4.0 was
2005-07-08  Michael Natterer  <mitch@gimp.org>

	* libgimpcolor/gimpbilinear.c
	* libgimpwidgets/gimppreviewarea.c: fix some uninitialized stuff
	gcc 4.0 was choking about.
2005-07-08 18:18:00 +00:00
Sven Neumann 5c6dae19dc improved docs.
2005-01-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: improved docs.

2005-01-22  Sven Neumann  <sven@gimp.org>

	* app/app-docs.sgml
	* app/app-sections.txt
	* app/app.types
	* libgimpwidgets/libgimpwidgets-docs.sgml
	* libgimpwidgets/libgimpwidgets-sections.txt
	* libgimpwidgets/libgimpwidgets.types: GimpEnumStore and
	GimpEnumComboBox moved to libgimpwidgets.

	* libgimpwidgets/tmpl/gimpenumcombobox.sgml
	* libgimpwidgets/tmpl/gimpenumstore.sgml: new files.
2005-01-21 23:11:43 +00:00
Sven Neumann 59b87864f4 added some checks to avoid division by zero.
2004-12-27  Sven Neumann  <sven@gimp.org>

	* libgimp/gimpregioniterator.c: added some checks to avoid
	division by zero.

	* libgimpwidgets/gimppreviewarea.[ch]: minor cleanups, improved
	API documentation.
2004-12-27 10:24:16 +00:00
Michael Natterer 998c895a67 More final API cleanup:
2004-11-02  Michael Natterer  <mitch@gimp.org>

	More final API cleanup:

	* tools/pdbgen/pdb/image.pdb: added gimp_image_set,get_colormap()
	and deprecated set,get_cmap().

	* libgimpwidgets/gimppreviewarea.[ch]: renamed
	gimp_preview_area_set_cmap() to set_colormap().

	* libgimp/gimp.def
	* libgimp/gimpdrawablepreview.c
	* libgimp/gimpexport.c
	* libgimp/gimpimage.[ch]
	* libgimpwidgets/gimpwidgets.def: changed accordingly.

	* app/pdb/image_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimpimage_pdb.[ch]: regenerated.

	(undeprecation of plug-ins will follow...)
2004-11-02 11:30:49 +00:00
Michael Natterer 6711646648 Don't store human readable and translatable enum/flag strings in
2004-10-25  Michael Natterer  <mitch@gimp.org>

	Don't store human readable and translatable enum/flag strings in
	GEnumValue's and GTypeValue's fields but attach them to their
	GType using separate structs and utility functions:

	* tools/gimp-mkenums: added params and perl voodoo to support
	generating a second array of values, which is used by the
	Makefiles below to create and register arrays of value
	descriptions.

	* libgimpbase/gimpbasetypes.[ch]: added API to attach/retreive
	arrays of translatable strings to/from enum and flags types. Added
	structs GimpEnumDesc and GimpFlagsDesc for that purpose.

	* libgimpbase/gimputils.[ch]: changed existing enum utility
	functions, added new ones and added a symmetric API for flags.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: changed *-enums.c generation rules
	accordingly.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c: regenerated.

	* app/widgets/gimpenumstore.c
	* app/widgets/gimpenumwidgets.c
	* app/widgets/gimptemplateeditor.c
	* libgimpwidgets/gimppreviewarea.c: follow the enum utility
	function API changes.
2004-10-25 17:55:25 +00:00
Sven Neumann 5f1373436c fixed code that handles drawing outside of the preview area.
2004-09-15  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c
	(gimp_preview_area_[draw|blend|mask]): fixed code that handles
	drawing outside of the preview area.

	* plug-ins/common/unsharp.c (preview_update): draw the preview
	directly from the pixel region.
2004-09-15 20:51:00 +00:00
Sven Neumann e9d5536720 libgimpwidgets/gimppreview.c documented new functions.
2004-09-10  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c: documented new functions.
2004-09-09 22:36:15 +00:00
Sven Neumann 8a80b8e73e fixed coding style issues 2004-09-09 17:13:58 +00:00
David Odin 3f099b0660 added a utility function gimp_preview_area_queue_draw(), which queue the
* libgimpwidgets/gimppreviewarea.c: added a utility function
  gimp_preview_area_queue_draw(), which queue the right part of the
  preview to be redrawn. And use it in all the drawing functions. This
  fix a problem where the preview wasn't updated correctly after a
  resize.
2004-09-09 17:11:16 +00:00
Sven Neumann a514ce7db1 allow to set a maximum size and center the preview area if its allocation
2004-09-09  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: allow to set a maximum size
	and center the preview area if its allocation extends the maximum.

	* libgimpwidgets/gimppreview.[ch]: derive from GtkVBox, moved the
	toggle button out of the table and put the table into an aspect
	frame. Added an API to set the preview boundaries. Set the maximum
	size of the GimpPreviewArea from that function.

	* libgimpwidgets/gimpwidgets.def: added new entries.

	* libgimp/gimpdrawablepreview.c: use gimp_preview_set_bounds().

	* plug-ins/common/gauss.c: pack the preview widget so that it
	resizes with the dialog.
2004-09-09 14:47:39 +00:00
David Odin 824b5289db optimized the case where both buffers have the same alpha for a given
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_blend)
  (gimp_preview_area_mask): optimized the case where both buffers have
  the same alpha for a given pixel.
2004-09-09 13:22:27 +00:00
David Odin ee2e6eac86 fixed a stupid typo.
* libgimpwidgets/gimppreviewarea.c: fixed a stupid typo.
2004-09-08 14:51:02 +00:00
Sven Neumann 7f075c87d8 optimized solid color fills.
2004-09-08  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_fill):
	optimized solid color fills.
2004-09-08 12:54:36 +00:00
Sven Neumann 1a9fdcda80 factored out common code. Reduced indentation level by closing a switch
2004-09-08  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: factored out common code.
	Reduced indentation level by closing a switch earlier.
2004-09-08 12:37:09 +00:00
David Odin c59a6de934 use gimp_preview_area_draw when the opacity is 0 or 255, instead of
*  libgimpwidgets/gimppreviewarea.c: (gimp_preview_area_blend)
  use gimp_preview_area_draw when the opacity is 0 or 255, instead of
  duplicating code.
2004-09-08 11:52:05 +00:00
David Odin e733ca0930 libgimpwidgets/gimppreviewarea.c added two functions:
* libgimpwidgets/gimppreviewarea.c
* libgimpwidgets/gimppreviewarea.h: added two functions:
  gimp_preview_area_blend() to draw the blending of two buffers with
  an opacity parameter, and gimp_preview_area_mask() to draw the
  blending of two buffers, with a mask buffer. The code still needs some
  polish, though.

* libgimp/gimpdrawablepreview.c
* libgimp/gimpdrawablepreview.h: use gimp_preview_area_mask() in
  gimp_drawable_preview_draw(), so the previews are now much more
  accurate (respecting the selection, if any).

Also made the buf parameter of gimp_drawable_preview_draw() a pointer
to constants.
2004-09-07 20:20:13 +00:00
Sven Neumann 6ece077f87 pass a GdkEventButton to gimp_preview_area_menu_popup().
2004-09-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: pass a GdkEventButton to
	gimp_preview_area_menu_popup().

	* libgimpwidgets/gimppreview.c: implement GtkWidget::popup_menu().
2004-09-03 23:41:39 +00:00
Sven Neumann ecca201aa9 added gimp_preview_area_menu_popup(). Not completely finished yet...
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added
	gimp_preview_area_menu_popup(). Not completely finished yet...

	* libgimpwidgets/gimppreview.c: use the new function.
2004-09-03 19:34:59 +00:00
Sven Neumann a1e5a55c7d removed unused function 2004-09-03 13:07:22 +00:00
Sven Neumann 9b314d0e81 swapped light and gray checks to get a checkerboard that matches the image
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (CHECK_COLOR): swapped light
	and gray checks to get a checkerboard that matches the image window.
2004-09-03 12:57:35 +00:00
Sven Neumann 4fbc8764b4 libgimpbase/Makefile.am libgimpbase/gimpchecks.[ch] added
2004-09-03  Sven Neumann  <sven@gimp.org>

	* libgimpbase/Makefile.am
	* libgimpbase/gimpchecks.[ch] added gimp_checks_get_shades().

	* app/base/temp-buf.c
	* app/display/gimpdisplayshell-render.c
	* libgimpwidgets/gimppreviewarea.c: use the new function instead
	of replicating these numbers in three different places.
2004-09-03 00:06:21 +00:00
Sven Neumann 3f4de431c1 light and dark check color were swapped for GIMP_CHECK_TYPE_GRAY_CHECKS.
2004-09-02  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-render.c (check_combos): light and
	dark check color were swapped for GIMP_CHECK_TYPE_GRAY_CHECKS.

	* libgimpwidgets/gimppreviewarea.[ch]: added "check-size" and
	"check-type" properties and draw the checkerboard accordingly.
2004-09-02 15:39:07 +00:00
Sven Neumann e397e4abc4 oops, swapped x and y variables.
2004-09-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (CHECK_COLOR): oops, swapped x
	and y variables.
2004-09-01 08:50:52 +00:00
Sven Neumann 3a0e874522 added new function gimp_preview_area_set_offsets().
2004-09-01  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added new function
	gimp_preview_area_set_offsets().

	* libgimpwidgets/gimppreview.c: use the new function to let the
	checkerboard scroll with the preview.
2004-09-01 01:18:19 +00:00
David Odin e08e1d746b fixed the rendering for INDEXED and INDEXEDA image types.
* libgimpwidgets/gimppreviewarea.c: fixed the rendering for INDEXED
  and INDEXEDA image types.

* plug-ins/common/grid.c: ported to GimpPreviewArea.
2004-08-07 00:04:16 +00:00
Sven Neumann 96b9987210 added new function gimp_preview_area_fill().
2004-07-31  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.[ch]: added new function
	gimp_preview_area_fill().

	* libgimpwidgets/test-preview-area.c: added a test for new function.

	* libgimp/gimpbrushmenu.c: ported to GimpPreviewArea.
2004-07-31 01:03:00 +00:00
Shlomi Fish 51a31ade29 corrected a typo causing mayhem in previews of non-alpha grayscale images.
* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_draw): corrected a
typo causing mayhem in previews of non-alpha grayscale images.
Fixes bug #148873. (as reported by DindinX)
2004-07-30 14:38:11 +00:00
Sven Neumann 23197dc2ca optimized alpha blending.
2004-07-30  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c (gimp_preview_area_draw):
	optimized alpha blending.
2004-07-30 12:01:44 +00:00
Sven Neumann e948146662 only invalidate the buffer on size_allocate; allocate a new one on the
2004-07-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreviewarea.c: only invalidate the buffer
	on size_allocate; allocate a new one on the next call to
	gimp_preview_area_draw(). Fixed buffer offset in expose method.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/test-preview-area.c: more a benchmark than a
	test; quite similar to testrgb from the GTK+ source tree.
2004-07-29 21:08:13 +00:00
Sven Neumann c307429a24 libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.def
2004-07-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.def
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetstypes.h
	* libgimpwidgets/gimppreviewarea.[ch]: added GimpPreviewArea, a
	replacement for GtkPreview, loosely based on patches from Geert
	Jordaens and David Odin. Fixes bug #144759.

	* plug-ins/common/sharpen.c: use the new widget instead of a
	GtkPreview; saves about 100 lines of rather complex code :)
2004-07-29 17:10:28 +00:00