Commit Graph

11242 Commits

Author SHA1 Message Date
Michael Natterer b258af7af8 take the layout line's x coordinate into account so the stuff works for
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): take the
	layout line's x coordinate into account so the stuff works for
	right-aligned or centered text.


svn path=/trunk/; revision=27440
2008-10-27 11:49:19 +00:00
Michael Natterer 50f043c3a2 argh, need to speak in byte offsets not character offsets. Do so and avoid
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): argh, need
	to speak in byte offsets not character offsets. Do so and avoid
	getting the buffer's text on each keystroke just to do the
	char/byte conversion. Will use the same method for all the other
	places which do similar things.

	(gimp_text_tool_connect): minor cleanup.


svn path=/trunk/; revision=27439
2008-10-27 11:00:15 +00:00
Sven Neumann edf9690e00 iterate over the tiles instead of rendering row-by-row.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayer.c (gimp_text_layer_render_layout):
	iterate over the tiles instead of rendering row-by-row.


svn path=/trunk/; revision=27438
2008-10-27 08:34:07 +00:00
Sven Neumann a725329cda no need to define PANGO_ENABLE_ENGINE
svn path=/trunk/; revision=27437
2008-10-27 08:21:29 +00:00
Sven Neumann 63f6dcb111 use the Y resolution when creating the fontmap.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout.c (gimp_text_get_pango_context): use 
the
	Y resolution when creating the fontmap.


svn path=/trunk/; revision=27436
2008-10-27 08:20:02 +00:00
Sven Neumann 71c94ca541 removed unused defines
svn path=/trunk/; revision=27435
2008-10-27 08:16:46 +00:00
Sven Neumann 819c5a6670 minor cleanup.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_trafo):
	minor cleanup.


svn path=/trunk/; revision=27434
2008-10-27 08:15:06 +00:00
Sven Neumann edec220dac cleanup, removed unused includes.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/text/gimptext-bitmap.c: cleanup, removed unused includes.


svn path=/trunk/; revision=27433
2008-10-27 08:11:41 +00:00
Sven Neumann 033fcf1628 added new enum GimpTextHintStyle.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpTextHintStyle.

	* libgimp/gimpenums.c.tail
	* tools/pdbgen/enums.pl: regenerated.

	* app/text/gimptext.[ch]: added new property "hint-style". 
Removed
	"autohint" property and mapped the boolean property "hinting" to
	the new enum property "hint-style".

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	use "hint-style".

	* app/tools/gimptextoptions.[ch]: changed tool options 
accordingly.

	* tools/pdbgen/pdb/text_layer.pdb: deprecated the "hinting" API
	and introduced getters and setters for "hint-style".

	* app/pdb/text-layer-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimptextlayer_pdb.[ch]: regenerated.


svn path=/trunk/; revision=27432
2008-10-27 07:59:32 +00:00
Michael Natterer cd0885518b add gimp_draw_tool_set_clip_rect() which transforms the passed in
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_set_clip_rect()
	which transforms the passed in GdkRectangle before setting it
	on the canvas.

	* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
	of gimp_canvas_set_clip_rect().


svn path=/trunk/; revision=27431
2008-10-27 00:10:13 +00:00
Michael Natterer e16b92298d add integer x_pos member to remember the x cursor position when moving up
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.h: add integer x_pos member to remember
	the x cursor position when moving up and down across shorter
	lines.

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): implement
	moving the cursor up and down. The x_pos probably needs to be
	reset in a few more places but it seems to work pretty nicely
	already.


svn path=/trunk/; revision=27430
2008-10-26 23:30:23 +00:00
Michael Natterer cabd52129e handle Tab, some more cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: handle Tab, some more cleanup.


svn path=/trunk/; revision=27429
2008-10-26 21:50:20 +00:00
Sven Neumann 2224986130 comments
svn path=/trunk/; revision=27428
2008-10-26 21:42:21 +00:00
Sven Neumann 81e7609827 formatting.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c 
(gimp_text_layout_render_flags):
	formatting.


svn path=/trunk/; revision=27427
2008-10-26 21:23:01 +00:00
Michael Natterer 63b67cc716 more cleanup, mostly formatting.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: more cleanup, mostly formatting.


svn path=/trunk/; revision=27426
2008-10-26 20:46:50 +00:00
Martin Nordholts c13cfffad7 Clamp Grain Extract, Grain Merge and Divide.
* app/gegl/gimpoperationpointlayermode.c: Clamp Grain Extract,
Grain Merge and Divide.

svn path=/trunk/; revision=27425
2008-10-26 20:36:25 +00:00
Michael Natterer ef66f5423f some formatting cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: some formatting cleanup.

	* app/tools/gimprectangletool.c: add one space.

	* app/actions/text-tool-actions.c: look at GDK_SELECTION_CLIPBOARD,
	not PRIMARY, to set the sensitivity of "Paste".


svn path=/trunk/; revision=27424
2008-10-26 20:05:11 +00:00
Michael Natterer 3a51f9b75f some general formatting cleanup.
2008-10-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.[ch]: some general formatting cleanup.

	(gimp_text_tool_key_press): implement ctrl-moving the cursor by
	words, handle Delete.

	(gimp_text_tool_delete_text): add boolean "backspace" parameter
	and delete forward when it's FALSE.

	* app/actions/text-tool-commands.c: pass an arbitrary TRUE to
	gimp_text_tool_delete_text() (it's not used because when called
	from here, there is always a selection).


svn path=/trunk/; revision=27423
2008-10-26 19:54:27 +00:00
Martin Nordholts f9502d5abd Remove braces in formulas, makes everything look cleaner.
* app/gegl/gimpoperationpointlayermode.c: Remove braces in
formulas, makes everything look cleaner.

svn path=/trunk/; revision=27422
2008-10-26 19:39:07 +00:00
Martin Nordholts 5bb194a21d Clamp Addition and Subtract so that we acheieve consistent blending
* app/gegl/gimpoperationpointlayermode.c: Clamp Addition and
Subtract so that we acheieve consistent blending results. Also,
our Addition is fine, it is the formula for 'plus' in the SVG 1.2
draft that is wrong as far as I can see.

svn path=/trunk/; revision=27421
2008-10-26 19:28:47 +00:00
Martin Nordholts 65714a8ceb Continue the quest of overviewable and readable blend formulas. The macro
* app/gegl/gimpoperationpointlayermode.c: Continue the quest of
overviewable and readable blend formulas. The macro now expands to
entire case-statements.

svn path=/trunk/; revision=27420
2008-10-26 17:43:46 +00:00
Michael Natterer ee414d9e6f Merge on-canvas GSoC project:
2008-10-26  Michael Natterer  <mitch@gimp.org>

	Merge on-canvas GSoC project:

	* configure.in: check for pangocairo.

	* app/Makefile.am
	* app/text/Makefile.am: add its CFLAGS and LIBS.

	* app/text/gimptext-bitmap.[ch]
	* app/text/gimptext-private.h
	* app/text/gimptext-vectors.[ch]
	* app/text/gimptextlayer.c
	* app/text/gimptextlayout-render.c
	* app/text/gimptextlayout.c: port to pangocairo.

	* menus/Makefile.am
	* menus/text-tool-menu.xml
	* app/menus/menus.c
	* app/actions/Makefile.am
	* app/actions/actions.c
	* app/actions/text-tool-actions.[ch]
	* app/actions/text-tool-commands.[ch]: add a context menu for the
	text tool similar to GtkEntry's context menu.

	* app/tools/gimprectangletool.[ch]: add "narrow-mode" property.

	* app/tools/gimptextoptions.[ch]
	* app/widgets/gimptexteditor.[ch]: take a text buffer for the
	standalone text editor window instead of creating one internally.

	* app/tools/gimptexttool.[ch]: all the new wonderful on-canvas
	text editing logic. Wheee!


svn path=/trunk/; revision=27419
2008-10-26 17:39:55 +00:00
Sven Neumann b8d8f14749 added missing return value.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptool.c (gimp_tool_get_popup): added
	missing return value.


svn path=/trunk/; revision=27418
2008-10-26 16:36:01 +00:00
Sven Neumann 076541df9a added missing return value.
2008-10-26  Sven Neumann  <sven@gimp.org>

	* app/tools/tool_manager.c (tool_manager_get_popup_active): 
added
	missing return value.


svn path=/trunk/; revision=27417
2008-10-26 16:31:52 +00:00
Michael Natterer 68e6d7a610 Add some infrastructure for the on-canvas text editing GSoC project:
2008-10-26  Michael Natterer  <mitch@gimp.org>

	Add some infrastructure for the on-canvas text editing GSoC
	project:

	* app/tools/gimptoolcontrol.[ch]: add boolean wants_all_key_events
	member and API to set and get it.

	* app/tools/gimptool.[ch]: add GimpTool::get_popup() which returns
	the tool's context menu if it has one, or NULL otherwise.

	* app/tools/tool_manager.[ch]: add tool_manager_get_popup_active()
	wrapper.

	* app/display/gimpdisplayshell-callbacks.c: check if the tool has
	a popup menu and show it instead of the usual right-click menu.

	Also call the tool's key_press() unconditionally if it wants all
	key events, but this code needs more thinking.


svn path=/trunk/; revision=27416
2008-10-26 16:25:24 +00:00
Martin Nordholts 21fce4e9b4 Increase readability by introducing short aliases.
* app/gegl/gimpoperationpointlayermode.c: Increase readability by
introducing short aliases.

svn path=/trunk/; revision=27413
2008-10-26 14:39:08 +00:00
Martin Nordholts 7e6f2fc304 For blend modes with conditions, fix so that the conditions are per color
* app/gegl/gimpoperationpointlayermode.c: For blend modes with
conditions, fix so that the conditions are per color
channel. Acheived by introducing a nice little preprocessor macro.

svn path=/trunk/; revision=27412
2008-10-26 14:19:38 +00:00
Martin Nordholts adc118ec9c Enable the [0..1] clamping of the output for Dodge and Burn. Without the
* app/gegl/gimpoperationpointlayermode.c: Enable the [0..1]
clamping of the output for Dodge and Burn. Without the clamping
one gets inconsistent results when blending together identical
layers but with different opacities. Maybe we should make the
clamping configurable and introduce a HDR compositing mode or
something?

svn path=/trunk/; revision=27411
2008-10-26 13:48:19 +00:00
Martin Nordholts a25fefff04 Implemented Grain Extract and Grain Merge. Also corrected the formula for
* app/gegl/gimpoperationpointlayermode.c: Implemented Grain
Extract and Grain Merge. Also corrected the formula for Divide.

Works the same for 100% opaque layers:
 o Grain Extract
 o Grain Merge

svn path=/trunk/; revision=27410
2008-10-26 08:39:41 +00:00
Martin Nordholts cdb3f70184 Implement a bunch of layer modes. Use the exact SVG 1.2 formula for layer
* app/gegl/gimpoperationpointlayermode.c: Implement a bunch of
layer modes. Use the exact SVG 1.2 formula for layer modes that
have a counterpart in SVG 1.2. Don't clamp the result to [0..1]
for Dodge and Burn though as we don't need to. Maybe we *should*
clamp from a compositing point of view, I'm not sure. Also
reformat the code a bit for readability.

Keep in mind that we now treat the opacity of all layers the same
indepentant of the layer mode. That is why most of the new
implementations doesn't work the same as the legacy ones when
transparency is involved, only when the layers are completely
opaque. Another important property for all layer modes implemented
below is that compositing onto complete transparency gives the
same result as if the layer would have been in Normal blending
mode.

The status of the new layer mode implementations compared to the
legacy implementations is as follows:

Completely works the same:
 o Behind

Works the same for 100% opaque layers:
 o Multiply
 o Screen
 o Difference
 o Darken
 o Lighten
 o Dodge
 o Burn
 o Hard Light
 o Subtract
 o Divide

Works different but similar:
 o Overlay

Work in progress:
 o Soft Light

svn path=/trunk/; revision=27409
2008-10-25 22:44:19 +00:00
Martin Nordholts 1f7b2c257e Completed the rename with gimp:layer-mode -> gimp:point-layer-mode and
* app/gegl/gimpoperationpointlayermode.c: Completed the rename
with gimp:layer-mode -> gimp:point-layer-mode and also did some
formating.

* app/core/gimplayer.c: Changed accordingly.

svn path=/trunk/; revision=27408
2008-10-25 21:02:46 +00:00
Michael Natterer 6a7af472ea Bug 557870 – "Qmask" message popping up here and there
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Bug 557870 – "Qmask" message popping up here and there

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use
	gimp_viewable_get_description() instead of gimp_object_get_name()
	for displaying the active drawable's name so the quick mask and
	the floating selection have the same names as in the
	layers/channels dialogs.


svn path=/trunk/; revision=27405
2008-10-25 15:29:35 +00:00
Martin Nordholts 67c80e1574 Rename to
* app/gegl/gimpoperationlayermode.[ch]: Rename to

* app/gegl/gimpoperationpointlayermode.[ch]: so that we can later
create a common GimpOperationLayerMode class/interface for
non-point layer modes like GimpOperationDissolveLayerMode.

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c
* app/gegl/gegl-types.h: Adjust accordingly.

svn path=/trunk/; revision=27401
2008-10-25 14:16:22 +00:00
Martin Nordholts 1a19f7315a Instead of having one GEGL operation per layer mode, make
GimpOperationLayerMode instantiable and add a GimpLayerModeEffects
property to it that we check in ::process() to blend pixels
together.

* app/gegl/gimpoperationlayermode.[ch]: Do the change described
above. Currently only Normal and Addition are implemented. Normal
so that we don't need a special case for the gegl:normal op. Also,
the Dissolve layer mode is not a point op and needs to be
implemented elsewhere.

* app/gegl/gimpoperation*mode.c: Removed.

* app/gegl/gimp-gegl-utils.[ch]: Removed
gimp_layer_mode_to_gegl_operation().

* app/core/gimplayer.c

* app/gegl/Makefile.am
* app/gegl/gimp-gegl.c: Adapt.

svn path=/trunk/; revision=27400
2008-10-25 13:29:55 +00:00
Michael Natterer f0c79b81e3 Merge a modified and enhanced patch from the vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Merge a modified and enhanced patch from the vector layer branch:

	* app/core/gimpdrawable-stroke.[ch]: add new public API
	gimp_drawable_fill_boundary() and gimp_drawable_fill_vectors().

	Split the internal code up so that there are functions which turn
	the BoundSegs and GimpVectors into a GimpScanConvert and changed
	gimp_drawable_stroke_scan_convert() so it can either fill the
	shape or stroke it.


svn path=/trunk/; revision=27399
2008-10-25 13:12:48 +00:00
Michael Natterer 39af762f61 More merging from SOC 2006's vector layer branch:
2008-10-25  Michael Natterer  <mitch@gimp.org>

	More merging from SOC 2006's vector layer branch:

	* app/core/gimpitem.[ch]: add "gboolean push_undo" to
	GimpItem::stroke().

	* app/core/gimpdrawable-stroke.[ch]
	* app/paint/gimppaintcore-stroke.[ch]
	* app/paint/gimppaintcore.[ch] (gimp_paint_core_finish): add
	"push_undo" parameters here too.

	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/dialogs/stroke-dialog.c
	* app/tools/gimppainttool.c
	* app/vectors/gimpvectors.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE all over the place.

	* app/pdb/edit-cmds.c
	* app/pdb/paint-tools-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27398
2008-10-25 11:59:03 +00:00
Martin Nordholts 5c05c609e4 Make layer modes work on premultiplied data. This makes compositing 40%
* app/gegl/gimpoperationlayermode.c: Make layer modes work on
premultiplied data. This makes compositing 40% faster on my test
image with 10 interlaced Normal and Addition mode layers.

* app/gegl/gimpoperationadditionmode.c: Switch to the
premultiplied algorithm and remove the experimental ones. The new
Addition mode has two important differences over the legacy
Addition mode:

  o Addition mode now really is commutative as the GIMP
    documentation says (this wasn't previously the case).

  o Layers in Addition mode are just as opaque as Normal
    layers. That is, their effect on the composite alpha channel
    is the same. For discussion, refer to bug #387449.

svn path=/trunk/; revision=27396
2008-10-25 09:47:09 +00:00
Michael Natterer f096382af5 formatting.
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimppaintoptions.h: formatting.


svn path=/trunk/; revision=27395
2008-10-25 09:18:49 +00:00
Michael Natterer a92925361b bail out if the notification is not about one of our own properties (but
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_parent_notify): bail out if
	the notification is not about one of our own properties
	(but from a subclass).


svn path=/trunk/; revision=27394
2008-10-25 09:14:16 +00:00
Michael Natterer efb6d15acf add "gboolean use_context_color" parameter to gimp_stroke_options_new()
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpstrokeoptions.[ch]: add "gboolean use_context_color"
	parameter to gimp_stroke_options_new() and set the passed context
	as parent of the new options only if it's TRUE. Also fixed the
	GimpConfig::duplicate() implementation to really duplicate the
	object and not just return an object containing default values.

	* app/core/gimpfilloptions.[ch]: add gimp_fill_options_new().

	* app/actions/select-commands.c
	* app/dialogs/stroke-dialog.c
	* app/actions/vectors-commands.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: pass TRUE to gimp_stroke_options_new().

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27393
2008-10-25 08:52:20 +00:00
Michael Natterer 90c26cf10e add non-serializable properties pattern-view-type and pattern-view-size
2008-10-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpfilloptions.[ch]: add non-serializable properties
	pattern-view-type and pattern-view-size which are used only by the
	new UI below.

	* app/widgets/gimpfilleditor.[ch]: added boolean edit-context
	property. If TRUE, add widgets to edit the context's foreground and
	pattern. Add "edit_context" parameter to gimp_fill_editor_new().

	* app/widgets/gimpstrokeeditor.[ch]: add the same parameter here.

	* app/widgets/gimpwidgets-utils.[ch]: add gimp_enum_radio_box_add()
	which does the same as the existing gimp_enum_radio_frame_add().

	* app/dialogs/stroke-dialog.c: pass FALSE for "edit_context"
	because this dialog takes its foreground and pattern from the user
	context and doesn't need it's own GUI for them.


svn path=/trunk/; revision=27392
2008-10-24 22:34:24 +00:00
Michael Natterer 9c299a8f03 app/widgets/Makefile.am app/widgets/widgets-types.h new widget factored
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpfilleditor.[ch]: new widget factored out of
	GimpStrokeEditor.

	* app/widgets/gimpstrokeeditor.[ch]: derive from GimpFillEditor
	and remove UI for the properties of GimpFillOptions.


svn path=/trunk/; revision=27390
2008-10-24 17:55:30 +00:00
Michael Natterer 1a453c37df app/core/Makefile.am app/core/core-types.h remove this mis-engineered
2008-10-24  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpstrokedesc.[ch]: remove this mis-engineered
	abstraction...

	* app/core/gimpstrokeoptions.[ch]: ...and add its properties and
	API here.

	* app/core/gimpitem.[ch]: GimpItem::stroke() take a
	GimpStrokeOptions instead of a GimpStrokeDesc.

	* app/core/gimpchannel.c
	* app/core/gimpselection.c
	* app/vectors/gimpvectors.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/dialogs/stroke-dialog.c
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly.

	* app/pdb/edit-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27388
2008-10-24 07:37:46 +00:00
Sven Neumann 4260576f0e to be on the safe side, always show hidden dialogs when the Tab key is
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c 
(gimp_dialog_factories_toggle):
	to be on the safe side, always show hidden dialogs when the Tab
	key is used. It should not be possible to get a Tab key-press
	while all displays are iconified, but you never know ...


svn path=/trunk/; revision=27385
2008-10-24 07:16:06 +00:00
Sven Neumann bf97ad3102 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-24  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/widgets/gimpdialogfactory.[ch]: renamed the new methods to
	gimp_dialog_factories_{show|hide}_with_display().
	Remember if the dialogs were hidden using
	gimp_dialog_factories_hide_with_display() or using
	gimp_dialog_factories_toggle() and keep this into account when
	making them visible again. This ensures that dialogs that were
	hidden using the Tab key won't be shown when the image window is
	uniconified.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): changed accordingly.


svn path=/trunk/; revision=27384
2008-10-24 06:48:56 +00:00
Michael Natterer 50ad791fff Another merge from the vector layer branch:
2008-10-24  Michael Natterer  <mitch@gimp.org>

	Another merge from the vector layer branch:

	* app/core/gimpstrokedesc.c (gimp_stroke_desc_new): make sure
	each stroke desc always has GimpPaintInfo.


svn path=/trunk/; revision=27383
2008-10-23 22:48:46 +00:00
Martin Nordholts 06b46fef6d For alpha compositing consistency, all layers should affect alpha in the
* app/gegl/gimpoperationadditionmode.c: For alpha compositing
consistency, all layers should affect alpha in the same way
independent of layer mode. Replace the compositing algorithm with
a version without the flaws discovered so far in the previous
ones. Don't use it yet though as it requires premultiplied data.

svn path=/trunk/; revision=27382
2008-10-23 22:14:44 +00:00
Sven Neumann 8626bed826 use the inverse of the scale factor so that we can multiply instead of
2008-10-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): use the inverse of the
	scale factor so that we can multiply instead of dividing in the
	loops.


svn path=/trunk/; revision=27380
2008-10-23 22:07:59 +00:00
Michael Natterer 3dfef0f15a rename GimpStrokeStyle to GimpFillStyle.
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle.

	* app/core/gimpfilloptions.[ch]
	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27379
2008-10-23 21:30:28 +00:00
Michael Natterer 67a5eaea68 Merge a part of SOC 2006's vector layer branch:
2008-10-23  Michael Natterer  <mitch@gimp.org>

	Merge a part of SOC 2006's vector layer branch:

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpfilloptions.[ch]: new GimpContext subclass factored
	out of GimpStrokeOptions. Has "style" and "antialias" properties.

	* app/core/gimpstrokeoptions.[ch]: derive from GimpFillOptions
	and remove said properties.

	* app/core/gimpdrawable-stroke.c
	(gimp_drawable_stroke_scan_convert): changed accordingly.


svn path=/trunk/; revision=27378
2008-10-23 21:18:39 +00:00
Michael Natterer d3d9724ee1 set proc_frame->procedure to NULL *after* calling gimp_plug_in_cleanup().
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocframe.c
	(gimp_plug_in_proc_frame_dispose): set proc_frame->procedure to
	NULL *after* calling gimp_plug_in_cleanup(). Fixes the crash on
	windows in bug #557061 (but not the bug).


svn path=/trunk/; revision=27376
2008-10-23 17:13:19 +00:00
Michael Natterer 3b053f79fa don't #include "libgimpwidgets/gimpwidgets.h".
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.h: don't #include
	"libgimpwidgets/gimpwidgets.h".

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/tools/gimpeditselectiontool.c: include it here.


svn path=/trunk/; revision=27375
2008-10-23 09:42:55 +00:00
Sven Neumann 45b41a76d1 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-23  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/display/gimpdisplay-foreach.[ch]: added utility function 
to
	get the number of visible (not withdrawn or iconified) displays.

	* app/widgets/gimpdialogfactory.[ch]: added functions to hide 
and
	show the dock windows. Changed gimp_dialog_factories_toggle() to
	use the new functions.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): hide the docks if the
	last display is iconified. Unhide them if a display is
	uniconified. Probably needs more work ...


svn path=/trunk/; revision=27374
2008-10-23 08:39:46 +00:00
Sven Neumann 06a983e34e removed check for Carbon and added a test for the target OS being Darwin
2008-10-23  Sven Neumann  <sven@gimp.org>

	* configure.in: removed check for Carbon and added a test for 
the
	target OS being Darwin instead.

	* app/config/gimpguiconfig.c: use PLATFORM_OSX instead of
	HAVE_CARBON to determine the default "web-browser" command.


svn path=/trunk/; revision=27370
2008-10-22 22:04:30 +00:00
Martin Nordholts 2427cc5495 Bug 556804 – Zoom drop down doesn't update
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-callbacks.c: Fix calls to
gimp_display_shell_scaled() when Resize window on zoom is enabled.

svn path=/trunk/; revision=27366
2008-10-22 19:02:00 +00:00
Sven Neumann 883cb6da5b set box->progress to NULL in destroy() and check for progress being NULL
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpprogressbox.c: set box->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27362
2008-10-22 11:01:15 +00:00
Sven Neumann 90bf1e42e5 Bug 555246 – gimp crashes when a file is opened while a preview is
2008-10-22  Sven Neumann  <sven@gimp.org>

	Bug 555246 – gimp crashes when a file is opened while a preview 
is
	generating

	* app/widgets/gimpthumbbox.c: set box->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27360
2008-10-22 07:26:49 +00:00
Sven Neumann b6ae85b74c app/core/gimpimagefile.c formatting.
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/plug-in/gimpplugin-progress.c: formatting.


svn path=/trunk/; revision=27357
2008-10-22 06:00:06 +00:00
Michael Natterer ff8e73ad0c set dialog->progress to NULL in destroy() and check for progress being
2008-10-21  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpfiledialog.c: set dialog->progress to NULL in
	destroy() and check for progress being NULL in various places so
	we don't crash on API calls after the widget is destroyed.


svn path=/trunk/; revision=27354
2008-10-21 19:23:44 +00:00
Sven Neumann 3bf04bd98c GEGL_IS_PARAM_SPEC_PATH() became GEGL_IS_PARAM_SPEC_FILE_PATH().
2008-10-21  Sven Neumann  <sven@sven>

	* app/tools/gimpgegltool.c (gimp_param_spec_duplicate):
	GEGL_IS_PARAM_SPEC_PATH() became GEGL_IS_PARAM_SPEC_FILE_PATH().


svn path=/trunk/; revision=27351
2008-10-21 14:25:23 +00:00
Sven Neumann 88340798f2 for the combo-box, strip known prefixes from the GEGL operation names and
2008-10-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpgegltool.c (gimp_gegl_tool_dialog): for the
	combo-box, strip known prefixes from the GEGL operation names 
and
	use icons instead.


svn path=/trunk/; revision=27350
2008-10-21 11:34:00 +00:00
Sven Neumann be7fb50cbb ref the GimpDisplay and GimpImageFile objects while holding a reference to
2008-10-21  Sven Neumann  <sven@gimp.org>

	* app/actions/file-commands.c (file_open_recent_cmd_callback): 
ref
	the GimpDisplay and GimpImageFile objects while holding a
	reference to them. Fixes a potential crash if GIMP is closed 
while
	the image is being loaded.


svn path=/trunk/; revision=27346
2008-10-21 07:51:08 +00:00
Martin Nordholts 7c351200b4 menus/image-menu.xml.in app/actions/debug-actions.c Create dump and
* menus/image-menu.xml.in
* app/actions/debug-actions.c
* app/actions/debug-commands.c: Create dump and non-dump
groups. Also added a tooltip to the Benchmark Projection action
and removed report of number of layers.

svn path=/trunk/; revision=27343
2008-10-20 17:21:21 +00:00
Sven Neumann 4c357c5f0d don't make the font size even smaller. We already use a smaller font in
2008-10-20  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimperrorconsole.c (gimp_error_console_init): 
don't
	make the font size even smaller. We already use a smaller font 
in
	the dock windows.


svn path=/trunk/; revision=27341
2008-10-20 13:48:55 +00:00
Sven Neumann 8c6a7e8843 use pointer coordinates from the passed event instead of calling
2008-10-20  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpgradienteditor.c (view_events) 
(control_events):
	use pointer coordinates from the passed event instead of calling
	gtk_widget_get_pointer().


svn path=/trunk/; revision=27340
2008-10-20 13:31:59 +00:00
Michael Natterer c75ce5af09 app/actions/debug-actions.c app/actions/debug-commands.[ch] rename
2008-10-19  Michael Natterer  <mitch@gimp.org>

	* app/actions/debug-actions.c
	* app/actions/debug-commands.[ch]
	* menus/image-menu.xml.in: rename
	debug-dump-projection-benchmarking to debug-benchmark-projection.


svn path=/trunk/; revision=27334
2008-10-19 17:05:03 +00:00
Martin Nordholts 509c025f39 Remove local channel offset defines.
* app/gegl/gimpoperationadditionmode.c: Remove local channel
offset defines.

svn path=/trunk/; revision=27331
2008-10-19 15:29:08 +00:00
Martin Nordholts 1bb7794cc3 Refer to the input as 'in' instead of 'src', the layer as 'layer' instead
* app/gegl/gimpoperation*mode.c: Refer to the input as 'in'
instead of 'src', the layer as 'layer' instead of 'aux', and the
result as 'out' instead of 'dest'.

svn path=/trunk/; revision=27329
2008-10-19 14:16:13 +00:00
Martin Nordholts e38ca5490a Rename the convenient channel offset defines from FOO_PIX to FOO as this
* app/base/base-types.h: Rename the convenient channel offset
defines from FOO_PIX to FOO as this increases readability.

* app/base/color-balance.c
* app/base/colorize.c
* app/base/desaturate.c
* app/base/hue-saturation.c
* app/base/siox.c
* app/base/threshold.c

* app/core/gimp-edit.c
* app/core/gimp-transform-region.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-convert.c
* app/core/gimpdrawable-stroke.c
* app/core/gimpdrawable.c
* app/core/gimpimage-convert.c
* app/core/gimpimage.c
* app/core/gimppalette-import.c
* app/core/gimppickable.c

* app/gegl/gimpoperation*mode.c
* app/gegl/gimpoperationcolorbalance.c
* app/gegl/gimpoperationcolorize.c
* app/gegl/gimpoperationhuesaturation.c
* app/gegl/gimpoperationlevels.c
* app/gegl/gimpoperationposterize.c
* app/gegl/gimpoperationthreshold.c

* app/paint-funcs/subsample-region.c

* app/paint/gimpclone.c
* app/paint/gimppaintbrush.c

* app/widgets/gimpviewrenderer.c: Adapt.

svn path=/trunk/; revision=27324
2008-10-19 13:47:09 +00:00
Martin Nordholts bbbeb06973 There is nothing magic or ugly about the convenient defines, remove
* app/base/base-types.h: There is nothing magic or ugly about the
convenient defines, remove comments saying so.

svn path=/trunk/; revision=27322
2008-10-19 13:25:03 +00:00
Martin Nordholts 87d4596563 Refer to the input as 'in' instead of 'src', the layer as 'layer' instead
* app/gegl/gimpoperationadditionmode.c: Refer to the input as 'in'
instead of 'src', the layer as 'layer' instead of 'aux', and the
result as 'out' instead of 'dest'. The old terminology clashes
with at least the SVG 1.2 compositing terminology [1] and there is
no reason for creating confusion.

[1] http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html

svn path=/trunk/; revision=27321
2008-10-19 11:22:09 +00:00
Martin Nordholts 7501c23bd9 Use local variants of channel offset defines, namely RED instead of
* app/gegl/gimpoperationadditionmode.c: Use local variants of
channel offset defines, namely RED instead of RED_PIX etc, to
increase readability.

svn path=/trunk/; revision=27320
2008-10-19 10:57:43 +00:00
Martin Nordholts 48fee852c3 In addition to priting how long it takes to validate the projection, also
* app/actions/debug-commands.c
(debug_dump_projection_benchmarking_cmd_callback): In addition to
priting how long it takes to validate the projection, also print
the number of layers in the image.

svn path=/trunk/; revision=27319
2008-10-19 08:40:01 +00:00
Martin Nordholts 9d91e6b343 menus/image-menu.xml.in app/actions/debug-actions.c
* menus/image-menu.xml.in
* app/actions/debug-actions.c
* app/actions/debug-commands.h
* app/actions/debug-commands.c: Added a 'Dump Projection
Benchmarking' item to the Debug Menu so that we can test how
different GEGL graph setups affect performance.

svn path=/trunk/; revision=27317
2008-10-19 07:59:08 +00:00
Sven Neumann e25c82e21a Applied patch from Alexia Death as attached to bug #471344:
2008-10-18  Sven Neumann  <sven@gimp.org>

	Applied patch from Alexia Death as attached to bug #471344:
	
	* app/core/Makefile.am
	* app/core/gimpcoords-interpolate.[ch]: new files with
	interpolation code taken from ...

	* app/vectors/gimpbezierstroke.c: ... here.

	* app/Makefile.am (AM_LDFLAGS): make it link.


svn path=/trunk/; revision=27314
2008-10-18 18:46:15 +00:00
Sven Neumann 8f425553a7 added signal Gimp::image-opened to announce that an image has been loaded
2008-10-17  Sven Neumann  <sven@sven>

	* app/core/gimp.[ch]: added signal Gimp::image-opened to 
announce
	that an image has been loaded and a display was created for it.

	* app/file/file-open.c (file_open_with_proc_and_display): call
	gimp_opened() to emit the new signal.

	* app/gui/dbus-service.xml
	* app/gui/gimpdbusservice.[ch]: propagate the 'opened' signal to
	listeners of the "org.gimp.GIMP.UI" DBus service.

	* app/gui/gui-unique.c: formatting.


svn path=/trunk/; revision=27297
2008-10-17 12:03:08 +00:00
Sven Neumann 584c70fed2 just some cleanup.
2008-10-16  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpviewrenderervectors.c
	(gimp_view_renderer_vectors_draw): just some cleanup.


svn path=/trunk/; revision=27293
2008-10-15 23:04:40 +00:00
Sven Neumann f55b832bd3 Bug 556248 – Scaling gives 'jagged' edges
2008-10-16  Sven Neumann  <sven@gimp.org>

	Bug 556248 – Scaling gives 'jagged' edges

	* app/paint-funcs/scale-region.c (scale): calculate pixel
	contributions based on pixel centers, not on pixel origins.


svn path=/trunk/; revision=27292
2008-10-15 22:43:27 +00:00
Michael Natterer f2e93c0e78 add the gegl: prefix here too.
2008-10-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpgegltool.c (gimp_gegl_tool_operation_blacklisted):
	add the gegl: prefix here too.

	(gimp_gegl_tool_get_config): canonicalize the type name of the
	created config class or we crash.


svn path=/trunk/; revision=27286
2008-10-14 23:28:23 +00:00
Michael Natterer 1ccfc38561 add the gegl: prefix here too.
2008-10-15  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpgegltool.c (gimp_gegl_tool_operation_blacklisted):
	add the gegl: prefix here too.


svn path=/trunk/; revision=27285
2008-10-14 23:14:34 +00:00
Michael Natterer 880a699cae configure.in require GEGL >= 0.0.21.
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* configure.in
	* app/sanity.c: require GEGL >= 0.0.21.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-brightness-contrast.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpimage.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer.c
	* app/gegl/gimp-gegl-utils.c
	* app/tools/gimpbrightnesscontrasttool.c: GEGL operation names
	are now "gegl:"-prefixed.

	* app/core/gimpimagemap.c: set the node's "dont-cache" property
	unconditionally.


svn path=/trunk/; revision=27284
2008-10-14 22:44:42 +00:00
Sven Neumann ce4c2c3bfc let new docks appear at the pointer position.
2008-10-14  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c 
(gimp_dialog_factory_add_dialog):
	let new docks appear at the pointer position.


svn path=/trunk/; revision=27282
2008-10-14 21:39:14 +00:00
Michael Natterer 5fa6af0e1f add a default implementation of GimpDrawable::get_node() which contains a
2008-10-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add a default implementation of
	GimpDrawable::get_node() which contains a layer mode node.
	Implement GimpItem::visibility_changed() and turn the node into a
	nop when the drawable is invisible. Added public function
	gimp_drawable_get_mode_node() so subclasses can plug stuff
	into its "aux" pad.

	* app/core/gimplayer.[ch]
	* app/core/gimpchannel.[ch]: changed accordingly (remove
	duplicated member and code that is now in GimpDrawable).


svn path=/trunk/; revision=27277
2008-10-14 18:32:07 +00:00
Michael Natterer 79463b2065 remove function gimp_bpp_to_babl_format_linear() and add "gboolean linear"
2008-10-13  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimp-gegl-utils.[ch]: remove function
	gimp_bpp_to_babl_format_linear() and add "gboolean linear"
	parameter to gimp_bpp_to_babl_format().

	* app/gegl/gimpoperationtilesink.c (process)
	* app/gegl/gimpoperationtilesource.c (prepare): simply pass
	self->linear to above changed function instead of selecting
	between the two old functions.


svn path=/trunk/; revision=27275
2008-10-14 09:19:37 +00:00
Sven Neumann 121785c0ed comments.
2008-10-14  Sven Neumann  <sven@gimp.org>

	* app/signals.c (gimp_init_signal_handlers): comments.


svn path=/trunk/; revision=27274
2008-10-14 07:29:59 +00:00
Sven Neumann 3f256652e6 removed prototype for gimp_sigfatal_handler()
svn path=/trunk/; revision=27271
2008-10-13 19:49:51 +00:00
Sven Neumann f6e08757a1 app/Makefile.am new files with code split out of main.c.
2008-10-13  Sven Neumann  <sven@gimp.org>

	* app/Makefile.am
	* app/signals.[ch]: new files with code split out of main.c.

	* app/main.c: changed accordingly.


svn path=/trunk/; revision=27270
2008-10-13 19:32:33 +00:00
Martin Nordholts bce95343c8 Update with a new version that is the best known so far (maybe it's even
* app/gegl/gimpoperationadditionmode.c
(gimp_operation_addition_mode_process): Update with a new version
that is the best known so far (maybe it's even correct?).

svn path=/trunk/; revision=27269
2008-10-13 19:27:43 +00:00
Sven Neumann b387734c3d Bug 547967 – Improve app/paint-funcs/ maintainability
2008-10-13  Sven Neumann  <sven@gimp.org>

	Bug 547967 – Improve app/paint-funcs/ maintainability

	Applied patch from Luidnel Maignan that splits the legacy code 
for
	layer modes into new files.
	
	* app/paint-funcs/Makefile.am
	* app/paint-funcs/layer-modes.[ch]
	* app/paint-funcs/paint-funcs-utils.h: new files with code taken
	from ...

	* app/paint-funcs/paint-funcs-generic.h
	* app/paint-funcs/paint-funcs.c: ... these two files.


svn path=/trunk/; revision=27268
2008-10-13 18:51:32 +00:00
Michael Natterer 6e6c921396 remove warning because the missing layer modes are now "implemented", ha
2008-10-13  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
	remove warning because the missing layer modes are now
	"implemented", ha ha.


svn path=/trunk/; revision=27252
2008-10-12 23:09:25 +00:00
Michael Natterer 3f9e82004e renamed this class...
2008-10-12  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationpointcomposer.[ch]: renamed this class...

	* app/gegl/gimpoperationlayermode.[ch]: ...to this and add
	an own process() virtual function so we are free to hack even
	more badly in order to support legacy layer modes and proper
	ones which do meningfiul things to alpha. Simply redirect
	GeglOperationPointComposer's compose() calls to our own vfunc
	for now.

	* app/gegl/gegl-types.h
	* app/gegl/Makefile.am: changed accordingly.

	* app/gegl/gimpoperation*mode.[ch]: changed parent class and
	implemented process() method accordingly.


svn path=/trunk/; revision=27251
2008-10-12 20:26:27 +00:00
Michael Natterer 931482e5d0 Removed these accidentially commited files.
svn path=/trunk/; revision=27249
2008-10-12 19:53:08 +00:00
Michael Natterer 138781daf9 commit some #if 0'ed experimental code.
2008-10-12  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationadditionmode.c: commit some #if 0'ed
	experimental code.

	* app/actions/view-commands.c (view_use_gegl_cmd_callback): use
	gimp_image_update(), simply exposing the shell doesn't reconstruct
	the projection.


svn path=/trunk/; revision=27247
2008-10-12 19:01:22 +00:00
Michael Natterer ef1df223a8 add a "use_gegl" boolean member.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.h: add a "use_gegl" boolean member.

	* app/core/gimpprojection-construct.c (gimp_projection_construct):
	use the boolean instead of hardcoding FALSE.

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]: add a "Use GEGL" action and
	callback which sets the boolean and exposes the display.

	* menus/image-menu.xml.in: add it to the "View" menu.


svn path=/trunk/; revision=27242
2008-10-11 19:17:42 +00:00
Martin Nordholts ae75c33bfd Implement this one.
* app/gegl/gimpoperationadditionmode.c
(gimp_operation_addition_mode_process): Implement this one.

svn path=/trunk/; revision=27241
2008-10-11 19:12:49 +00:00
Michael Natterer 7a260b8f9e it's gimp-screen-node not gimp-screen_mode.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
	it's gimp-screen-node not gimp-screen_mode.


svn path=/trunk/; revision=27240
2008-10-11 17:30:12 +00:00
Michael Natterer 414cc45abf add an empty abstract GeglOperationPointComposer subclass which can be
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationpointcomposer.[ch]: add an empty abstract
	GeglOperationPointComposer subclass which can be used to hook in
	common debug or test or whatever code for below layer modes.

	* app/gegl/gimpoperation*mode.[ch]: add empty stubs of layer mode
	operations which do nothing but copying input to output.

	* app/gegl/Makefile.am
	* app/gegl/gegl-types.h: add them here and reordered things a bit.

	* app/gegl/gimp-gegl.c (gimp_gegl_init): register the new
	operations.

	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
	return the new operations.


svn path=/trunk/; revision=27239
2008-10-11 17:20:20 +00:00
Michael Natterer 2d24853f0e make it abstract.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationpointfilter.c: make it abstract.


svn path=/trunk/; revision=27232
2008-10-11 14:59:27 +00:00
Michael Natterer 90a194a631 don't return non-existing layer modes (in fact, return "normal" for all
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimp-gegl-utils.c (gimp_layer_mode_to_gegl_operation):
	don't return non-existing layer modes (in fact, return "normal"
	for all modes).


svn path=/trunk/; revision=27231
2008-10-11 14:48:50 +00:00
Michael Natterer 0e88239524 add a projection node and implement GimpDrawable::get_node(). Reconfigure
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpchannel.[ch]: add a projection node and
	implement GimpDrawable::get_node(). Reconfigure the node in
	visibility_changed(), set_color(), set_opacity() and
	set_show_masked().

	* app/core/gimpimage.c (gimp_image_get_graph): enable code that
	projects the channels stack on top of the layer stack.

	* app/core/gimpprojection-construct.c: remove the call to
	gimp_projection_construct_channels() from the GEGL code path. Also
	don't touch proj->construct_flag.


svn path=/trunk/; revision=27230
2008-10-11 10:29:19 +00:00
Michael Natterer e28e864ac6 remove obsolete assertion and redundant cast.
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_get_node): remove obsolete
	assertion and redundant cast.


svn path=/trunk/; revision=27229
2008-10-11 10:23:01 +00:00
Michael Natterer 302bda6c66 add GimpContainer::add() implementation, it's needed after all even though
2008-10-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c: add GimpContainer::add()
	implementation, it's needed after all even though everybody uses
	gimp_container_insert() on drawable stacks.

	(gimp_drawable_stack_remove_node): no need to have a special check
	for newly added nodes, this can't happen any more now that we have
	an add() impl.

	(gimp_drawable_stack_get_graph): free the reverse list.


svn path=/trunk/; revision=27228
2008-10-11 10:18:46 +00:00
Michael Natterer 26de288d8b Fix old bug in the GimpContainer implementation that wasn't visible before
2008-10-11  Michael Natterer  <mitch@gimp.org>

	Fix old bug in the GimpContainer implementation that wasn't
	visible before the drawable stack completly b0rked when removing
	the second-last item:

	* app/core/gimpcontainer.c: add default implementations of ::add()
	and ::remove() and update container->num_children there instead of
	in the gimp_container_add() and _remove() wrapper functions.
	This way not only external callbacks connected to the "add" and
	"remove" signals are called with the correct num_children, also
	implemtations of ::add() and ::remove() in subclass have the right
	number available before/after upchaining. Add paranoia code to the
	wrapper functions which check if the subclass reall chains up.

	* app/core/gimplist.c: chain up in add() and remove().


svn path=/trunk/; revision=27227
2008-10-11 10:14:21 +00:00
Martin Nordholts a07e8586a5 Initialize 'index'.
* app/widgets/gimpdockseparator.c (gimp_dock_separator_drag_drop):
Initialize 'index'.

svn path=/trunk/; revision=27226
2008-10-11 08:42:57 +00:00
Martin Nordholts 8b459318d4 Add a GtkAnchorType member to GimpDockSeparator that specifies where a
* app/widgets/gimpdockseparator.c (gimp_dock_separator_new): Add a
GtkAnchorType member to GimpDockSeparator that specifies where a
dropped dockable shall be inserted.

(gimp_dock_separator_drag_drop): Get rid of the ugly hack where
the role of a given separator was based on its position as a child
in its container. Simply decide what role the separator has by
loooking at its anchor-member.

* app/widgets/gimpdock.c (gimp_dock_init)
(gimp_dock_add_book): Give the GimpDockSeparators their
appropriate roles directly at their construction.

svn path=/trunk/; revision=27218
2008-10-10 23:10:21 +00:00
Michael Natterer 012581b1b9 simplify by getting rid of code duplication.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.c
	(gimp_drawable_stack_add_node)
	(gimp_drawable_stack_remove_node): simplify by getting rid of code
	duplication.


svn path=/trunk/; revision=27217
2008-10-10 21:53:34 +00:00
Michael Natterer a037de0f18 move all the code that creates a graph of drawables and all
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move all the code that creates
	a graph of drawables and all adding/removing/reordering code from
	GimpImage to this file.

	* app/core/gimpimage.c: remove the code here and use the layer
	stack's subgraph instead. Add #if 0'ed code that blends the
	channels on top of that but that doesn't work because channels
	don't provide nodes yet.


svn path=/trunk/; revision=27216
2008-10-10 21:18:24 +00:00
Michael Natterer 513c1b80f6 app/core/core-types.h app/core/Makefile.am new GimpList subclass stub
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h
	* app/core/Makefile.am
	* app/core/gimpdrawablestack.[ch]: new GimpList subclass stub
	which will manage the subgraphs of layers and channels and is also
	the first step towards layer tree.

	* app/core/gimpimage.c (gimp_image_init): keep the layers and
	channels in GimpDrawableStacks instead of plain GimpLists.


svn path=/trunk/; revision=27212
2008-10-10 20:04:03 +00:00
Michael Natterer b479b7b346 add virtual function GimpDrawable::get_node() which returns a node to be
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add virtual function
	GimpDrawable::get_node() which returns a node to be plugged into
	the projection.

	* app/core/gimplayer.[ch]: remove public get_node() api and
	implement the virtual function instead.

	* app/core/gimpimage.c: changed accordingly.


svn path=/trunk/; revision=27211
2008-10-10 19:36:17 +00:00
Michael Natterer ac745422b9 flush the image after setting active items back from temporarily selected
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmovetool.c (gimp_move_tool_button_release): flush
	the image after setting active items back from temporarily
	selected ones. Fixes menu item sensitivity.


svn path=/trunk/; revision=27209
2008-10-10 15:41:03 +00:00
Michael Natterer 5ad366c642 implement GimpItem::visibility-changed and turn the layer's node into a
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: implement GimpItem::visibility-changed
	and turn the layer's node into a nop when the layer is invisible.

	(gimp_layer_get_node): connect the stuff to a nop here too for
	invisible layers.


svn path=/trunk/; revision=27208
2008-10-10 13:52:13 +00:00
Michael Natterer 73a9bcf327 Bug 554983 – Layers Projection using GEGL
2008-10-10  Michael Natterer  <mitch@gimp.org>

	Bug 554983 – Layers Projection using GEGL

	First projection using GEGL, wheeeee. Disabled by default because
	it doesn't work with floating selection (and will not, FS
	refactoring is in the queue).

	* app/core/gimpimage.[ch]: add gimp_image_get_graph() which
	returns a GeglNode representing the image's projection.

	(gimp_image_add_layer_node)
	(gimp_image_remove_layer_node): new utility functions to add and
	remove layer nodes to/from the graph.

	(gimp_image_add_layer)
	(gimp_image_remove_layer)
	(gimp_image_position_layer): call them to keep the graph up to date.

	* app/core/gimpdrawable.c (gimp_drawable_real_update): invalidate
	the source node.

	* app/core/gimpprojection.[ch]: keep a projection graph around and
	add gimp_projection_get_sink_node() which returns the node that
	writes to the projection tiles.

	* app/core/gimpprojection-construct.c: add
	gimp_projection_construct_gegl() which is a few-liner that uses a
	GeglProcessor to run the projection graph.

	(gimp_projection_construct): call the new function (disabled by
	default).


svn path=/trunk/; revision=27207
2008-10-10 12:24:56 +00:00
Michael Natterer dba9e0c5e8 add new functions gimp_image_get_layer_by_index(), _channel_by_index() and
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
2008-10-10 11:45:00 +00:00
Michael Natterer f2a6b781e4 the "shift" operation's x and y properties are doubles not ints.
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_translate)
	(gimp_layer_get_node): the "shift" operation's x and y properties
	are doubles not ints.

	(gimp_layer_apply_mask): properly disconnect the mask node.

	(gimp_layer_set_opacity): the opacity node has a "value" property,
	not "opacity".


svn path=/trunk/; revision=27205
2008-10-10 11:30:56 +00:00
Michael Natterer 517e58cdeb Address Bug 554983 – Layers Projection using GEGL
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Address Bug 554983 – Layers Projection using GEGL

	* app/gegl/gimp-gegl-utils.[ch]: add (imcomplete) function
	gimp_layer_mode_to_gegl_operation() from bug #554983.

	* app/core/gimpdrawable.[ch]: add gimp_drawable_get_source_node()
	which returns a GimpOperationTileSource for the drawable's
	tiles.

	(gimp_drawable_real_set_tiles)
	(gimp_drawable_configure): set the node's "tiles" property.

	* app/core/gimplayer.[ch]: add gimp_layer_get_node() which returns
	a GeglNode with proxy "input" and "output" pads to be plugged
	into the projection graph. The node has children for opacity,
	mask, layer mode and layer offset.

	(gimp_layer_translate)
	(gimp_layer_add_mask)
	(gimp_layer_apply_mask)
	(gimp_layer_set_opacity)
	(gimp_layer_set_mode): reconfigure the respective nodes.

	* app/core/gimpimage.[ch]: keep a "graph" node around and destroy
	it in finalize(). Not even a stub, just a silly GEGL dependency.


svn path=/trunk/; revision=27204
2008-10-09 20:44:23 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer 0e4a35a2d8 Remove the last code duplication from the undo system (or if not the last
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Remove the last code duplication from the undo system (or if not
	the last then at least the most ugly):

	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
	add "gboolean push_undo" parameter and add the item without
	touching undo if it's TRUE. Changed assertions from
	g_object_is_floating() to !gimp_item_is_attached() so they also
	take items from the undo stack and not only newly created ones.

	(gimp_image_remove_layer,channel,vectors): add "push_undo"
	parameter here too. Also add a "new_active" parameter where an
	optional new active item can be passed.

	(gimp_image_remove_layer,channel): these functions must not be
	called with push_undo=FALSE and a floating selection attached to
	the layer/channel. This can't currently happen; added warnings in
	case other code is changed and makes it happen anyway.

	* app/core/gimpchannelundo.c
	* app/core/gimplayerundo.c
	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
	items instead of duplicating (parts of) their code. Pass
	push_undo=FALSE and the previously active item to the remove()
	functions.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpchannelundo.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayerundo.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectorsundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
	unless it's a new image like when loading and XCF file).

	* app/pdb/image-cmds.c
	* app/pdb/paths-cmds.c: regenerated.


svn path=/trunk/; revision=27200
2008-10-09 19:40:41 +00:00
Sven Neumann f959832666 data/images/Makefile.am added 128x128 version of wilber-devel.png.
2008-10-09  Sven Neumann  <sven@gimp.org>

	* data/images/Makefile.am
	* data/images/gimp-devel-logo.png: added 128x128 version of
	wilber-devel.png.

	* app/dialogs/about-dialog.c (about_dialog_load_logo): use
	gimp-devel-logo.png for unstable releasees.


svn path=/trunk/; revision=27199
2008-10-09 19:16:54 +00:00
Michael Natterer e21935a7b9 Bug 134956 – Curves tool doesn't save free curves
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Bug 134956 – Curves tool doesn't save free curves

	* app/core/gimpmarshal.list
	* app/widgets/gimpsettingsbox.[ch]: add signal "file-dialog-setup"
	and emit it when the export/import file chooser is fully
	constructed. Callbacks can then do additional things to the
	dialog, like adding custom buttons.

	* app/tools/gimpcurvestool.h
	* app/tools/gimplevelstool.h: add boolean member
	"export_old_format".

	* app/tools/gimpcurvestool.c
	* app/tools/gimplevelstool.c (gimp_*_tool_dialog): connect to
	the settings box' "file-dialog-setup".

	(gimp_*_tool_export_setup): new callback which adds a toggle to
	the file choosers that allows to export to the old format.
	Default saving the new format, we defaulted to the old one before.

	(gimp_*_tool_settings_export): check the "export_old_format"
	boolean and only save the cruft format if it is TRUE; chain up
	otherwise, which generically saves the new format.

	* app/tools/gimplevelstool.c (gimp_levels_tool_settings_import):
	add the same file format detection code as in the curves tool
	so it transparently loads old and new levels files.


svn path=/trunk/; revision=27194
2008-10-09 15:25:59 +00:00
Sven Neumann ecccddd372 use GIMP_MINOR_VERSION to determine the version to migrate from.
2008-10-09  Sven Neumann  <sven@sven>

	* app/core/gimp-user-install.c (gimp_user_install_detect_old):
	use GIMP_MINOR_VERSION to determine the version to migrate from.


svn path=/trunk/; revision=27192
2008-10-09 13:24:50 +00:00
Michael Natterer 97b8f51049 when saving a curve of type GIMP_CURVE_FREE, don't use
2008-10-09  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_save_cruft):
	when saving a curve of type GIMP_CURVE_FREE, don't use
	gimp_curve_get_point() because that returns nothing for free
	curves.

	(gimp_curves_config_load_cruft): reset the curve before loading it.

	* app/core/gimpcurve.c (gimp_curve_get_point): instead of above
	mentioned uninitialized nonsense, at least return -1,-1 for free
	curves.


svn path=/trunk/; revision=27190
2008-10-09 09:44:08 +00:00
Michael Natterer 381d521499 app/Makefile.am change 2.6 to 2.7 here too.
2008-10-09  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* tools/Makefile.am: change 2.6 to 2.7 here too.


svn path=/trunk/; revision=27188
2008-10-09 08:28:39 +00:00
Sven Neumann e069a226d5 use a GMutex instead of a GStaticMutex as the latter needs API that causes
2008-10-08  Sven Neumann  <sven@gimp.org>

	* app/base/tile-cache.c: use a GMutex instead of a GStaticMutex
	as the latter needs API that causes compiler warnings about
	dereferencing of type-punned pointers.


svn path=/trunk/; revision=27170
2008-10-08 07:33:29 +00:00
Michael Natterer f6e04aed60 Bug 555362 – gimp-remote is not working properly
2008-10-07  Michael Natterer  <mitch@gimp.org>

	Bug 555362 – gimp-remote is not working properly

	* app/widgets/gimptoolbox-dnd.c (gimp_toolbox_dnd_init): add the
	window itself as drop traget again so gimp-remote works.


svn path=/trunk/; revision=27164
2008-10-07 21:10:29 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Sven Neumann 2aeb40ac96 removed debug output.
2008-10-06  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale_region): removed debug
	output.


svn path=/trunk/; revision=27149
2008-10-06 20:47:55 +00:00
Michael Natterer 6f1b06e065 add a fallback mapping from <Toolbox> to <Image> so we catch really
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-menu-path.c (menu_path_mappings): add a
	fallback mapping from <Toolbox> to <Image> so we catch really
	everything that wants to go to <Toolbox>.


svn path=/trunk/; revision=27147
2008-10-06 20:35:41 +00:00
Michael Natterer 90db7d443c paranoia fix for hypothetical but harmful misbehavior: when setting the
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcontext.c (gimp_context_real_set_display): paranoia
	fix for hypothetical but harmful misbehavior: when setting the
	display from !=NULL to NULL, also set the image to NULL instead of
	relying on whatever obscure implicit behavior of other parts of
	GIMP which set a new display right away or make sure the image
	goes away together with the display.


svn path=/trunk/; revision=27145
2008-10-06 19:54:42 +00:00
Michael Natterer eed8f2c326 g_return_if_fail() on the mask's image being the same as the layer's
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c (gimp_layer_add_mask): g_return_if_fail()
	on the mask's image being the same as the layer's image. The PDB
	already checks for this.

	* app/core/gimpimage.c (gimp_image_add_layer,channel,vectors):
	remove calls to gimp_item_set_image() because we only accept
	itmes of this image anyway.


svn path=/trunk/; revision=27138
2008-10-06 09:26:44 +00:00
Michael Natterer 14aad7c222 app/plug-in/gimpplugin-cleanup.c #include <glib-object.h>, not
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugin-cleanup.c
	* app/vectors/gimpanchor.c: #include <glib-object.h>, not
	"glib-object.h".


svn path=/trunk/; revision=27137
2008-10-05 20:06:16 +00:00
Michael Natterer 85e46a2cc1 including ourselves serves no purpose.
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gegl-types.h: including ourselves serves no purpose.


svn path=/trunk/; revision=27136
2008-10-05 18:28:20 +00:00
Michael Natterer 321913dd6d Allow to "Open as Layers" in the empty display:
2008-10-05  Michael Natterer  <mitch@gimp.org>

	Allow to "Open as Layers" in the empty display:

	* app/widgets/gimpfiledialog.[ch]: add member
	"gboolean open_as_layers". Rename gimp_file_dialog_set_image() to
	gimp_file_dialog_set_save_image() and add
	gimp_file_dialog_set_open_image() which sets both the image to
	load layers into and the "open_as_layers" boolean.

	* app/dialogs/file-open-dialog.c (file_open_dialog_response): look
	at dialog->open_as_layers instead of dialog->image to decide whether
	to open as layers (that's much more obvious). Enable open as layers
	without existing image by creating the image if it doesn't exist.

	* app/actions/file-commands.c (file_open_dialog_show): add "title"
	parameter and take the uri from the image if none was passed. Use the
	new gimp_file_dialog_set_open_image() instead of poking into the
	dialog struct. Change callers to pass the title and not get the
	uri from the image; instead always pass the image.

	* app/actions/file-actions.c (file_actions_update): keep
	"Open as Layers" sensitive even without image.


svn path=/trunk/; revision=27135
2008-10-05 15:21:02 +00:00
Michael Natterer 9a720b654f some formatting cleanups.
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-contiguous-region.c: some formatting cleanups.

	(find_contiguous_segment): changed to return gboolean not gint.


svn path=/trunk/; revision=27134
2008-10-05 13:54:36 +00:00
Hans Breuer d94419a9fd updated include <string.h> for memcmp() include <string.h> for strcmp()
2008-10-03  Hans Breuer  <hans@breuer.org>

	* **/makefie.msc gimpdefs.msc app/gimpcore.def : updated
	* app/core/gimpcurve.c : include <string.h> for memcmp()
	* app/gegl/gimpcurvesconfig.c : include <string.h> for strcmp()

svn path=/trunk/; revision=27118
2008-10-03 19:27:54 +00:00
Sven Neumann 632b8d3fba bail out early if shell->display is NULL. Fixes crash reported on the
2008-10-03  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_update_scrollbars)
	(gimp_display_shell_scale_update_rulers): bail out early if
	shell->display is NULL. Fixes crash reported on the 
mailing-list.


svn path=/trunk/; revision=27117
2008-10-03 19:20:46 +00:00
Sven Neumann d5be34058c add "text" to the list of blacklisted operations.
2008-10-02  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpgegltool.c 
(gimp_gegl_tool_operation_blacklisted):
	add "text" to the list of blacklisted operations.


svn path=/trunk/; revision=27114
2008-10-02 19:08:16 +00:00
Michael Natterer 68acc6598c Bug 554646 – Opening Help crashes GIMP with lqr-plugin installed
2008-10-02  Michael Natterer  <mitch@gimp.org>

	Bug 554646 – Opening Help crashes GIMP with lqr-plugin installed

	* app/widgets/gimphelp.c (gimp_help_get_help_domains): need to
	assign (*foo)[i] and not *foo[i] of a gchar** returned via return
	value location.


svn path=/trunk/; revision=27113
2008-10-02 17:16:14 +00:00
Michael Natterer 184fe0a30b keep a reference to the proc_frame's procedure. We can't asume it's always
2008-10-02  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocframe.c: keep a reference to the
	proc_frame's procedure. We can't asume it's always there since it
	could be a temporary one and its plug-in might die during
	procedure execution, taking the temp_proc with it.


svn path=/trunk/; revision=27112
2008-10-02 17:13:58 +00:00
Martin Nordholts 259801e34e Bug 553534 – centering issues after image scaling and setting zoom
to 100%

* app/display/display-enums.h: Added a GimpZoomFocus enum with
'best guess', 'pointer' or 'image center' values.

* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_scale): Take a GimpZoomFocus parameter and
pass it on to

(gimp_display_shell_scale_get_zoom_focus): which returns the
requested zoom focus point if one was given, else makes a best
guess.

* app/actions/view-commands.c
* app/display/gimpstatusbar.c
* app/display/gimpnavigationeditor.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-scale-dialog.c: For explicit-zoom
commands like "zoom to 100%", always use the image center as the
zoom focus point. For all other zooming, continue to use the
best-guess method.

* app/display/display-enums.c: Regenerated.

svn path=/trunk/; revision=27104
2008-10-02 14:53:35 +00:00
Tor Lillqvist 8d024f303d : Don't #define _GNU_SOURCE on Windows as it confuses newest mingw
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* app/widgets/gtkscalebutton.c: : Don't #define _GNU_SOURCE on
	Windows as it confuses newest mingw headers.


svn path=/trunk/; revision=27097
2008-10-01 12:32:31 +00:00
Tor Lillqvist 0eb68211f3 Don't #define _GNU_SOURCE on Windows as it confuses newest mingw headers.
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/gimpplugin.c: Don't #define _GNU_SOURCE on Windows
	as it confuses newest mingw headers.


svn path=/trunk/; revision=27096
2008-10-01 12:27:32 +00:00
Michael Natterer 6865bb9e2b Bug 546924 – "New Image" misscalculating dimensions for non-pixel sized
2008-09-30  Michael Natterer  <mitch@gimp.org>

	Bug 546924 – "New Image" misscalculating dimensions for non-pixel
	sized templates

	* app/core/gimptemplate.h: added private param flag
	GIMP_TEMPLATE_PARAM_COPY_FIRST.

	* app/core/gimptemplate.c (gimp_template_class_init): set the flag
	on the resolution properties.

	* app/dialogs/image-new-dialog.c (image_new_template_changed):
	make sure the resolution properties are copied first.

	* libgimpconfig/gimpconfig-utils.c (gimp_config_sync): remove
	comment about fixing the template editor. That's not true any
	more.


svn path=/trunk/; revision=27091
2008-09-30 16:06:24 +00:00
Michael Natterer 52c61f6b5f keep a "default_config" object around and use it to reset the tool if it
2008-09-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpimagemaptool.[ch]: keep a "default_config" object
	around and use it to reset the tool if it exists.

	(gimp_image_map_tool_edit_as): set the default_config on the new
	tool so "reset" goes back to the values the tool was started with.

	* app/tools/gimpcolorbalencetool.c (gimp_color_balance_tool_reset)
	* app/tools/gimpcurvestool.c (gimp_curves_tool_reset)
	* app/tools/gimphuesaturationtool.c (gimp_hue_saturation_tool_reset)
	* app/tools/gimplevelstool.c (gimp_levels_tool_reset): use the
	default config to reset the tool here too if it exists.


svn path=/trunk/; revision=27090
2008-09-30 13:46:08 +00:00
Sven Neumann baea3223f1 don't make the upper label bold. This change compensates for the smaller
2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/gui/splash.c: don't make the upper label bold. This change
	compensates for the smaller width of the new splash screen.


svn path=/trunk/; revision=27089
2008-09-30 11:27:00 +00:00
Sven Neumann ca0b070852 added gimp_pango_layout_set_scale().
2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpwidgets-utils.[ch]: added
	gimp_pango_layout_set_scale().

	* app/gui/splash.c: set a smaller font size on the lower label.


svn path=/trunk/; revision=27088
2008-09-30 11:16:28 +00:00
Sven Neumann 945fdb7cc0 actually use the passed weight.
2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpwidgets-utils.c 
(gimp_pango_layout_set_weight):
	actually use the passed weight.


svn path=/trunk/; revision=27087
2008-09-30 11:09:06 +00:00
Sven Neumann f666fe0f0b app/config/gimpbaseconfig.c reverted parts of commit 25812. Restores
2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/config/gimpbaseconfig.c
	* app/config/gimpguiconfig.c: reverted parts of commit 25812.
	Restores compatibility with old gimprc files.


svn path=/trunk/; revision=27086
2008-09-30 09:41:55 +00:00
Sven Neumann 24b2c1c977 formatting.
2008-09-30  Sven Neumann  <sven@gimp.org>

	* app/config/gimprc-deserialize.c (gimp_rc_deserialize): 
formatting.


svn path=/trunk/; revision=27085
2008-09-30 09:34:20 +00:00
Sven Neumann 6a6d2f789b bumped version to 2.6.0.
2008-09-29  Sven Neumann  <sven@gimp.org>

        * configure.in: bumped version to 2.6.0.

        * app/Makefile.am
        * tools/Makefile.am: changed accordingly.

        * docs/gimprc.5.in
        * etc/gimprc: regenerated.


svn path=/trunk/; revision=27081
2008-09-29 20:33:13 +00:00
Martin Nordholts 958de4c297 Bug 554125 – Tab key doesn't hide utility windows when there is no
image open.
	
* app/widgets/gimpdialogfactory.[ch]: Add 'toggle_visibility' to
GimpDialogFactory and as a parameter to gimp_dialog_factory_new(),
and set it there.

(gimp_dialog_factories_hide_foreach): Don't hide dialogs belonging
to factories with toggle_visibility FALSE.

* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): Move no-image event
handling to a new helper function, and make pressing Tab hide
windows.

* app/dialogs/dialogs.c (dialogs_init): Allow toggling visibility
for all factories except the display-factory.

svn path=/trunk/; revision=27077
2008-09-29 15:42:56 +00:00