Commit Graph

92 Commits

Author SHA1 Message Date
Massimo Valentini 23d5944ef8 Bug 768625: gimp-gradient-segment-range-move crashes...
...GIMP invoked with end-segment < 0

correct a typo
2016-07-10 17:21:32 +02:00
Michael Henning 7bdc3cba14 app: Relax preconditions on gimp_gradient_get_color_at
The context can now be null unless the gradient specifically needs
the foreground/background colors, in which case
gimp_context_get_{foreground,background} will do the check and warn.
2014-07-22 13:13:46 -04:00
Michael Natterer 1d55ad1491 app: use "gimp-tool-blend" for GimpGradient, there is no "gimp-gradient" icon 2014-05-15 12:49:34 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer d5d8e36d21 app: gimp_-namespace all GimpTempBuf functions 2012-05-02 17:51:00 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer ff86f85744 app: remove x, y and color parameters from temp_buf_new()
Fix the places that passed the color by either temp_buf_data_clear()
or memset(), and assign x and y manually, they are going to vanish
completely soon.
2012-05-02 17:50:58 +02: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 cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer c9bde335f0 app: don't additionally ref the standard data objects
Instead, set their statically remembered pointer as a weak pointer so
it's nullified automatically if they are ever finalized. Doesn't
actually get rid of them upon exit yet, this is just a preparation.
2010-06-24 18:38:16 +02:00
Michael Natterer 4fcf34699f app: flip context and name parameters in GimpDataNewFunc 2010-04-10 19:55:42 +02:00
Michael Natterer 430b0e5517 app: add a GimpContext parameter to all functions which create GimpData
and pass a context whereever needed. Fix up gimp_tool_preset_new()
to actually make a copy of the context's active tool's options.
2010-04-05 13:26:31 +02:00
Michael Natterer 98a5e77200 app: formatting 2010-04-04 18:56:40 +02:00
Michael Natterer 22767ca7b8 Seal GimpData completely and add the missing accessors 2009-10-31 18:48:38 +01: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
Martin Nordholts 364d2cd84f Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.c: Implement GimpTagged::get_identifier() and
GimpTagged::get_checksum().

* app/core/gimpbrush.c: 
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: Implement GimpTagged::get_checksum().
They all use the GimpData implementation of
GimpTagged::get_identifier().

svn path=/trunk/; revision=27784
2008-12-13 11:58:24 +00:00
Martin Nordholts ddaa0b48ec s/temp_buf_data/temp_buf_get_data/
* app/base/pixel-region.c
* app/base/temp-buf.c
* app/base/temp-buf.h
* app/core/gimpbrush-load.c
* app/core/gimpbrush-scale.c
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpgradient.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimppattern-load.c
* app/core/gimppattern.c
* app/core/gimppreviewcache.c
* app/core/gimpviewable.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint/gimpbrushcore.c
* app/paint/gimpclone.c
* app/paint/gimperaser.c
* app/paint/gimpheal.c
* app/paint/gimpink.c
* app/paint/gimppaintbrush.c
* app/pdb/brush-cmds.c
* app/pdb/brushes-cmds.c
* app/pdb/drawable-cmds.c
* app/pdb/image-cmds.c
* app/pdb/pattern-cmds.c
* app/pdb/patterns-cmds.c
* app/text/gimpfont.c
* app/tools/gimpiscissorstool.c
* app/vectors/gimpvectors-preview.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimppatternselect.c
* app/widgets/gimpviewrenderer.c

svn path=/trunk/; revision=27782
2008-12-13 10:35:53 +00:00
Martin Nordholts 70ed5218d6 Bug 555954 – Merge Tagging of Gimp Resources GSoC Project
Partial merge of code from Aurimas Juška.

* app/core/gimpdata.[ch] (gimp_data_make_internal): Add an
'identifier' parameter/instance struct member that can be used to
identify the internal GimpData object across sessions. It is the
internal-object counterpart to a file path.

* app/core/gimp.c
* app/core/gimpcurve.c
* app/core/gimpbrush.c
* app/core/gimppattern.c
* app/core/gimppalette.c
* app/core/gimpgradient.c
* app/core/gimp-gradients.c: Assign an identifier to the the
internal GimpData objects.

svn path=/trunk/; revision=27781
2008-12-12 07:03:42 +00:00
Michael Natterer c985f2e2a5 changed GimpBrush::get_extension() to return const gchar* instead of
2008-09-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.h: changed GimpBrush::get_extension() to return
	const gchar* instead of gchar*

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpcurve.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: changed accordingly.


svn path=/trunk/; revision=26935
2008-09-12 10:35:35 +00:00
Sven Neumann e607d2ce0a fixed rounding errors in color conversion.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.c (gimp_gradient_get_new_preview): fixed
	rounding errors in color conversion.


svn path=/trunk/; revision=26758
2008-08-25 13:20:07 +00:00
Lars-Peter Clausen d4fac257aa Don't dereference final_start_seg and final_end_seg if NULL.
2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

	* app/core/gimpgradient.c (gimp_gradient_segment_range_delete):
	Don't dereference final_start_seg and final_end_seg if NULL.


svn path=/trunk/; revision=26725
2008-08-23 13:20:54 +00:00
Sven Neumann fa7e312a2c replaced the RGB buffer with a Cairo surface.
2007-11-04  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpviewrenderer.[ch]: replaced the RGB buffer 
with
	a Cairo surface.

	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* app/widgets/gimpviewrendererpalette.c
	* app/widgets/gimpviewrenderervectors.c: changed accordingly. 
There
	are some loose ends here that will be fixed over the next days.

	* app/widgets/gimprender.c: removed gimp_render_temp_buf; it is
	not any longer needed.

	* app/core/gimpgradient.c (gimp_gradient_get_preview_size): 
return
	an odd preview height to make the border align with the pixel 
grid.


svn path=/trunk/; revision=24056
2007-11-04 19:14:32 +00:00
Michael Natterer ada79e533a app/actions/data-commands.c app/base/boundary.c app/base/gimphistogram.c
2007-05-22  Michael Natterer  <mitch@gimp.org>

	* app/actions/data-commands.c
	* app/base/boundary.c
	* app/base/gimphistogram.c
	* app/base/gimplut.c
	* app/base/temp-buf.c
	* app/core/gimpcontainer.c
	* app/core/gimpgradient.c
	* app/core/gimpparamspecs.c
	* app/core/gimpundo.c
	* app/plug-in/gimpplugin-cleanup.c
	* app/plug-in/gimppluginmanager-data.c
	* app/plug-in/gimppluginmanager-help-domain.c
	* app/plug-in/gimppluginmanager-locale-domain.c
	* app/plug-in/gimppluginmanager-menu-branch.c
	* app/plug-in/gimppluginprocframe.c
	* app/vectors/gimpanchor.c
	* app/widgets/gimpsessioninfo.c: use GSlice instead of g_new/g_free
	for structs of fixed size.


svn path=/trunk/; revision=22558
2007-05-22 10:43:48 +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 3df625b7ff keep the file extension defines here, just as we do it for brushes.
2006-10-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgradient-load.h: keep the file extension defines
	here, just as we do it for brushes.

	* app/core/gimpgradient.h: removed them here.

	* app/core/gimpgradient.c: changed accordingly.
2006-10-03 11:10:20 +00:00
Michael Natterer ca6afdf530 added gimp_gradient_flatten() which creates a copy of a gradient with all
2006-09-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgradient.[ch]: added gimp_gradient_flatten() which
	creates a copy of a gradient with all colors that refer to FG or
	BG turned into constant colors.

	* app/core/gimpdrawable-blend.c (gradient_fill_region): create a
	flat copy of the gradient if it contains FG/BG colors. Avoids
	gazillions of context color lookups while rendering, depending on
	gradient and blend complexity.
2006-09-19 22:17:06 +00:00
Sven Neumann f596bb1a1b disallow NULL context and removed code that used to deal with this case.
2006-09-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.c: disallow NULL context and removed code
	that used to deal with this case.
2006-09-01 13:17:55 +00:00
Michael Natterer 663b44c988 new funtion which returns TRUE if any of the gradient's segments refer to
2006-08-31  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpgradient.[ch] (gimp_gradient_has_fg_bg_segments):
	new funtion which returns TRUE if any of the gradient's segments
	refer to FG of BG.

	(gimp_gradient_segment_get_left_color_type)
	(gimp_gradient_segment_set_left_color_type)
	(gimp_gradient_segment_get_right_color_type)
	(gimp_gradient_segment_set_right_color_type): new accessors for
	the new GimpGradientColor stuff.

	(gimp_gradient_segment_split_midpoint)
	(gimp_gradient_segment_range_flip)
	(gimp_gradient_segment_range_replicate): split, flip and replicate
	the segments' color_types too.

	* app/widgets/gimpviewrenderer.[ch]: added virtual functions
	::set_context() and ::invalidate() and call them.

	* app/widgets/gimpviewrenderergradient.[ch]: implement the virtual
	functions. Connect to the context's "foreground-changed" and
	"background-changed" signals if the gradient contains FG or BG
	colors and invalidate the renderer whenever they change.

	* app/core/gimp-gradients.c: removed signal connections which
	invalidated the gradients on FG/BG changes of the user context.
2006-08-31 18:47:13 +00:00
Michael Natterer b53aa45a76 Changed GimpViewable preview rendering to have a context to get
2006-08-29  Michael Natterer  <mitch@gimp.org>

	Changed GimpViewable preview rendering to have a context to get
	FG/BG/whatever from. Use the context to enable dynamic FG/BG
	colors in gradients. Fixes bug #127676 and bug #352214. Addresses
	bug #128367 (doesn't fix it because there's no loading/saving and
	no GUI yet).

	* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
	specifying gradient colors in terms of foreground and background.

	* app/core/gimpgradient.[ch]: added color_type members to the
	GimpGradientSegment struct and honor them in
	gimp_gradient_get_color_at(). Added GimpContext parameters to all
	functions which finally call get_color_at().

	* app/core/gimp-gradients.c: use the new method to implement the
	builtin gradients.

	* app/core/gimpviewable.[ch]: added GimpContext parameters to all
	get_preview() and get_pixbuf() functions.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpgradient.c
	* app/core/gimpimage-preview.[ch]
	* app/core/gimpimagefile.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/text/gimpfont.c
	* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
	and ::get_pixbuf() implementations accordingly.

	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.[ch]
	* app/dialogs/dialogs-constructors.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/resize-dialog.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpnavigationeditor.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimptexttool.c
	* app/actions/gradient-editor-commands.c
	* app/widgets/gimpaction.c
	* app/widgets/gimpbrusheditor.[ch]
	* app/widgets/gimpbufferview.c
	* app/widgets/gimpcellrendererviewable.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpclipboard.c
	* app/widgets/gimpcoloreditor.c
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerbox.c
	* app/widgets/gimpcontainercombobox.c
	* app/widgets/gimpcontainereditor.c
	* app/widgets/gimpcontainerentry.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainertreeview.[ch]
	* app/widgets/gimpdataeditor.[ch]
	* app/widgets/gimpdevicestatus.c
	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpgradienteditor.[ch]
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimppaletteeditor.[ch]
	* app/widgets/gimppropwidgets.[ch]
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpthumbbox.[ch]
	* app/widgets/gimptoolbox-image-area.c
	* app/widgets/gimptoolbox-indicator-area.c
	* app/widgets/gimptooloptionseditor.c
	* app/widgets/gimpundoeditor.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpview-popup.[ch]
	* app/widgets/gimpview.[ch]
	* app/widgets/gimpviewablebutton.c
	* app/widgets/gimpviewabledialog.c
	* app/widgets/gimpviewrenderer.[ch]
	* app/widgets/gimpviewrenderer-frame.c
	* app/widgets/gimpviewrendererbrush.c
	* app/widgets/gimpviewrendererbuffer.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderergradient.c
	* app/widgets/gimpviewrendererimage.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
	and parameters, implement GimpDocked::set_context() in many
	widgets. Pass these locally remembered contexts to GimpViewable
	functions. Did some minor cleanups on the way. There are still
	some minor FIXMEs around where the code uses a NULL context (which
	is allowed by the APIs)

	* app/pdb/drawable_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/image_cmds.c: regenerated.
2006-08-29 21:44:51 +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 049872b361 app/*.[ch] converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* app/*.[ch]
	* app/*/*.[ch]: converted tabs to spaces.
2006-04-12 12:49:29 +00:00
Michael Natterer 0d4a10fee4 app/config/*.c app/core/*.c app/display/*.c app/text/*.c port to
2005-12-10  Michael Natterer  <mitch@gimp.org>

	* app/config/*.c
	* app/core/*.c
	* app/display/*.c
	* app/text/*.c
	* app/vectors/*.c: port to G_DEFINE_TYPE() and friends. Some related
	core reordering and cleanup.
2005-12-10 19:24:36 +00:00
Sven Neumann c1363db8c0 Removed "stingy-memory-use" all over the place. This feature was really
2005-06-08  Sven Neumann  <sven@gimp.org>

	Removed "stingy-memory-use" all over the place. This feature was
	really not that useful anymore. The GUI for the preference option
	was already removed for GIMP 2.2.  Fixes bug #306617.

	* app/config/gimpbaseconfig.[ch]: set IGNORE flag on
	"stingy-memory-use".

	* app/config/gimpcoreconfig.h: added a comment that the
	font_path_writable variable is unused.

	* app/base/temp-buf.[ch]: removed code that used to deal with
	swapping temp-bufs to disk.

	* app/base/base.c: made base_config a static variable.

	* app/core/gimpdata.[ch]
	* app/core/gimpdatafactory.[ch]: removed stingy_memory_use
	parameter from data construction methods.

	* app/core/gimp-gradients.c
	* app/core/gimpbrush-load.[ch]
	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.[ch]
	* app/core/gimpbrushpipe.[ch]
	* app/core/gimpcontext.c
	* app/core/gimpgradient-load.[ch]
	* app/core/gimpgradient.[ch]
	* app/core/gimppalette-import.c
	* app/core/gimppalette.[ch]
	* app/core/gimppattern.[ch]: changed accordingly.
2005-06-08 11:27:31 +00:00
Sven Neumann da9547a8cd fixed brokeness introduced I when eliminating gradient->last_visited.
2005-03-08  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.c (gimp_gradient_segment_split_uniform):
	fixed brokeness introduced I when eliminating gradient->last_visited.
2005-03-08 22:26:12 +00:00
Sven Neumann 8de1e94bb7 removed the "last_visited" field from GimpGradient. Instead added the new
2005-02-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimpgradient.[ch]: removed the "last_visited" field
	from GimpGradient. Instead added the new function
	gimp_gradient_get_color_at_segment() that allows the caller to do
	the same optimization.

	* app/actions/gradient-editor-commands.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimppalette-import.c
	* app/paint/gimppaintoptions.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpgradientselect.c
	* app/widgets/gimpviewrenderergradient.c: changed accordingly.

	* app/pdb/gradient_cmds.c
	* app/pdb/gradients_cmds.c: regenerated.
2005-02-26 23:55:50 +00:00
Manish Singh 5d01581069 Fix a bunch of warnings from Sparse:
2004-11-13  Manish Singh  <yosh@gimp.org>

        Fix a bunch of warnings from Sparse:

        * app/actions/dockable-commands.c
        * app/actions/layers-actions.c
        * app/actions/view-commands.c
        * app/base/pixel-surround.c
        * app/config/gimpconfig-utils.c
        * app/config/gimpscanner.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpcontainer.c
        * app/core/gimpimage.c
        * app/dialogs/palette-import-dialog.c
        * app/file/gimprecentlist.c
        * app/plug-in/plug-in-params.c
        * app/text/gimptext-compat.c
        * app/text/gimptext-parasite.c
        * app/vectors/gimpbezierstroke.c
        * app/vectors/gimpstroke.c
        * app/widgets/gimpcellrendereraccel.c
        * app/widgets/gimpselectiondata.c
        * app/xcf/xcf.c
        * libgimp/gimp.c
        * libgimpthumb/gimpthumb-utils.c
        * libgimpthumb/gimpthumbnail.c
        * modules/cdisplay_proof.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/common/csource.c
        * plug-ins/common/glasstile.c
        * plug-ins/common/nova.c
        * plug-ins/common/pcx.c
        * plug-ins/common/pnm.c
        * plug-ins/common/randomize.c
        * plug-ins/common/screenshot.c
        * plug-ins/common/sel_gauss.c
        * plug-ins/common/spheredesigner.c
        * plug-ins/common/wind.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gimpressionist/gimpressionist.c
        * plug-ins/ifscompose/ifscompose.c
        * plug-ins/print/gimp_main_window.c
        * plug-ins/print/print.c: Cleanup integer vs. pointer confusion.

        * app/base/temp-buf.c
        * app/dialogs/about-dialog.c
        * plug-ins/common/bumpmap.c
        * plug-ins/common/jigsaw.c
        * plug-ins/gfig/gfig-dobject.c: Cosmetic cleanups.

        * app/config/gimpconfig-deserialize.c
        * app/config/gimpconfig-path.c
        * app/config/gimpconfigwriter.c
        * app/core/gimpgradient.c
        * app/tools/gimpdrawtool.c
        * plug-ins/common/nlfilt.c
        * plug-ins/common/unsharp.c
        * plug-ins/common/zealouscrop.c: Define inline functions before they
        are used.

        * app/core/gimpdrawable-blend.c: PixelRegion definition was changed
        some time ago, but the initialization here didn't change. Fix it.

        * app/plug-in/plug-in-rc.c (plug_in_extra_deserialize): No need to
        assign token twice in a row.

        * libgimpbase/gimpdatafiles.c (gimp_datafiles_read_directories): No
        need to initialize file_data, since the code fills out all the fields.

        * plug-ins/common/CML_explorer.c
        * plug-ins/common/vpropagate.c: Declare function pointers fully.

        * plug-ins/common/grid.c (pix_composite): G_INLINE_FUNC isn't needed,
        we assume we can use the "inline" keyword always.

        * plug-ins/common/psd_save.c
        * plug-ins/common/vinvert.c
        * plug-ins/gfig/gfig-arc.c
        * plug-ins/gfig/gfig-bezier.c
        * plug-ins/gfig/gfig-circle.c
        * plug-ins/gfig/gfig-dialog.c
        * plug-ins/gfig/gfig-dobject.c
        * plug-ins/gfig/gfig-ellipse.c
        * plug-ins/gfig/gfig-line.c
        * plug-ins/gfig/gfig-poly.c
        * plug-ins/gfig/gfig-spiral.c
        * plug-ins/gfig/gfig-star.c
        * plug-ins/gfig/gfig.c
        * plug-ins/gimpressionist/orientmap.c
        * plug-ins/gimpressionist/placement.c
        * plug-ins/gimpressionist/sizemap.c
        * plug-ins/imagemap/imap_grid.c
        * plug-ins/imagemap/imap_main.c
        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/imagemap/imap_settings.c
        * plug-ins/maze/maze.c
        * plug-ins/sel2path/curve.c
        * plug-ins/sel2path/fit.c
        * plug-ins/sel2path/pxl-outline.c
        * plug-ins/sel2path/spline.c
        * plug-ins/xjt/xjt.c: Functions with no args should be declared
        with (void).

        * plug-ins/common/retinex.c (MSRCR): Initialize max_preview to quiet
        the compiler.
2004-11-14 02:50:33 +00:00
Michael Natterer 3eb69a85f0 tools/pdbgen/pdb/brush.pdb tools/pdbgen/pdb/gradient.pdb disallow the
2004-10-04  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush.pdb
	* tools/pdbgen/pdb/gradient.pdb
	* tools/pdbgen/pdb/palette.pdb: disallow the empty string for
	new brushes, gradients and palettes and check the return value
	of gimp_data_factory_data_new(). Cleanup.

	* app/core/gimpbrushgenerated.c (gimp_brush_generated_new)
	* app/core/gimpgradient.c (gimp_gradient_new)
	* app/core/gimpdatafactory.c (gimp_data_factory_data_new): same
	here. Fixes bug #154264.

	* app/core/gimpdata.[ch] (gimp_data_set_filename): added boolean
	"deletable" parameter because it's not derivable from "writable".

	* app/core/gimpdatafactory.c (gimp_data_factory_load_data): need
	to figure "deletable" separately from "writable" to be able to
	delete unsavable stuff in the user-writable data directories.
	Fixes bug #154410.

	(gimp_data_factory_data_save_single): cleaned up.

	* app/pdb/brush_cmds.c
	* app/pdb/gradient_cmds.c
	* app/pdb/palette_cmds.c
	* libgimp/gimpbrush_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimppalette_pdb.c: regenerated.
2004-10-04 09:39:27 +00:00
Sven Neumann d3caf7a3ed app/core/Makefile.am app/core/gimpgradient-load.[ch]
2004-07-22  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpgradient-load.[ch]
	* app/core/gimpgradient-save.[ch]
	* app/core/gimpgradient.[ch]: moved gradient file handling out of
	gimpgradient.c to new files.

	* app/core/gimp.c
	* app/actions/gradients-commands.c: changed accordingly.

	* libgimpcolor/gimpcolor.def: added gimp_rgb_parse_name.
2004-07-22 13:58:29 +00:00
Sven Neumann c28d70ce00 inline the repeat functions.
2004-06-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-blend.c (gradient_render_pixel): inline
	the repeat functions.

	* app/core/gimpgradient.c: inline the curve functions.
2004-06-13 01:17:57 +00:00
Michael Natterer b490b26283 added "gint freeze_count" and gimp_data_freeze()/thaw() functions. Emit
2004-06-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.[ch]: added "gint freeze_count" and
	gimp_data_freeze()/thaw() functions. Emit "dirty" only if
	freeze_count either is 0 or drops to 0.

	* app/core/gimpbrushgenerated.[ch]
	* app/core/gimpgradient.[ch]: removed freeze/thaw stuff that
	was duplicated in these two subclasses and use the new
	GimpData API instead.

	* app/widgets/gimpbrusheditor.c
	* app/widgets/gimpgradienteditor.c: changed accordingly.
2004-06-12 22:13:31 +00:00
Michael Natterer c399ae1fe9 renamed the values of the GimpGradientSegment* enums from GIMP_GRAD_* to
2004-06-01  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h: renamed the values of the
	GimpGradientSegment* enums from GIMP_GRAD_* to
	GIMP_GRADIENT_SEGMENT_* because they are exported now.

	* app/core/gimp-gradients.c
	* app/core/gimpgradient.c
	* app/actions/gradient-editor-actions.c: changed accordingly.

	* libgimp/gimpenums.h
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: regenerated.
2004-06-01 18:49:50 +00:00
Michael Natterer 421024cc5c app/core/core-enums.h app/core/gimpgradient.[ch] app/pdb/Makefile.am
2004-05-31  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h
	* app/core/gimpgradient.[ch]
	* app/pdb/Makefile.am
	* app/widgets/gimpgradienteditor.c
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/groups.pl
	* tools/pdbgen/pdb/gradient_edit.pdb: applied a patch from Shlomi
	Fish that adds lots of gradient edit functions to
	gimpgradient.[ch] and makes them available through the PDB.
	Fixes bug #129675 and bug #129678.

	Did some cleanups / enhancments to the patch:

	* app/core/gimpgradient.[ch]: changed the naming scheme of the new
	functions and changed old functions to match the new scheme.
	Introduce a "freeze_count" and public freeze()/thaw() API which
	enables subsequent gradient changes without "dirty" being emitted
	all the time.  Added GimpGradient parameters to all functions
	which modify the gradient.

	* app/widgets/gimpgradienteditor.c: use the new freeze/thaw
	stuff to keep the gradient from updating when not in
	"Instant Update" mode.

	* app/actions/gradient-editor-commands.c: removed all gradient
	editing code and call the new core functions.

	* libgimp/Makefile.am
	* tools/pdbgen/pdb/gradient_edit.pdb: changed the namespace of all
	added functions. Generate libgimp wrappers for them..

	* app/pdb/gradient_edit_cmds.c
	* app/pdb/internal_procs.c
	* libgimp/gimp_pdb.h
	* libgimp/gimpenums.h
	* libgimp/gimpgradientedit_pdb.[ch]
	* plug-ins/pygimp/gimpenums.py
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl: (re)generated.
2004-05-30 22:04:16 +00:00
Michael Natterer de7a940501 app/config/gimpconfig-deserialize.c app/config/gimpscanner.c
2004-05-12  Michael Natterer  <mitch@gimp.org>

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpscanner.c
	* app/core/gimp-edit.c
	* app/core/gimpchannel-combine.c
	* app/core/gimpcontainer.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-combine.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-projection.c
	* app/core/gimpimage.c
	* app/display/gimpdisplay-handlers.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpprogress.c
	* app/gui/info-dialog.c
	* app/gui/module-browser.c
	* app/gui/offset-dialog.c
	* app/plug-in/plug-in.c
	* app/tools/gimpdrawtool.c
	* app/tools/tool_manager.c
	* app/widgets/gimpactiongroup.c
	* app/widgets/gimpdialogfactory.c
	* app/widgets/gimpgradienteditor.c
	* app/widgets/gimpitemfactory.c
	* app/widgets/gimppropwidgets.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-save.c
	* libgimp/gimpexport.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimpunitmenu.c: replaced G_GNUC_FUNCTION,
	G_GNUC_PRETTY_FUNCTION, G_STRLOC and hardcoded function names in
	g_warning()s by G_STRFUNC.
2004-05-12 08:13:33 +00:00
Michael Natterer d991e64b38 Fixed GimpData's default "writable" and "deletable" behaviour:
2004-02-13  Michael Natterer  <mitch@gimp.org>

	Fixed GimpData's default "writable" and "deletable" behaviour:

	* app/core/gimpdata.c (gimp_data_init): default to writable and
	deletable == TRUE (something that has no filename was never loaded
	from disk and can't be undeletable or read-only).
	Fixes bug #134274.

	* app/core/gimpdata.[ch]: added new function
	gimp_data_make_internal() which frees the filename and sets the
	data's flags accordingly.

	* app/core/gimp-gradients.c (gimp_gradients_add_gradient)
	* app/core/gimpbrush.c (gimp_brush_get_standard)
	* app/core/gimpgradient.c (gimp_gradient_get_standard)
	* app/core/gimppalette.c (gimp_palette_get_standard)
	* app/core/gimppattern.c (gimp_pattern_get_standard): use the
	new function for internal data objects.

	* app/core/gimpdata.c (gimp_data_save, gimp_data_delete_from_disk)
	* app/core/gimpdatafactory.c (gimp_data_factory_save_single):
	bail out with g_return_if_fail() is the data is not writable
	or deletable.

	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdatafactoryview.c: changed accordingly.
2004-02-13 11:53:22 +00:00
Michael Natterer 44cac5ae91 GimpData code review:
2004-01-29  Michael Natterer  <mitch@gimp.org>

	GimpData code review:

	* app/core/gimpdata.c (gimp_data_init): default to
	writable = FALSE and dirty = TRUE.

	* app/core/gimpbrushgenerated.[ch]: added "const gchar *name" to
	gimp_brush_generated_new().

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: set all standard datas to clean and
	internal, check for g_path_is_absolute() in all load functions,
	pass the data's name as construct property to g_object_new()
	instead of calling gimp_object_set_name() after creation, fixed
	some UTF-8 handling, spacing, indentation, coding style, general
	cleanup.
2004-01-29 16:19:57 +00:00
Michael Natterer 894cf70dd5 Added infrastructure to make sure we don't write to the global brush,
2004-01-28  Michael Natterer  <mitch@gimp.org>

	Added infrastructure to make sure we don't write to the global
	brush, pattern etc. directories. Needed to make this configurable
	because we can't rely on the global directories being read-only,
	having certain names or being otherwise detectable at runtime in a
	sane way. Fixes bug #132214.

	* libgimpbase/gimpdatafiles.[ch]: added "const gchar *dirname" to
	the GimpDataFileData struct so callbacks don't need to call
	g_path_get_dirname() for each file.

	* libgimpwidgets/gimpfileentry.c: made it work with non UTF-8
	encoded filenames.

	* libgimpwidgets/gimppatheditor.[ch]: ditto. Added GUI and API for
	setting/getting a second "writable_path". The widget makes sure
	that the writable_path is always a subset of the path.

	* app/config/gimpconfig-utils.[ch]: added new function
	gimp_config_build_writable_path().

	* app/config/gimpcoreconfig.[ch]: added separate properties for
	the writable brush, pattern, gradient, palette and font paths.

	* app/config/gimprc-blurbs.h: added (still empty) blurbs for the
	new properties.

	* app/core/gimpdata.[ch] (gimp_data_set_filename): added parameter
	"gboolean writable". Set data->writable to FALSE by default. If
	"writable" is passed as TRUE, still check if we can write to the
	file before setting data->writable to TRUE.

	(gimp_data_create_filename): changed "data_path" parameter to
	"dest_dir" and assume dest_dir is writable.

	(gimp_data_duplicate): set data->dirty to TRUE to make sure
	duplicated things will be saved.

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: don't set the data's filename and don't
	touch data->dirty in the _load() functions because that's done by
	the data factory now. Don't touch data->dirty in the _duplicate()
	functions because that's done by gimp_data_duplicate() itself now.

	* app/core/gimpdatafactory.[ch] (gimp_data_factory_new): added
	"writable_property_name" and remember it.
	Added utility function gimp_data_factory_get_save_dir() which
	determines the directory to save new datas to.
	Added public function gimp_data_factory_data_save_single() which
	saves a single data object.
	Make sure new things get saved to the first writable directory
	as specified in preferences.

	* app/core/gimp.c (gimp_real_initialize): pass the writable_paths'
	property names to gimp_data_factory_new().

	* app/widgets/gimpdataeditor.c (gimp_data_editor_save_dirty): use
	gimp_data_factory_data_save_single() instead of implementing
	saving here.

	* app/widgets/gimppropwidgets.[ch] (gimp_prop_path_editor_new):
	added "const gchar *writable_property_name" parameter (can be
	NULL).

	Added the needed callbacks to handle the writable_path and made
	the path_editor and file_entry code aware of non UTF-8 filename
	encodings. Some general cleanup.

	* app/gui/preferences-dialog.c: changed accordingly.
2004-01-28 21:53:50 +00:00
Sven Neumann 6d506d51bb include "libgimpbase/gimpbase.h" where needed; removed now unnecessary
2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
	now unnecessary inclusions of "file/file-utils.h".
2004-01-19 01:54:11 +00:00