Commit Graph

112 Commits

Author SHA1 Message Date
Michael Natterer c6733ac891 app/base/Makefile.am removed these files.
2007-04-01  Michael Natterer  <mitch@gimp.org>

	* app/base/Makefile.am
	* app/base/brush-scale.[ch]: removed these files.

	* app/core/Makefile.am
	* app/core/gimpbrush-scale.[ch]: added the functions here as
	static utility functions. Also move the default implementations of
	GimpBrush::scale_size(), ::scale_mask() and ::scale_pixmap() here,
	including their utility functions.

	* app/core/gimpbrush.c: remove all scale stuff and
	include "gimpbrush-scale.h" instead.

	(gimp_brush_get_new_preview): use GimpBrush's scale functions
	instead of the now private ones. Cleanup.

	(gimp_brush_scale_mask)
	(gimp_brush_scale_pixmap): return a copy of the buf for
	scale == 1.0.


svn path=/trunk/; revision=22213
2007-04-01 13:38:22 +00:00
Michael Natterer 83981ef404 simplified brush scale calculation by making sure that brush_core->scale
2007-03-18  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpbrushcore.c: simplified brush scale calculation by
	making sure that brush_core->scale always contains a value that's
	suited as input for gimp_brush_scale_mask/pixmap() (bug #419290).

	(gimp_brush_core_calc_brush_size): removed this function. All
	places can now call gimp_brush_scale_size() directly with
	core->scale as parameter.

	(gimp_brush_core_calc_brush_scale): new function which returns
	a linear scale factor which contains both the area-based pressure
	scale factor and the linear paint options scale factor.

	(gimp_brush_core_start)
	(gimp_brush_core_get_paint_area): use the new function instead
	of doing these calculations manually.

	(gimp_brush_core_interpolate): remove call to
	gimp_brush_core_scale_brush_size() and use core->scale directly.

	(gimp_brush_core_get_paint_area)
	(gimp_brush_core_scale_mask)
	(gimp_brush_core_scale_pixmap): use gimp_brush_scale_size()
	instead of the removed gimp_brush_core_scale_brush_size().

	(gimp_brush_core_create_bound_segs): use only
	paint_options->brush_scale here since the canvas brush preview
	always has to asume full pressure.

	* app/core/gimpbrush.c (gimp_brush_scale_size): special case
	scale == 1.0 and return the mask's width/height without calling
	the virtual function.


svn path=/trunk/; revision=22141
2007-03-18 19:48:36 +00:00
Michael Natterer 94fe72a220 app/core/gimpbrush.c some minor fixes and stylistic paranoia i overlooked
2007-03-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c: some minor fixes and stylistic
	paranoia i overlooked in last night's late review.


svn path=/trunk/; revision=22119
2007-03-14 10:23:18 +00:00
Martin Nordholts e3d9198cc4 Made brushes upscalable by using scale_region. Downscaling still uses
2007-03-14  Martin Nordholts  <martinn@svn.gnome.org>

	Made brushes upscalable by using scale_region. Downscaling still
	uses functions in app/base/brush-scale.c (because of better
	performance). Parametric brushes of course recalculates masks
	instead of using bitmap scaling. Fixes bug #65030.

	* app/core/gimpbrush.[ch]: Added a private scale_buf method which
	uses scale_region (with GIMP_INTERPOLATION_LINEAR) to scale its
	masks and pixmaps. Also added public virtual method scale_size to
	GimpBrush (overridden by GimpBrushGenerated) which calculates the
	buffer sizes for a given brush scaled with a given scale.

	* app/core/gimpbrushgenerated.c: Implemented the new scale_size
	method inherited from GimpBrush, and modified
	gimp_brush_generated_calc to use this helper function.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
	the brush Scale-slider logarithmic.

	* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
	Changed Scale scale to [0.0, 10.0].

	* app/paint/gimpbrushcore.c:
	(gimp_brush_core_calc_brush_size): Refactored 'get brush size' code
	to where it belongs, in GimpBrush-classes, and allowed scales
	larger than 1.0.


svn path=/trunk/; revision=22113
2007-03-14 00:18:01 +00:00
Michael Natterer 4648f542cf app/core/gimpbrush.[ch] app/core/gimpbrushgenerated.c
2007-03-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.c
	* app/tools/gimppaintoptions-gui.c
	* app/base/brush-scale.[ch]
	* app/base/temp-buf.[ch]
	* app/paint/gimppaintoptions.c
	* app/paint/gimpbrushcore.c: revert last commit. The patch needs
	more review and it's easier to start from quare one than have
	patches on top of patches.


svn path=/trunk/; revision=22101
2007-03-12 09:33:57 +00:00
Michael Schumacher a4e81c3a6c Made brushes scalable (both up and down) by using existing scaling
2007-03-11  Michael Schumacher  <schumaml@cvs.gnome.org>

	Made brushes scalable (both up and down) by using existing
	scaling routines, and also refactored some brush-code. Patch by
	Martin Nordholts. Fixes bug #65030.

	* app/paint/gimpbrushcore.c:
	(gimp_brush_core_calc_brush_length_scale) Refactored 'get brush
	size' code to where it belongs, in GimpBrush-classes, and renamed
	gimp_brush_core_calc_brush_size to
	gimp_brush_core_calc_brush_length_scale.

	* app/paint/gimppaintoptions.c (gimp_paint_options_class_init):
	Changed Scale scale to [0.0, 100.0].

	* app/base/temp-buf.[ch] (mask_buf_new): Change signature to also
	take a bpp parameter.

	* app/base/brush-scale.[ch]: Changed brush_scale_(mask|pixmap) to
	the new brush_scale_buf, which uses existing scaling routines
	(scale_region) instead of dedicated down-scaling only routines.

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): Made
	the brush Scale-slider logarithmic.

	* app/core/gimpbrushgenerated.c: Implemented the new
	get_scaled_size method inherited from GimpBrush, and modified
	gimp_brush_generated_calc to use this helper function.

	* app/core/gimpbrush.[ch]: Added public virtual method
	get_scaled_size to GimpBrush, overridden by GimpBrushGenerated,
	which calculates the buffer sizes for a given brush scaled with a
	given scale. Also changed calls to brush_scale_(mask|pixmap) to
	the new brush_scale_buf.

svn path=/trunk/; revision=22099
2007-03-11 16:28:08 +00:00
Michael Natterer 8398ed8735 maintain an is_drawn boolean which indicates whether the drawn stuff is
2007-01-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: maintain an is_drawn boolean which
	indicates whether the drawn stuff is currently visible. Added
	gimp_draw_tool_is_drawn() to obtain it.

	* app/tools/gimpbrushtool.c (gimp_brush_tool_draw): don't create
	the brush outline segments for the purpose of undrawing (if we
	don't have the segments, we can hardly have drawn them before).
	Fixes artifacts when the brush is being scaled or changed.

	* app/core/gimpbrush.c: don't call brush_scale_mask() and
	brush_scale_pixmap() with zero width or height. Fixes warnings
	from these functions.


svn path=/trunk/; revision=21749
2007-01-21 19:54:57 +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 6ded475a12 app/core/gimpbrush.c (gimp_brush_class_init) gah, should use the right
2006-12-07  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_class_init)
	* app/core/gimpbrushgenerated.c (gimp_brush_generated_new): gah,
	should use the right binary for testing. Fixes the new spacing
	property.
2006-12-07 11:53:02 +00:00
Michael Natterer 7515d9b6dc made "spacing" a property.
2006-12-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c: made "spacing" a property.

	* app/core/gimpbrushgenerated-save.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c: use it. Don't access brush->spacing
	manually, always use accessors.
2006-12-06 00:01:27 +00:00
Michael Natterer 35f198e7b0 use brush_scale_pixmap(), not brush_scale_mask().
2006-11-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_real_scale_pixmap): use
	brush_scale_pixmap(), not brush_scale_mask().
2006-11-15 18:46:10 +00:00
Michael Natterer 1186dfd256 Properly abstract brush scaling:
2006-11-09  Michael Natterer  <mitch@gimp.org>

	Properly abstract brush scaling:

	* app/core/gimpbrush.[ch]: added virtual functions
	GimpBrush::scale_mask() and ::scale_pixmap() and default
	implementations which call the functions in base/brush-scale.c.

	* app/core/gimpbrushgenerated.c: factored out brush calculation to
	an internal utility function and call that function from ::dirty()
	and from the new ::scale_mask().

	* app/core/gimpbrushcore.c: use gimp_brush_scale_mask/pixmap()
	instead of using the lowlevel scale functions directly. Fixes the
	uglyness that we were scaling generated brushes instead of simply
	recalculating them in the right size.
2006-11-09 14:54:49 +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 5e7ce540c1 app/core/gimpbrush.c app/core/gimpbuffer.c app/core/gimpimagefile.c
2006-02-28  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpimagefile.c
	* app/core/gimppattern.c
	* app/dialogs/preferences-dialog.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprectselecttool.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpsizebox.c
	* app/widgets/gimptemplateeditor.c
	* plug-ins/imagemap/imap_statusbar.c: use U+00D7 MULTIPLICATION SIGN
	instead of x when displaying sizes.
2006-02-28 12:15:51 +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
Michael Natterer 34697840ed set the "tooltip" return value to NULL before calling the virtual
2005-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.c (gimp_viewable_get_description): set the
	"tooltip" return value to NULL before calling the virtual function.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimplayer.c
	* app/core/gimppaintinfo.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimptoolinfo.c (get_description): don't do it here.

	* app/core/gimpbuffer.c
	* app/core/gimppaintinfo.c: untabbify, cleanup.

	* app/core/gimpobject.c: emit "notify::name" whenerver the name
	changes, clenup.
2005-10-09 23:05:25 +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 93eab43eef Use the canonical form for signal names.
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names.
2005-05-27 16:51:39 +00:00
Michael Natterer 7abaab62e0 added virtual function GimpViewable::get_size() and public API
2005-05-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	GimpViewable::get_size() and public API gimp_viewable_get_size()
	which return width and height and a boolean indicating if the
	viewable has a size at all.
	Added default implementation of GimpViewable::get_popup_size()
	using the new get_size() API.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage.c
	* app/core/gimppattern.c: implement GimpViewable::get_size().

	* app/core/gimpbrush.c
	* app/core/gimppattern.c: removed GimpViewable::get_popup_size()
	implementations, the default one is good enough.

	* app/core/gimpbrushpipe.c (gimp_brush_pipe_get_popup_size):
	redirect to gimp_viewable_get_size() instead of duplicating its
	return values.

	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpview.c: allow pixbuf dragging out of any
	viewable that has a size.

	* app/widgets/gimpdrawabletreeview.c: removed pixbuf dragging code
	here.

	* app/widgets/gimpdnd.c: set gimp busy around encoding/decoding
	pixbufs into/from GtkSelectionData, because it can be a time
	consuming operation.
2005-05-25 10:05:17 +00:00
Michael Natterer 4ffe1f03d3 Added loading of Photoshop brushes. Fixes bug #163047:
2005-04-15  Michael Natterer  <mitch@gimp.org>

	Added loading of Photoshop brushes. Fixes bug #163047:

	* app/core/Makefile.am
	* app/core/gimpbrush-load.[ch]: new files holding all brush
	loading code. Added .abr loader based on a patch by Adrian
	Likins. Didn't add a new brush subclass as in the original patch,
	but only a loading function which loads the brushes into standard
	GimpBrush objects. Did misc fixes to the code, needs further
	cleanup.

	* app/core/gimpbrush.[ch]: removed brush loading code here.

	* app/core/gimpbrushpipe.c: changed #includes accordingly.

	* app/core/gimp.c (gimp_real_initialize): register the new load
	functions and their extensions with the brush factory.
2005-04-15 15:56:34 +00:00
Sven Neumann 648cccde5e app/base/base.c app/base/temp-buf.c app/base/tile-swap.c
2005-02-07  Sven Neumann  <sven@gimp.org>

	* app/base/base.c
	* app/base/temp-buf.c
	* app/base/tile-swap.c
	* app/config/gimpconfig-file.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdata.c
	* app/core/gimpenvirontable.c
	* app/core/gimpgradient-load.c
	* app/core/gimpgradient-save.c
	* app/core/gimppalette-import.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/dialogs/user-install-dialog.c
	* app/gui/session.c
	* app/menus/menus.c
	* app/widgets/gimpdevices.c: use gstdio wrappers.
2005-02-07 01:24:22 +00:00
William Skaggs 15fb7b6f18 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpbrush.c: don't ask for preview with
	zero width or height, fixes bug #162232.

	* app/base/brush-scale.c: remove tabs and trailing
	whitespace.
2004-12-26 18:18:17 +00:00
Simon Budig 1eb3009f1a Added optional spikes for the generated brushes, enabling star shaped
2004-08-01  Simon Budig  <simon@gimp.org>

	* app/core/gimpbrushgenerated.[ch]: Added optional spikes for
	the generated brushes, enabling star shaped generated brushes.

	* app/widgets/gimpbrusheditor.[ch]: GUI for this.

	* app/core/gimpbrush.c: changed accordingly.
2004-08-01 17:20:00 +00:00
Simon Budig c40e29399d app/core/core-enums.h Implement three different brush shapes for generated
2004-08-01  Simon Budig  <simon@gimp.org>

	* app/core/core-enums.h
	* app/core/gimpbrushgenerated.[ch]: Implement three different
	brush shapes for generated brushes.

	* app/core/gimpbrush.c: changed accordingly.
	* app/core/core-enums.c: regenerated.

	* app/widgets/gimpbrusheditor.[ch]: Add toggles for the shape.
	* themes/Default/images/stock-brush-generated-*-16.png: New stock
	icons for the brush shapes.

	* themes/Default/images/Makefile.am
	* libgimpwidgets/gimpstock.[ch]: changed accordingly

	untabified the files touched.
2004-08-01 03:06:58 +00:00
Michael Natterer 638f2b3a9c added "gboolean writable" to the GimpDataFactoryLoaderEntry struct. Return
2004-07-26  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdatafactory.h: added "gboolean writable" to the
	GimpDataFactoryLoaderEntry struct. Return a GList* instead of
	GimpData* from GimpDataLoadFunc so it's possible to load more than
	one data object from one file.

	* app/core/gimpdatafactory.c (gimp_data_factory_load_data):
	changed accordingly: add all items of the returned lists to the
	data factory. Make the data object writable only if it's in the
	writable path *and* its loader entry says it's a writable format
	*and* the returned list contains exactly one element.

	* app/core/gimp.c (gimp_real_initialize): declare all loader
	entries as writable where we have code to read and write exactly
	one object per file; all others are not writable.

	* app/core/gimpbrush.[ch]
	* app/core/gimpbrushgenerated.[ch]
	* app/core/gimpbrushpipe.[ch]
	* app/core/gimpgradient-load.[ch]
	* app/core/gimppalette.[ch]
	* app/core/gimppattern.[ch] (all load functions): return a list
	containing the loaded object instead of the object itself.
2004-07-26 19:00:22 +00:00
Michael Natterer 140d3d5c01 reordered parameters and members to be consistent with other places where
2004-06-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrushgenerated.[ch]: reordered parameters and
	members to be consistent with other places where generated
	brushes are used. Check for errors when loading a brush and
	utf8-validate its name. Cleanup.

	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c: cleanup.
2004-06-25 13:41:24 +00:00
Michael Natterer 4d24bdbf81 Some code review:
2004-02-18  Michael Natterer  <mitch@gimp.org>

	Some code review:

	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c: removed obsolete code which
	made sure serialize_property()/deserialize_property() are only
	called for properties of the correct class. We do it the right way
	for quite a while now and clear the inherited function pointers in
	gimp_config_iface_base_init().

	* app/config/gimprc.c (gimp_rc_dispose): don't forget to chain up.

	* app/base/gimplut.c
	* app/base/lut-funcs.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-serialize.c
	* app/config/gimpconfig-types.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimpbrush.c
	* app/core/gimpcontainer.c
	* app/core/gimpdocumentlist.c
	* app/core/gimpitem.c
	* app/gui/about-dialog.c
	* app/gui/color-notebook.c
	* app/gui/gui.c
	* app/gui/tips-dialog.c
	* app/paint/gimppaintcore.c
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpcolorpanel.c
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimpselectioneditor.c: removed I/O includes from
	files which don't use lowlevel APIs any more. Also removes
	a whole bunch of G_OS_WIN32 special casing. Removed trailing
	whitespace. Misc tiny cleanups.
2004-02-18 13:43:50 +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
Sven Neumann a70698c4d9 removed file_utils_filename_to_utf8() ...
2004-01-19  Sven Neumann  <sven@gimp.org>

	* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...

	* libgimpbase/gimputils.[ch]: ... and added it here as
	gimp_filename_to_utf8(). Added some docs that promise less than
	the current implementation holds so that we can change the
	implementation later.

	* app/*/*.c: use gimp_filename_to_utf8() where
	file_utils_filenames_to_utf8() has been used before.

	* libgimpbase/gimpbase.def: changed accordingly.

	* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-19 01:08:43 +00:00
Tor Lillqvist 18485018b3 Add new function file_utils_filename_to_utf8(), which is to be used when
2004-01-14  Tor Lillqvist  <tml@iki.fi>

	* app/file/file-utils.[ch]: Add new function
	file_utils_filename_to_utf8(), which is to be used when converting
	file names (which are kept in the on-disk encoding) to UTF-8 for
	passing to GTK, or to g_print() etc.

	* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
	of the warnings generated by non-UTF8 pathnames. See #130118.

	* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
	strings in the on-disk encoding.

	* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
	g_filename_to_utf8()) before passing to g_print().
2004-01-14 02:03:37 +00:00
Sven Neumann dab006d51d removed the unused GimpViewable parameter from
2003-11-17  Sven Neumann  <sven@gimp.org>

	* app/core/gimpviewable.[ch]: removed the unused GimpViewable
	parameter from gimp_viewable_calc_preview_size().

	* app/core/gimpbuffer.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimagefile.c
	* app/core/gimpitem-preview.c
	* app/core/gimpundo.c
	* app/widgets/gimppreview.c
	* app/widgets/gimppreviewrendererdrawable.c
	* app/widgets/gimppreviewrendererimage.c: changed accordingly.

	* app/widgets/gimppreviewrenderer.[ch]: store the viewable_type in
	the preview renderer and use its default stock_id if no viewable
	is set.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c: set a default stock_id.
2003-11-17 13:34:38 +00:00
Sven Neumann fd30d5c976 app/config/gimpbaseconfig.h use gint64 for all memsize properties.
2003-11-16  Sven Neumann  <sven@gimp.org>

	* app/config/gimpbaseconfig.h
	* app/config/gimpcoreconfig.h: use gint64 for all memsize properties.

	* app/base/tile-manager.[ch] (tile_manager_get_memsize): since
	tiles can be swapped out, a tilemanager can be larger than gsize
	(on 32bit platforms). Use a gint64 to avoid an overflow.

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimpimage-undo.[ch]
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimpitemundo.[ch]
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimpobject.[ch]
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.[ch]
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptext.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: use gint64 for gimp_object_get_memsize()
	and all its implementations.

	* app/display/gimpdisplayshell-title.c
	* app/gui/info-window.c: changed accordingly.
2003-11-16 17:51:36 +00:00
Michael Natterer 1f6695f4f4 fixed order of parameters after message change.
2003-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_load_brush): fixed order of
	parameters after message change.
2003-11-14 16:46:45 +00:00
Michael Natterer 6eb772946b libgimpwidgets/gimpquerybox.c configure the labels in the message dialog
2003-11-14  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpquerybox.c
	* app/widgets/gimpwidgets-utils.c: configure the labels in the
	message dialog and the query boxes to do automatic word wrapping
	to be HIG compliant.

	* app/app_procs.c
	* app/batch.c
	* app/config/gimpconfig-deserialize.c
	* app/config/gimpconfig-path.c
	* app/config/gimpconfig-utils.c
	* app/config/gimpconfigwriter.c
	* app/config/gimpscanner.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpdatafactory.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell.c
	* app/file/file-utils.c
	* app/gui/brush-select.c
	* app/gui/dialogs-commands.c
	* app/gui/drawable-commands.c
	* app/gui/edit-commands.c
	* app/gui/file-commands.c
	* app/gui/file-new-dialog.c
	* app/gui/font-select.c
	* app/gui/gradient-select.c
	* app/gui/gui.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/palette-select.c
	* app/gui/palettes-commands.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c
	* app/gui/select-commands.c
	* app/gui/stroke-dialog.c
	* app/gui/tool-options-menu.c
	* app/gui/vectors-commands.c
	* app/gui/view-commands.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in.c
	* app/plug-in/plug-ins.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimptransformtool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdatafactoryview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimptemplateview.c
	* app/widgets/gimptooloptionseditor.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/image.pdb: removed explicit newlines from
	messages. Reduced number of translatable strings by making many
	file error messages the same. Quote single words and filenames
	with 'foo', not "foo". Replaced some more "drawable" by "layer".
	General message cleanup and consistency check.

	* app/pdb/image_cmds.c: regenerated.
2003-11-14 15:33:40 +00:00
Sven Neumann d86e5895a9 app/core/gimpbrush.c (gimp_brush_load_brush) use proper conversion from
2003-11-09  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_load_brush)
	* plug-ins/common/gbr.c (load_image): use proper conversion from
	16bit float to 8bit integer.
2003-11-09 20:52:01 +00:00
Sven Neumann 40d1e3fb1c read pixmap brushes in chunks of 8192 bytes in order to speed up loading.
2003-11-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c (gimp_brush_load_brush): read pixmap
	brushes in chunks of 8192 bytes in order to speed up loading.
2003-11-06 12:24:08 +00:00
Sven Neumann 38a22735d7 app/core/gimpbrush.c added support for loading cinepaint brushes (GIMP
2003-11-05  Sven Neumann  <sven@gimp.org>

	* app/core/gimpbrush.c
	* plug-ins/common/gbr.c: added support for loading cinepaint
	brushes (GIMP brush version 3).
2003-11-05 23:55:44 +00:00
Michael Natterer e18793056f new function which takes any string and returns UTF-8 (it returns
2003-10-16  Michael Natterer  <mitch@gimp.org>

	* libgimpbase/gimputils.[ch]: new function which takes any string
	and returns UTF-8 (it returns "(invalid UTF-8 string)" if all
	conversion attempts fail).

	* app/core/gimpbrush.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/xcf/xcf-read.c: use it. Fixes bug #79897.
2003-10-16 12:24:58 +00:00
Manish Singh f9c41aa864 app/core/gimpbrush.c app/core/gimpbrushgenerated.c
2003-08-28  Manish Singh  <yosh@gimp.org>

        * app/core/gimpbrush.c
        * app/core/gimpbrushgenerated.c
        * app/core/gimpbrushpipe.c
        * app/core/gimpbuffer.c
        * app/core/gimpimage-snap.c
        * app/core/gimppattern.c
        * app/core/gimpundostack.c
        * app/display/gimpdisplayshell.c
        * app/gui/grid-dialog.c
        * plug-ins/common/CML_explorer.c: cleanup, remove unnecessary casts.
2003-08-28 23:33:15 +00:00
Michael Natterer 24f3da165b changed GimpObject::get_memsize() to return a second value named
2003-08-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpobject.[ch]: changed GimpObject::get_memsize() to
	return a second value named "gui_size", where the primary return
	value is the "constant" actual size (as long as no operation is
	performed on the object), and the second "gui_size" return value
	is the size of temporary stuff like preview caches or boundary
	segments (which may change asynchronously, even if the object is
	on the undo stack).

	* app/core/gimp.c
	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer.c
	* app/core/gimpcontext.c
	* app/core/gimpdata.c
	* app/core/gimpdatafactory.c
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage-undo.c
	* app/core/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplist.c
	* app/core/gimppalette.c
	* app/core/gimpparasitelist.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c
	* app/core/gimpundostack.c
	* app/core/gimpviewable.c
	* app/text/gimptextlayer.c
	* app/vectors/gimpstroke.c
	* app/vectors/gimpvectors.c: changed get_memsize() implementations
	accordingly.

	* app/display/gimpdisplayshell-title.c
	* app/gui/debug-commands.c
	* app/widgets/gimppreview.c: changed callers accordingly.

	* app/core/gimpimage-undo-push.c: changed layer, channel, vectors
	and layer_mask undo steps to add/subtract the size of the
	resp. objects whenever they take/drop ownership of them. Ignore
	the objects' "gui_size" to get identical sizes on
	adding/subtracting. Fixes bug #120429.
2003-08-25 10:49:33 +00:00
Michael Natterer 5096672060 app/core/gimpbrush.c app/paint/gimppaintcore.c app/tools/gimpcurvestool.c
2003-07-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpbrush.c
	* app/paint/gimppaintcore.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimptool.c
	* app/tools/tool_manager.h: removed trailing whitespace.
2003-07-10 12:13:21 +00:00
Michael Natterer 99d93b9255 added vitrual function GimpViewable::get_description() which returns the
2003-04-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added vitrual function
	GimpViewable::get_description() which returns the string that
	should be presented to the user plus an optional tooltip with more
	information. The default implementation just returns the object's
	name and no tooltip.

	* app/core/gimpbrush.c
	* app/core/gimpbuffer.c
	* app/core/gimpimage.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimptoolinfo.c: implement get_description().

	* app/core/gimpimagefile.[ch]: ditto. Renamed
	gimp_imagefile_get_description() to
	gimp_imagefile_get_desc_string(). Well, um, gimme a better name...

	* app/gui/file-open-dialog.c: changed accordingly.

	* app/file/file-utils.[ch]: renamed readXVThumb() to
	file_utils_readXVThumb().

	* tools/pdbgen/pdb/fileops.pdb: changed accordingly.

	* app/widgets/widgets-types.h: removed GimpItemGetNameFunc typedef.

	* app/widgets/gimpcontainerview-utils.[ch]: removed the the actual
	get_name_funcs. They now live in the core as
	GimpViewable::get_description() implementations.

	* app/widgets/gimpcontainermenu.[ch]
	* app/widgets/gimpcontainergridview.c
	* app/widgets/gimpcontainermenuimpl.c
	* app/widgets/gimpcontainertreeview.c
	* app/widgets/gimpcontainerview.[ch]
	* app/widgets/gimpmenuitem.[ch]
	* app/widgets/gimpviewabledialog.c: removed get_name_func stuff
	and use gimp_viewable_get_description().

	* app/widgets/gimpcontainermenu.[ch]: added "preview_border_width"
	to gimp_container_menu_set_preview_size().

	* app/widgets/gimpimagedock.c: changed accordingly.

	* app/pdb/fileops_cmds.c: regenerated.
2003-04-08 16:01:01 +00:00
Sven Neumann 28fddfd554 Makefile.am removed this header file.
2003-03-25  Sven Neumann  <sven@gimp.org>

	* Makefile.am
	* gimpintl.h: removed this header file.

	* gimpmiscui.c: include libgimp-intl.h.

	* gimp.c (gimp_main): call setlocale() and bind to the libgimp
	textdomain so that plug-ins don't need to do that explicitely.

	* libgimp/stdplugins-intl.h: added the functionality that used to
	live in gimpintl.h and removed the libgimp related stuff. Got rid
	of the INIT_I18N_UI() macro.

	* plug-ins/*/*.c: removed all occurances of INIT_I18N_UI().
	Plug-ins simply call INIT_I18N() once in their run() function.

	* plug-ins/script-fu/script-fu-intl.h: added the functionality
	that used to live in gimpintl.h and removed the libgimp related
	stuff.

	* app/Makefile.am
	* app/gimp-intl.h: new file that defines the gettext macros for
	the GIMP core.

	* app/*/*.c: include gimp-intl.h instead of libgimp/gimpintl.h.

	* plug-ins/script-fu/scripts/test-sphere.scm: fixed typos.
2003-03-25 16:38:19 +00:00
Michael Natterer 0614aa5329 added virtual function get_popup_size() which returns a boolean indicating
2003-02-27  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added virtual function
	get_popup_size() which returns a boolean indicating if a popup is
	needed and its size.

	* app/core/gimpbrush.c
	* app/core/gimpbrushpipe.c
	* app/core/gimpbuffer.c
	* app/core/gimpdrawable-preview.[ch]
	* app/core/gimpdrawable.c
	* app/core/gimpgradient.c
	* app/core/gimpimage.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c
	* app/core/gimpundo.c: implement it.

	* app/widgets/gimppreview.[ch]: removed virtual functions
	needs_popup() and create_popup(). Removed the code which creates
	the popup and the popup members of the GimpPreview struct.

	* app/widgets/gimppreview-popup.[ch]: new files providing the
	utility function gimp_preview_popup_show() which can show popups
	from any widget, not just from a GimpPreview. Checks if a popup is
	needed using gimp_viewable_get_popup_size().

	* app/widgets/gimpcellrendererviewable.c: show popups here too.

	* app/widgets/gimpbrushpreview.c
	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpimagepreview.c: removed needs_popup() and
	create_popup() implementations.

	* app/widgets/gimpnavigationpreview.c: removed empty render()
	implementation.

	* app/widgets/gimpundoeditor.c: use a tree instead of a list view.

	* app/widgets/gimpgradientpreview.[ch]
	* app/widgets/gimppalettepreview.[ch]
	* app/widgets/gimppatternpreview.[ch]: removed because they only
	implemented the removed popup functions.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpmenuitem.c
	* app/widgets/gimppreview-utils.c: changed accordingly
2003-02-27 13:59:41 +00:00
Michael Natterer 2d5828ec2d added "gchar *stock_id" to the GimpViewable struct. It is used by the GUI
2003-02-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpviewable.[ch]: added "gchar *stock_id" to the
	GimpViewable struct. It is used by the GUI if the get_preview()
	functions return NULL. Default to GTK_STOCK_DIALOG_QUESTION.

	* app/core/gimptoolinfo.[ch]: set the tool's stock_id. Removed
	the cached GdkPixbuf. Don't implement any preview function
	so the GUI uses the stock_id.

	* app/tools/tool_manager.c: removed GdkPixbuf creation, removed
	the #warning about the buggy way we created the pixbuf.

	* app/gui/dialogs-constructors.c
	* app/gui/image-menu.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimptoolbox.c: use viewable->stock_id instead
	of tool_info->stock_id.

	* app/core/gimpbrush.c
	* app/core/gimpgradient.c
	* app/core/gimpimagefile.c
	* app/core/gimpundo.c: simplified get_preview() implementations:

	- never scale previews up, only down.
	- don't render white or checks backgrounds but simply return
	  TempBufs with alpha and let the preview system do its job.
	- don't add padding but simply return previews smaller than
	  requested.

	* app/display/gimpdisplayshell-render.[ch]: added
	"render_blend_white", a 2d lookup table for blending on white,
	just as the check lookup tables. Added "render_white_buf".

	* app/widgets/gimppreview.[ch]: changed a lot:

	- don't render the preview's border into the buffer.
	- added "GdkGC *border_gc" and draw the preview's border in expose()
	  using gdk_draw_rectangle().
	- added "GdkPixbuf *no_preview_pixbuf" and create it in
	  gimp_preview_real_render() if gimp_viewable_get_preview()
	  returned NULL.
	- factored the actual preview rendering out to
	  gimp_preview_render_to_buffer(). Added configurable background
	  rendering for the preview itself and it's padding area
	  (the area the preview is larger than the buffer returned
	  by gimp_viewable_get_preview()).
	- changed gimp_preview_render_and_flush() to
	  gimp_preview_render_preview() and added "inside_bg" and
	  "outside_bg" parameters.
	- use the new render buffers for blending on white.

	* app/widgets/gimpbrushpreview.c
	* app/widgets/gimpbufferpreview.c
	* app/widgets/gimpdrawablepreview.c
	* app/widgets/gimpgradientpreview.c
	* app/widgets/gimpimagepreview.c
	* app/widgets/gimppalettepreview.c
	* app/widgets/gimppatternpreview.c: don't create large white
	TempBufs to center the previews in but simply set the TempBuf's
	offsets to get them centered. Simplified & cleaned up many preview
	render functions. Pass the correct GimpPreviewBG modes to
	gimp_preview_render_preview().

	* app/widgets/gimpcellrendererviewable.[ch]: new GtkCellRenderer
	class derived from GtkCellRendererPixbuf which knows how
	to use gimp_viewable_get_preview_size() and renders the
	viewable's stock item if no preview can be created.

	* app/widgets/gimpcontainertreeview.c: added a GtkTreeCellDataFunc
	which creates the preview pixbuf if needed so we don't create it
	unconditionally upon item insertion. Fixed preview size assertion
	to use GIMP_PREVIEW_MAX_SIZE, not "64". Block "selection_changed"
	while reordering the selected item.

	* app/widgets/gimpcontainerview.c: cosmetic.

	* app/widgets/gimpimagefilepreview.[ch]
	* app/widgets/gimptoolinfopreview.[ch]
	* app/widgets/gimpundopreview.[ch]: removed because the default
	implementation is good enough.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimppreview-utils.c: changed accordingly.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs-menu.c
	* app/gui/dialogs.c
	* app/gui/image-menu.c
	* app/gui/toolbox-menu.c: register grid and tree view variants
	of the document history.

	Unrelated:

	* app/gui/gui.c (gui_exit_finish_callback): disconnect from
	signals earlier.

	* app/gui/user-install-dialog.c: create the "tool-options" subdir
	of the user's ~/.gimp-1.3 directory.
2003-02-26 16:15:50 +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