Commit Graph

11449 Commits

Author SHA1 Message Date
Michael Natterer 5a1cf727bf Bug 562427 – Compilation with --as-needed
2008-11-27  Michael Natterer  <mitch@gimp.org>

	Bug 562427 – Compilation with --as-needed

	* app/Makefile.am (gimp_console_2_7_LDADD): add $(GLIB_LIBS) so
	libgthread gets pulled in explicitely.


svn path=/trunk/; revision=27732
2008-11-27 19:21:03 +00:00
Martin Nordholts aea5b1a9dc Bug 562366 – Default image dimensions are not correctly
transferred in the file/new dialog box

* app/dialogs/preferences-dialog.c
(prefs_template_select_callback): We need to copy the template in
the same way as in the New Image dialog.

* app/dialogs/image-new-dialog.c (image_new_dialog_set): ... and
when we copy the template to the New Image dialog.

svn path=/trunk/; revision=27724
2008-11-27 07:26:44 +00:00
Martin Nordholts 3db37671a4 Bug 562366 – Default image dimensions are not correctly
transferred in the file/new dialog box

* app/dialogs/preferences-dialog.c
(prefs_template_select_callback): We need to copy the template in
the same way as in the New Image dialog.

svn path=/trunk/; revision=27720
2008-11-26 19:15:27 +00:00
Sven Neumann 6ec38fb918 split spaghetti code into lots of helper functions.
2008-11-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-duplicate.c: split spaghetti code into lots
	of helper functions.


svn path=/trunk/; revision=27719
2008-11-26 07:20:04 +00:00
Sven Neumann f4908263c8 removed reference to gimp-remote manual page in the generated gimprc
2008-11-22  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-dump.c: removed reference to gimp-remote
	manual page in the generated gimprc manual page.


svn path=/trunk/; revision=27712
2008-11-22 23:12:25 +00:00
Michael Natterer 558e2e17a9 make the entire selection API take GimpSelection arguments, not
2008-11-22  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: make the entire selection
	API take GimpSelection arguments, not GimpChannel.
	Clean up gimp_selection_load() a bit.

	* app/actions/select-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpimage-quick-mask.c
	* app/tools/gimpeditselectiontool.c
	* tools/pdbgen/pdb/selection.pdb: add the needed casts.

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


svn path=/trunk/; revision=27711
2008-11-22 22:07:55 +00:00
Sven Neumann 8d11c0c3e0 removed unused methods gimp_draw_tool_set_vectors() and
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]: removed unused methods
	gimp_draw_tool_set_vectors() and gimp_draw_tool_set_transform()
	and related infrastructure.


svn path=/trunk/; revision=27704
2008-11-21 21:43:43 +00:00
Sven Neumann 6b74d8d8d6 inlined local variables that are only used once.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpviewrenderervectors.c
	(gimp_view_renderer_vectors_draw): inlined local variables that
	are only used once.


svn path=/trunk/; revision=27703
2008-11-21 21:15:29 +00:00
Sven Neumann ebc39ee055 moved vectors drawing to its own function.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.c (gimp_draw_tool_real_draw): moved
	vectors drawing to its own function.


svn path=/trunk/; revision=27702
2008-11-21 21:07:48 +00:00
Sven Neumann cdb30fb4e1 reordered functions to keep those that actually draw together.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpdrawtool.[ch]: reordered functions to keep those
	that actually draw together.


svn path=/trunk/; revision=27698
2008-11-21 19:01:58 +00:00
Sven Neumann 64416069e0 app/core/gimpprojection.c (gimp_projection_get_tiles_at_level) cosmetics.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level)
	cosmetics.

	* app/display/gimpdisplayshell-render.[ch]: added const 
qualifier.


svn path=/trunk/; revision=27697
2008-11-21 17:59:04 +00:00
Martin Nordholts 9cb700d7f2 For consistency, prefix the #warning:s with FIXME.
* app/widgets/gimpselectioneditor.c: For consistency, prefix the
#warning:s with FIXME.

svn path=/trunk/; revision=27695
2008-11-21 07:16:00 +00:00
Martin Nordholts 1cf1276793 Move the rest of the class instance members to GimpContainerPriv and
* app/core/gimpcontainer.[ch]: Move the rest of the class instance
members to GimpContainerPriv and rename the member num_children to
n_children.

svn path=/trunk/; revision=27694
2008-11-20 23:51:39 +00:00
Martin Nordholts 2f25fb132f Use GimpContainer getters instead of poking into the class
instance struct.

* app/actions/context-commands.c
* app/actions/data-commands.c
* app/actions/plug-in-commands.c
* app/actions/templates-commands.c
* app/core/gimp-utils.c
* app/core/gimpdrawablestack.c
* app/core/gimpitemstack.c
* app/core/gimplist.c
* app/gui/gui-vtable.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainerpopup.c
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpcontainertreeview.c
* app/widgets/gimpcontainerview-utils.c
* app/widgets/gimpcontainerview.c
* app/widgets/gimpdataeditor.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c

svn path=/trunk/; revision=27693
2008-11-20 23:43:58 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Martin Nordholts 807095548b Don't expose class instance members marked as private.
* app/core/gimpcontainer.[ch]: Don't expose class instance members
marked as private.

svn path=/trunk/; revision=27691
2008-11-20 19:19:54 +00:00
Michael Natterer 37cff850af remove members "quick_mask_changed" and "alpha_changed" (the former was
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpundo.h (struct GimpUndoAccumulator): remove members
	"quick_mask_changed" and "alpha_changed" (the former was unused
	and the latter is entirely handled by the image's flush
	accumulator now.

	* app/core/gimpimage-undo.c
	* app/core/gimplayerundo.c: changed accordingly.


svn path=/trunk/; revision=27690
2008-11-19 23:39:28 +00:00
Michael Natterer 49e65f1b84 add read-only "mask" property.
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.c: add read-only "mask" property.


svn path=/trunk/; revision=27689
2008-11-19 23:37:15 +00:00
Michael Natterer b50a3994da image->quick_mask_state is a boolean, return it directly instead of "state
2008-11-20  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-quick-mask.c (gimp_image_get_quick_mask_state):
	image->quick_mask_state is a boolean, return it directly instead
	of "state != NULL".


svn path=/trunk/; revision=27688
2008-11-19 23:34:43 +00:00
Michael Natterer ca594c6d11 chain up unconditionally.
2008-11-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c (gimp_drawable_visibility_changed):
	chain up unconditionally.


svn path=/trunk/; revision=27677
2008-11-17 00:06:23 +00:00
Michael Natterer 6b579085a3 add boolean property "floating-selection" which indicates if the layer is
2008-11-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: add boolean property
	"floating-selection" which indicates if the layer is a floating
	selection. Add new API gimp_layer_set_floating_sel_drawable()
	which sets layer->fs.drawable and emits notify on the property.
	Did some minor cleanup in the existing property code.

	* app/core/gimpfloatingselundo.c: use the new function instead of
	setting layer->fs.drawable manually.

	* app/core/gimplayer-floating-sel.c: same here. Remove some
	includes and local variables that are obsolete.


svn path=/trunk/; revision=27676
2008-11-17 00:02:15 +00:00
Martin Nordholts 35c1687678 app/widgets/gimpcontainertreeview.[ch] Make the renderer_cells and
* app/widgets/gimpcontainertreeview.[ch]
* app/widgets/gimpcontainertreeview-private.h: Make the
renderer_cells and toggle_cells members private.

(gimp_container_tree_view_set_main_column_title)
(gimp_container_tree_view_prepend_toggle_cell_renderer)
(gimp_container_tree_view_prepend_cell_renderer): New interface.

* app/widgets/gimptoolview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpcontrollerlist.c: Use new interface.

svn path=/trunk/; revision=27675
2008-11-16 20:58:53 +00:00
Michael Natterer 176f4c5689 app/dialogs/module-dialog.c app/display/gimpscalecombobox.c
2008-11-16  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/module-dialog.c
	* app/display/gimpscalecombobox.c
	* app/tools/gimpgegltool.c
	* app/tools/gimprectangleoptions.c
	* app/widgets/gimpactionview.[ch]
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerentry.[ch]
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpfileprocview.c: s/NUM_COLUMNS/N_COLUMNS/


svn path=/trunk/; revision=27674
2008-11-16 20:17:43 +00:00
Martin Nordholts 72d733ce8f Move container tree view model column enums here and call the last enum
* app/widgets/gimpcontainertreeview.[ch]: Move container tree view
model column enums here and call the last enum _N_COLUMNS.

* app/widgets/widgets-enums.h: Remove the enum. It was meant only
for the container tree view class hierarchy anyway.

svn path=/trunk/; revision=27672
2008-11-16 19:59:16 +00:00
Martin Nordholts 9eda1bb7c8 New setter function so that we can make the "gboolean dnd_drop_to_empty"
* app/widgets/gimpcontainertreeview.[ch]
(gimp_container_tree_view_set_dnd_drop_to_empty): New setter
function so that we can make the "gboolean dnd_drop_to_empty"
class instance member private.

* app/widgets/gimpcontainertreeview-private.h: Move member here.

* app/widgets/gimpcontainertreeview-dnd.c: Go through priv pointer.

* app/widgets/gimpitemtreeview.c (gimp_item_tree_view_init): Use
the new function.

svn path=/trunk/; revision=27671
2008-11-16 19:48:54 +00:00
Sven Neumann f2a9ffdd30 app/app.c set the GEGL cache size as large as the GIMP tile-cache.
2008-11-16  Sven Neumann  <sven@gimp.org>

	* app/app.c
	* app/gegl/gimp-gegl.[ch] (gimp_gegl_init): set the GEGL cache 
size
	as large as the GIMP tile-cache.


svn path=/trunk/; revision=27669
2008-11-16 10:30:49 +00:00
Sven Neumann 1ff4b3da7d optimize access to GimpDisplayShell struct members by placing related and
2008-11-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.h: optimize access to
	GimpDisplayShell struct members by placing related and frequently
	accessed members like like scale and offset into the same
	cacheline.

	* app/display/gimpdisplayshell.c (gimp_display_shell_init): resort
	initialization accordingly.


svn path=/trunk/; revision=27668
2008-11-15 23:16:04 +00:00
Martin Nordholts 4a239bcc82 Complete previous commit
svn path=/trunk/; revision=27667
2008-11-15 20:05:28 +00:00
Martin Nordholts 137734aaed Put the GimpContainerTreeView enums here instead of exposing them through
* app/widgets/widgets-enums.h: Put the GimpContainerTreeView enums
here instead of exposing them through silly class instance
members.

* app/widgets/gimpcontainertreeview.c: 
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpsettingseditor.c
* app/widgets/gimptemplateview.c
* app/widgets/gimptoolview.c: Clean up and use new enum names.

svn path=/trunk/; revision=27666
2008-11-15 20:01:55 +00:00
Martin Nordholts e78aa3033e Fix gimpcontainertreeview-private.h
svn path=/trunk/; revision=27663
2008-11-15 18:16:40 +00:00
Martin Nordholts e9153bf52d Don't expose class instance struct members that is currently only used
* app/widgets/gimpcontainertreeview.[ch]: Don't expose class
instance struct members that is currently only used within the
GimpContainerTreeView implementation.

* app/widgets/gimpcontainertreeview-private.h: New file containing
the definition of the private struct.

* app/widgets/gimpcontainertreeview-dnd.c: Change accordingly.

* app/widgets/Makefile.am: Add new file.

svn path=/trunk/; revision=27662
2008-11-15 18:08:50 +00:00
Martin Nordholts a3eb78b5c7 Remove unused instance struct member "GQuark
* app/widgets/gimpcontainertreeview.h: Remove unused instance
struct member "GQuark invalidate_preview_handler_id".

svn path=/trunk/; revision=27661
2008-11-15 18:00:39 +00:00
Michael Natterer 3216ed8eca Bug 560897 – Floating Selection, objects appearing in background
2008-11-15  Michael Natterer  <mitch@gimp.org>

	Bug 560897 – Floating Selection, objects appearing in background

	* app/core/gimpdrawable.c (gimp_drawable_init_src_region): use the
	right offsets (not off_y for both x and y) when applying the
	floating selection.


svn path=/trunk/; revision=27658
2008-11-15 13:29:15 +00:00
Sven Neumann f2665fe374 run the benchmark in an idle callback.
2008-11-15  Sven Neumann  <sven@gimp.org>

	* app/actions/debug-commands.c
	(debug_benchmark_projection_cmd_callback): run the benchmark in 
an
	idle callback.


svn path=/trunk/; revision=27657
2008-11-15 12:43:18 +00:00
Martin Nordholts a8c54971e1 Fix mnemonics for the Debug sub menu and the Benchmark Projection item.
* app/actions/debug-actions.c: Fix mnemonics for the Debug sub
menu and the Benchmark Projection item.

svn path=/trunk/; revision=27656
2008-11-15 12:31:36 +00:00
Martin Nordholts 1dd185c397 Bug 560903 – Explicit zooming with e.g. '1' should handle
zoom-focus better

* app/display/display-enums.h: Added
GIMP_ZOOM_FOCUS_RETAIN_CENTERING_ELSE_BEST_GUESS.

* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_get_zoom_focus): Take the new enum into
account; if the image is centered, keep it centered, else use the
best-guess method.

* app/actions/view-commands.c (view_zoom_explicit_cmd_callback):
Use the new enum for explicit zooming.

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

svn path=/trunk/; revision=27653
2008-11-15 10:24:56 +00:00
Martin Nordholts 9089377f32 Bug 560245 – Zoom selection always centered in the Navigation tab
* app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale):
Also take the image center and not only the zoom focus point into
account when deciding whether or not to center the image after
zoom.

svn path=/trunk/; revision=27651
2008-11-15 08:04:06 +00:00
Michael Natterer f275cddbbf add member "gboolean floating_selection_changed".
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch] (struct GimpImageFlushAccumulator):
	add member "gboolean floating_selection_changed".

	(gimp_image_set_floating_selection): new function which sets
	the image's floating_sel pointer and sets the flag in the
	accumulator to TRUE for later signal emission on flush.

	(gimp_image_projectable_flush): emit "floating-selection-changed"
	if the flag in the accumulator is TRUE.

	* app/core/gimpimage.c (gimp_image_add,remove_layer)
	* app/core/gimpfloatingselundo.c (gimp_floating_sel_undo_pop)
	* app/core/gimplayer-floating-sel.c (floating_sel_to_layer): use
	gimp_image_set_floating_selection() instead of setting
	image->floating_sel menually and remove all calls to
	gimp_image_floating_selection_changed().


svn path=/trunk/; revision=27650
2008-11-14 15:18:29 +00:00
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

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


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +00:00
Sven Neumann 47c39d6c97 removed function gimp_display_shell_scroll_get_scaled_viewport_offset() as
2008-11-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-scroll.[ch]: removed function
	gimp_display_shell_scroll_get_scaled_viewport_offset() as it was
	only returning -shell->offset_x and -shell->offset_y and it
	started to show up in profiles.

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell-scale.c: use the shell offsets
	directly.


svn path=/trunk/; revision=27644
2008-11-13 23:16:11 +00:00
Sven Neumann 987824b301 check that the resulting area has positive width and height.
2008-11-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-preview.c
	(gimp_display_shell_draw_quad): check that the resulting area 
has
	positive width and height.


svn path=/trunk/; revision=27642
2008-11-13 23:12:56 +00:00
Martin Nordholts efb5c20ef8 Move the instance struct to the header but add a typed opaque priv pointer
* app/display/gimpcursorview.[ch]: Move the instance struct to the
header but add a typed opaque priv pointer to it so we can avoid
exposing implementation details. Also move the class struct to the
header.

svn path=/trunk/; revision=27641
2008-11-13 20:12:49 +00:00
Michael Natterer 4599c75c06 get rid of useless casts.
2008-11-13  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/image.pdb (image_floating_sel_attached_to): get
	rid of useless casts.

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


svn path=/trunk/; revision=27639
2008-11-13 15:42:58 +00:00
Michael Natterer 9476973c62 add read-only boolean properties "visible" and "linked".
2008-11-13  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c: add read-only boolean properties "visible"
	and "linked".


svn path=/trunk/; revision=27638
2008-11-13 15:06:34 +00:00
Sven Neumann ada8336822 added gimp_image_get_display_name().
2008-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_display_name().

	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-title.c
	* app/pdb/gimppdb-utils.c

	* app/widgets/gimpviewabledialog.c: use the new method instead 
of
	getting the image URI and mangling it with
	file_utils_uri_display_basename().


svn path=/trunk/; revision=27637
2008-11-13 12:09:05 +00:00
Sven Neumann f26fb06dbc Bug 559292 – SOTA Chrome cannot accept different textures
2008-11-13  Sven Neumann  <sven@gimp.org>

	Bug 559292 – SOTA Chrome cannot accept different textures

	* app/pdb/gimppdb-utils.c (gimp_pdb_image_is_base_type)
	(gimp_pdb_image_is_not_base_type): gimp_object_get_name() may 
	return NULL for images. Use gimp_image_get_uri() instead.


svn path=/trunk/; revision=27635
2008-11-13 08:21:00 +00:00
Øyvind Kolås f742f2137e cache the data in "RaGaBa A" float instead as a copy of the tile managers
* app/gegl/gimpoperationtilesource.c:
(gimp_operation_tile_source_prepare),
(gimp_operation_tile_source_process): cache the data in "RaGaBa A"
float instead as a copy of the tile managers exact data, this allows
more direct tile data access at projection compositing time.

svn path=/trunk/; revision=27632
2008-11-12 20:43:36 +00:00
Sven Neumann b37c8bcf0a app/core/Makefile.am added GIMP_ERROR as general error domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/core/Makefile.am
	* app/core/gimperror.[ch]: added GIMP_ERROR as general error 
domain.

	* app/core/gimpchannel.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/core/gimptooloptions.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c
	* app/vectors/gimpvectors-import.c: use GIMP_ERROR as error 
domain
	instead of 0, which is not accepted by g_set_error_literal().

	* app/gui/session.c
	* app/menus/menus.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpdevices.c: use G_FILE_ERROR as error domain 
for
	file errors.


svn path=/trunk/; revision=27628
2008-11-12 10:56:06 +00:00
Sven Neumann c61f677536 use the GIMP_PLUG_IN_ERROR domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-icc-profile.c: use the GIMP_PLUG_IN_ERROR
	domain.


svn path=/trunk/; revision=27627
2008-11-12 10:25:43 +00:00
Sven Neumann 33eb18a479 app/pdb/gimppdberror.h added generic error codes.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimppdberror.h
	* app/plug-in/gimppluginerror.h: added generic error codes.

	* app/pdb/gimpprocedure.c
	* app/plug-in/gimppluginprocedure.c: use the GIMP_PDB_ERROR and
	GIMP_PLUG_IN_ERROR domains.


svn path=/trunk/; revision=27626
2008-11-12 10:06:07 +00:00
Martin Nordholts d85d7ac785 Align static function prototypes.
* app/tools/gimptransformtool.c: Align static function prototypes.

svn path=/trunk/; revision=27625
2008-11-12 06:17:01 +00:00
Michael Natterer 65b2a60455 add read-only "offset-x" and "offset-y" properties. Call
2008-11-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.c: add read-only "offset-x" and "offset-y"
	properties. Call gimp_item_set_offset() from all places that set
	offset_x and offset_y in this file. Freeze and thaw GObject
	notification around all calls to virtual functions which might
	emit notify. Add missing notifications whenever width and height
	change.

	* app/core/gimpimage-rotate.c: use gimp_item_set_offset() instead
	of setting the values manually.


svn path=/trunk/; revision=27623
2008-11-11 21:14:52 +00:00
Sven Neumann cee9feca8f Bug 560300 – Document History did not clear when "Keep record of used
2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 560300 – Document History did not clear when "Keep record of
	used files" was unchecked
	
	* app/actions/documents-commands.c 
(documents_clear_cmd_callback):
	don't purge the entire GtkRecentManager, but only clear items
	added by GIMP. Do this regardless of the "save-document-history"
	gimprc option.


svn path=/trunk/; revision=27622
2008-11-11 20:37:15 +00:00
Sven Neumann c2c4183596 Bug 560375 – Clearing an already empty document history crashes GIMP
2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 560375 – Clearing an already empty document history crashes 
GIMP

	* app/actions/documents-commands.c 
(documents_clear_cmd_callback):
	gtk_recent_manager_purge_items() may return 0 but not set an
	error.


svn path=/trunk/; revision=27620
2008-11-11 20:09:05 +00:00
Michael Natterer c02822ea05 Bug 559580 – Image windows need better default locations
2008-11-11  Michael Natterer  <mitch@gimp.org>

	Bug 559580 – Image windows need better default locations

	* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
	Only set GDK_HINT_USER_POS on the empty display because it gets a
	position set by gimp. All other displays should be placed by the
	window manager. Fixes all displays appearing at 0,0.


svn path=/trunk/; revision=27615
2008-11-11 10:12:51 +00:00
Sven Neumann 52c583cdd8 Bug 558797 – "Export Path" doesn't remember last used folder
2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 558797 – "Export Path" doesn't remember last used folder

	* app/actions/vectors-commands.c: remember last-used folders in
	the Path Import and Export dialogs.


svn path=/trunk/; revision=27614
2008-11-11 08:24:21 +00:00
Sven Neumann 8ad82efc25 Bug 560283 – "Scale image..." causes distortion around edges.
2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 560283 – "Scale image..." causes distortion around edges.

	* app/paint-funcs/scale-region.c (scale): corrected fix for
	bug #556248.


svn path=/trunk/; revision=27612
2008-11-11 07:47:31 +00:00
Martin Nordholts a092afea5b Show selection info from the image under the cursor.
* app/display/gimpcursorview.c ()
(gimp_cursor_view_update_cursor): Show selection info from the
image under the cursor.

(gimp_cursor_view_clear_cursor): Start showing selection info from
the active image again.

svn path=/trunk/; revision=27608
2008-11-10 22:18:33 +00:00
Michael Natterer 19e7f9e316 app/core/gimpprojection.[ch] add code that keeps the gegl processor around
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]
	* app/core/gimpprojection-construct.c: add code that keeps the
	gegl processor around across calls, but destroy it anyway until
	gegl_processor_set_rectangle() is fixed.


svn path=/trunk/; revision=27607
2008-11-10 22:15:40 +00:00
Martin Nordholts bb85dbbf24 Bug 559716 – Changing crop size in Crop Tool Options can make UI
unresponsive

* app/tools/gimprectangletool.c: Accept a broader range of x, y,
width and height values from the tool options so we don't end up
in an infinite signal emission loop.

svn path=/trunk/; revision=27605
2008-11-10 20:10:50 +00:00
Sven Neumann 84953f5744 added translation context.
2008-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcursorview.c: added translation context.


svn path=/trunk/; revision=27604
2008-11-10 19:40:34 +00:00
Martin Nordholts a9d1c12720 Bug 138101 – Pointer (Information) tab should display selection
bounds

* app/display/gimpcursorview.c: Show the position and size of the
bounding box of the selection in the active image using the unit
of the active image window.

(gimp_cursor_view_format_as_unit): Don't add the unit abbreviation
if the unit is px.

svn path=/trunk/; revision=27603
2008-11-10 18:43:26 +00:00
Michael Natterer fb3fca651b use GIMP_CURVE_FREE, not _SMOOTH. Fixes the resp. PDB call.
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-curves.c (gimp_drawable_curves_explicit):
	use GIMP_CURVE_FREE, not _SMOOTH. Fixes the resp. PDB call.


svn path=/trunk/; revision=27601
2008-11-10 15:18:40 +00:00
Sven Neumann 83dd28e7a0 use NC_() to provide translation contexts.
2008-11-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpunit.c: use NC_() to provide translation 
contexts.


svn path=/trunk/; revision=27600
2008-11-10 11:41:51 +00:00
Sven Neumann ff5e76cf5c added missing mnemonic.
2008-11-10  Sven Neumann  <sven@gimp.org>

	* app/actions/text-tool-actions.c (text_tool_actions): added
	missing mnemonic.


svn path=/trunk/; revision=27598
2008-11-10 08:59:10 +00:00
Sven Neumann 345abd7c8f Bug 559725 – Allow to set image-type and image-num-layers for thumbnail
2008-11-10  Sven Neumann  <sven@gimp.org>

	Bug 559725 – Allow to set image-type and image-num-layers for
	thumbnail

	* app/file/file-open.[ch] (file_open_thumbnail): added 
parameters
	for image-type and number of layers. Try to get these from the
	procedure return values. Changes based on a patch from "tks".

	* app/core/gimpimagefile.c (gimp_imagefile_create_thumbnail)
	(gimp_thumbnail_set_info): set image-type and number of layers 
if
	specified.


svn path=/trunk/; revision=27595
2008-11-10 08:21:36 +00:00
Michael Natterer 6f6ecb4ffa app/core/gimpdrawable-foreground-extract.c app/core/gimpdrawable-preview.c
2008-11-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-foreground-extract.c
	* app/core/gimpdrawable-preview.c 
	* app/core/gimplayer-project.c: use gimp_drawable_get_colormap()
	instead of gimp_image_get_colormap().


svn path=/trunk/; revision=27592
2008-11-10 01:43:34 +00:00
Martin Nordholts 7c1c0ea7dc Bug 558549 – Stroking a single-point path with a paint tool
crashes GIMP

* app/paint/gimppaintcore-stroke.c
(gimp_paint_core_stroke_vectors): Return an error message if there
were not enough points to stroke.

* app/dialogs/stroke-dialog.c (stroke_dialog_response): Guard
against crashes if an implementator forgets to set an error.

svn path=/trunk/; revision=27589
2008-11-09 20:12:37 +00:00
Martin Nordholts 60424fa0af Clean up and simplify little.
* app/display/gimpnavigationeditor.c: Clean up and simplify
little.

svn path=/trunk/; revision=27588
2008-11-09 20:01:44 +00:00
Martin Nordholts 9aded56913 Avoid critical warnings when converting an image window with a unit other
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_update_rulers): Avoid critical warnings
when converting an image window with a unit other than pixels into
a the empty image window. Probably fixes some of the crashes
reported by Windows users.

svn path=/trunk/; revision=27586
2008-11-09 19:56:03 +00:00
Michael Natterer 069bbbd142 move GimpCursorView typedef from here...
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-types.h: move GimpCursorView typedef from
	here...

	* app/display/display-types.h: ...to here.


svn path=/trunk/; revision=27585
2008-11-09 19:34:12 +00:00
Michael Natterer 1cdf6c5b7f remove floating_sel_remove() and reorder one function.
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.[ch]: remove
	floating_sel_remove() and reorder one function.

	* app/core/gimpimage.c (gimp_image_remove_layer): add the single
	line of special code that needs to be done when removing a
	floating selection.

	* app/core/gimpselection.c
	* app/actions/layers-commands.c
	* tools/pdbgen/pdb/floating_sel.pdb: changed accordingly.

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

	* app/core/core-enums.[ch]
	* app/core/gimpimage-undo.c: remove enum value
	GIMP_UNDO_GROUP_FS_REMOVE.


svn path=/trunk/; revision=27583
2008-11-09 18:45:16 +00:00
Michael Natterer 40f27d6b81 app/core/gimpdrawable.c app/core/gimpimage-convert.c
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.c
	* app/core/gimpimage-convert.c
	* app/core/gimpprojection-construct.c
	* app/tools/gimpeditselectiontool.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c: remove inclusion of "gimplayer-floating-sel.h"


svn path=/trunk/; revision=27582
2008-11-09 18:36:29 +00:00
Martin Nordholts 983c3751c2 Prepare GimpCursorView for a dependency to GimpDisplayShell.
* app/widgets/gimpcursorview.[ch]: Move from here...

* app/display/gimpcursorview.[ch]: ...to here.

* app/widgets/Makefile.am
* app/display/Makefile.am: Change accordingly.

* app/actions/cursor-info-actions.c
* app/dialogs/dialogs-constructors.c
* app/actions/cursor-info-commands.c
* app/display/gimpdisplayshell-cursor.c: Update includes.

svn path=/trunk/; revision=27581
2008-11-09 17:51:43 +00:00
Michael Natterer 509feafa4a made floating_sel_composite() private and simplify it a lot by using
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer-floating-sel.[ch]: made
	floating_sel_composite() private and simplify it a lot by using
	gimp_rectangle_intersect().


svn path=/trunk/; revision=27580
2008-11-09 17:15:00 +00:00
Michael Natterer 855b114f50 Bye bye floating_sel_rigor() and floating_sel_relax():
2008-11-09  Michael Natterer  <mitch@gimp.org>

	Bye bye floating_sel_rigor() and floating_sel_relax():

	* app/core/gimpdrawable.[ch] (gimp_drawable_init_src_region):
	implement compositing the floating selection on the fly. Add
	return parameter "TileManager **temp_tiles" which returns the temp
	buffer used for compositing; the caller has to unref the tiles.

	* app/core/gimpchannel-project.c
	* app/core/gimplayer-project.c: unref the temp_tiles.

	* app/core/gimplayer.[ch]: remove members fs.backing_store and
	fs.initial.

	* app/core/gimplayer-floating-sel.[ch]: remove functions rigor(),
	relax(), store() and restore(), they are not needed any longer.
	Some minor cleanup, more to come.

	* app/core/gimpprojection-construct.c: don't composite the
	floating selection before projecting because that happens on the
	fly now.

	* app/core/core-enums.[ch]
	* app/core/gimpfloatingselundo.c
	* app/core/gimpimage-undo-push.[ch]: remove the rigor and relax
	undos.

	* app/core/gimpdrawable.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage.c
	* app/core/gimplayer.c
	* app/xcf/xcf-save.c: remove all calls to rigor and relax and all
	implementations of virtual functions that were just there to
	rigor/releax around chaining up.

	* tools/pdbgen/pdb/floating_sel.pdb: remove all code from the
	rigor and relax wrappers and deprecate the API.

	* app/pdb/floating-sel-cmds.c
	* libgimp/gimpfloatingsel_pdb.[ch]: regenerated.

	* plug-ins/file-xjt/xjt.c: don't call rigor and relax.


svn path=/trunk/; revision=27579
2008-11-09 16:49:37 +00:00
Martin Nordholts b2379f44b3 Don't expose implementation details, introduce internal helper functions,
* app/widgets/gimpcursorview.[ch]: Don't expose implementation
details, introduce internal helper functions, and make coordinates
outside the image be represented with an italic font instead of
enclosed in parenthesis.

svn path=/trunk/; revision=27578
2008-11-09 14:02:38 +00:00
Michael Natterer 198416450d add optional parameter "PixelRegion *destPR" to
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add optional parameter "PixelRegion
	*destPR" to GimpDrawable::apply_region().

	* app/core/gimpdrawable-combine.[ch]: if the passed destPR is !=
	NULL, write the result of the combination into that region instead
	of the drawable's tiles. The region must have the exact size of
	the result.

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-shadow.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimagemap.c
	* app/core/gimplayer-floating-sel.c
	* app/paint/gimppaintcore.c: pass NULL as destPR. Code actually
	using this feature follows.


svn path=/trunk/; revision=27574
2008-11-08 19:52:18 +00:00
Michael Natterer ca62c2aa0e add new function gimp_drawable_init_src_region() which will initialize a
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch]: add new function
	gimp_drawable_init_src_region() which will initialize a
	PixelRegion on this drawable's "projection" (with the floating
	selection combined), but for now just uses drawable->tiles.

	* app/core/gimpchannel-project.c
	* app/core/gimplayer-project.c: use it instead of
	pixel_region_init() on the drawable's tiles.


svn path=/trunk/; revision=27573
2008-11-08 17:23:21 +00:00
Michael Natterer 667b4558de cleanup.
2008-11-08  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable-combine.c: cleanup.


svn path=/trunk/; revision=27572
2008-11-08 17:20:34 +00:00
Michael Natterer 6d2a6d5efa Abstract the legacy projection code away into a virtual function of
2008-11-08  Michael Natterer  <mitch@gimp.org>

	Abstract the legacy projection code away into a virtual function
	of GimpDrawable:

	* app/core/gimpdrawable.[ch]: add new virtual function
	GimpDrawable::project_region() which projects an area of a
	drawable onto a passed in PixelRegion.

	* app/core/Makefile.am
	* app/core/gimpchannel-project.[ch]
	* app/core/gimplayer-project.[ch]: new files which implement it.

	* app/core/gimpchannel.c
	* app/core/gimplayer.c: hook it in.

	* app/core/gimpprojection-construct.c: get rid all the projection
	code moved to above new files and project all drawables in one
	loop.

	* app/core/gimpprojectable.[ch]: remove the legacy methods
	get_colormap() and get_components(), they are not needed any
	longer.

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


svn path=/trunk/; revision=27571
2008-11-08 00:16:40 +00:00
Sven Neumann f8666de70f improved error handling. Fixes compiler warnings about ignoring the return
2008-11-07  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load_aco): improved
	error handling. Fixes compiler warnings about ignoring the 
return
	value of read().


svn path=/trunk/; revision=27570
2008-11-07 09:32:23 +00:00
Michael Natterer 0b2061c150 move the invalidate_previews() API from here...
2008-11-06  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: move the invalidate_previews()
	API from here...

	* app/core/gimpitemstack.[ch]: ...to here.

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


svn path=/trunk/; revision=27569
2008-11-06 19:44:51 +00:00
Michael Natterer a3d556c0ca app/core/Makefile.am app/core/core-types.h new GimpList subclass which
* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpitemstack.[ch]: new GimpList subclass which (for
	now) does nothing but taking ownership of its children by the
	means of g_object_ref_sink().

	* app/core/gimpdrawablestack.[ch]: derive from GimpItemStack.

	* app/core/gimpimage.c: use a GimpItemStack instead of a plain
	GimpList for the list of vectors. Remove code which takes
	ownerships of added items from gimp_image_add_layer(),
	add_channel() and add_vectors().


svn path=/trunk/; revision=27568
2008-11-06 19:09:59 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Michael Natterer f31a539917 some minor cleanups.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.c: some minor cleanups.


svn path=/trunk/; revision=27561
2008-11-05 21:48:06 +00:00
Michael Natterer c0cc7c1156 add new function gimp_drawable_stack_invalidate_previews() which does just
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add new function
	gimp_drawable_stack_invalidate_previews() which does just what it
	says.

	* app/core/gimpimage.[ch]: merge invalidate_layer_previews() and
	invalidate_channels_previews() into a single invalidate_previews()
	and replace all calls to the old functions by calls to
	gimp_drawable_stack_invalidate_previews().

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


svn path=/trunk/; revision=27560
2008-11-05 20:48:59 +00:00
Michael Natterer 4381e415a0 remove call to gimp_image_invalidate_layer_previews(), they are
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-convert.c (gimp_image_convert): remove call
	to gimp_image_invalidate_layer_previews(), they are invalidated by
	exchanging their tiles and by setting the image's colormap anyway.


svn path=/trunk/; revision=27559
2008-11-05 20:38:30 +00:00
Michael Natterer c4f43d49c2 This should remove any image or viewable dependency from the projection
2008-11-05  Michael Natterer  <mitch@gimp.org>

	This should remove any image or viewable dependency from the
	projection (apart from the projectable's get_image() method, but
	that one is not supposed to return the projection's model but
	rather the image the projection is part of).

	* app/core/gimpprojectable.[ch]: add vfunc get_size() which
	completes the API needed for GEGL projection.

	Add vfuncs get_layers(), get_channels(), get_components() and
	get_colormap() which are needed for the legacy projection code.

	* app/core/gimpimage.c: implement the new methods.

	* app/core/gimpprojection.c
	* app/core/gimpprojection-construct.c: use them and remove all
	calls to image and viewable API.


svn path=/trunk/; revision=27558
2008-11-05 20:10:51 +00:00
Michael Natterer 62a74f9da6 add signal "structure-changed" and API to emit it.
2008-11-05  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add signal "structure-changed"
	and API to emit it.

	* app/core/gimpimage.c: emit it when the image emits
	"mode-changed" and "size-changed".

	* app/core/gimpprojection.c: connect to the new signal instead of
	"mode-changed" and "size-changed" to get rid of one more image
	dependency.


svn path=/trunk/; revision=27556
2008-11-04 23:22:45 +00:00
Sven Neumann a40525ac39 when dropping multiple images to the empty image window, open them as
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_uri_list): when dropping multiple 
images
	to the empty image window, open them as seperate images.


svn path=/trunk/; revision=27554
2008-11-04 22:32:15 +00:00
Michael Natterer 7d8b7f5534 add vitrual function invalidate_preview().
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojectable.[ch]: add vitrual function
	invalidate_preview().

	* app/core/gimpimage.c: implement it and redirect to
	gimp_viewable_invalidate_preview().

	* app/core/gimpprojection.c: call the new API instead of
	gimp_viewable_invalidate_preview(). Some cleanup in the disabled
	cow-projection code.


svn path=/trunk/; revision=27553
2008-11-04 20:13:12 +00:00
Michael Natterer 716e00f88b Unfinished first step to make the projection independent of GimpImage,
2008-11-04  Michael Natterer  <mitch@gimp.org>

	Unfinished first step to make the projection independent of
	GimpImage, also one step closer to layer grouping.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/core/gimpprojectable.[ch]: add new interface which abstracts
	something that can have a projection attached to it. Has "update"
	and "flush" signals and get_graph() and get_image()
	vfuncs. get_image() is temporary until the hack is finishes.

	* app/core/gimpimage.[ch]: implement GimpProjectableInterface,
	remove "update" and "flush" signals and made get_graph() a private
	implementation of the interface method. Moved interface method
	implementations after virtual function implementations.

	* app/core/gimpprojection.[ch]: change member "image" to
	"projectable" and use the projectable API as often as
	possible. Still some implicit dependencies on the projectable
	being an image left but it's getting close.

	* app/core/gimpprojection-construct.c: same here.


svn path=/trunk/; revision=27552
2008-11-04 18:06:36 +00:00
Sven Neumann cc7222d8e4 added missing include.
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplay-foreach.c: added missing include.

	* app/actions/debug-commands.c
	* plug-ins/common/lcms.c
	* plug-ins/common/mail.c
	* plug-ins/file-bmp/bmp-write.c
	* plug-ins/file-fits/fits.c
	* plug-ins/file-jpeg/jpeg.c
	* plug-ins/file-uri/uri.c
	* plug-ins/help/gimphelpdomain.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/print/print.c: fixed use of g_message() with literal
	strings.


svn path=/trunk/; revision=27551
2008-11-04 14:05:24 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 87dc343b21 remove public functions get_tiles(), get_image(), get_image_type() and
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]: remove public functions
	get_tiles(), get_image(), get_image_type() and get_bytes().

	* app/actions/debug-commands.c
	* app/actions/layers-commands.c
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-render.c
	* app/paint/gimppaintcore.c
	* tools/pdbgen/pdb/layer.pdb: use the GimpPickable API insatead.

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


svn path=/trunk/; revision=27547
2008-11-04 12:07:17 +00:00
Sven Neumann b5ff19f743 reverted last change as the code in tile-pyramid does care about the pixel
2008-11-04  Sven Neumann  <sven@sven>

	* app/base/tile-pyramid.[ch] (tile_pyramid_new):
	* app/core/gimpprojection.c 
(gimp_projection_get_tiles_at_level):
	reverted last change as the code in tile-pyramid does care about
	the pixel format and it should continue to reject types that it
	cannot handle.


svn path=/trunk/; revision=27545
2008-11-04 09:07:38 +00:00
Michael Natterer 6f300a579c changed "type" parameter into "bytes" because tile managers don't care
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/base/tile-pyramid.[ch] (tile_pyramid_new): changed "type"
	parameter into "bytes" because tile managers don't care about
	the pixel format of their tiles. Reordered parameters to match
	tile_manager_new().

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
	pass the bytes instead of the image type.


svn path=/trunk/; revision=27544
2008-11-04 08:50:04 +00:00
Sven Neumann 2409d06ddb app/text/Makefile.am removed this header file.
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/text/Makefile.am
	* app/text/gimptext-private.h: removed this header file.

	* app/text/gimptextlayout.[ch]: added getters to access the
	resolution, text and PangoLayout.

	* app/text/gimptextlayout-render.c
	* app/tools/gimptexttool.c: use the new getters instead of 
poking
	into the GimpTextLayout struct.


svn path=/trunk/; revision=27543
2008-11-03 23:44:19 +00:00
Sven Neumann 7dc80b79be app/text/Makefile.am removed.
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/text/Makefile.am
	* app/text/gimptext-bitmap.[ch]: removed.

	* app/text/gimptext-private.h
	* app/text/gimptext-vectors.c
	* app/text/gimptextlayer.c
	* app/text/gimptextlayout-render.[ch]
	* app/text/gimptextlayout.c: removed text render abstraction as
	this is now sufficiently provided by PangoCairo.


svn path=/trunk/; revision=27542
2008-11-03 23:25:05 +00:00
Martin Nordholts 3cd7f45a2b Reuse the blending formula from the legacy Soft light. (Actually the
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Reuse the blending
formula from the legacy Soft light. (Actually the formula comes
from legacy Overlay but legacy Overlay and Soft light blends
pixels exactly the same.) I hereby declare the porting of the
layer modes to this GEGL operation complete. Summary:

Completely works the same:

  Normal, Dissolve, Behind, Color Erase, Erase, Anti Erase

Works the same for 100% opaque layers:

  Lighten only, Screen, Dodge, Addition, Darken only, Multiply,
  Dodge, Soft light, Hard light, Difference, Subtract, Grain
  extract, Grain merge, Divide, Hue, Saturation, Color, Value

Works different but similar:

  Overlay now uses the SVG 1.2 overlay formula which is different
  but similar to legacy Overlay

  Replace needs to be externally masked to not replace too much,
  but that is outside the scope of the layer mode porting.

svn path=/trunk/; revision=27541
2008-11-03 23:00:40 +00:00
Martin Nordholts 052a86548e Arrange layer modes into more logical and useful groups.
* app/widgets/gimpwidgets-constructors.c
(gimp_paint_mode_menu_new): Arrange layer modes into more logical
and useful groups.

svn path=/trunk/; revision=27540
2008-11-03 22:56:28 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Michael Natterer b994ab724e app/core/gimp-edit.c app/core/gimpchannel.c
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-edit.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpdrawable.c
	* app/core/gimpdrawablemodundo.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/core/gimpselection.c
	* app/text/gimptext-compat.c
	* app/text/gimptextlayer-xcf.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/layer.pdb: use accessors for item->offset_x,y.
	Some minor unrelated cleanups.

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


svn path=/trunk/; revision=27537
2008-11-03 21:17:50 +00:00
Michael Natterer 50f8d85ca3 include "gimpcontainer.h".
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/actions/vectors-actions.c: include "gimpcontainer.h".


svn path=/trunk/; revision=27536
2008-11-03 20:57:33 +00:00
Michael Natterer 56b5909c8a add "GimpImageType type" parameter because there are only a few calls to
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawable.[ch] (gimp_drawable_set_tiles): add
	"GimpImageType type" parameter because there are only a few calls
	to this function which (can easily pass the current type); however
	most calls to gimp_drawable_set_tiles_full() were just using the
	function because of the type argument and passed in the item's
	current offsets (which means peeking into the item struct or using
	temp variables).

	* app/core/gimpdrawable-offset.c (gimp_drawable_offset)
	* app/text/gimptextlayer.c (gimp_text_layer_render)
	* app/tools/gimptransformtool.c (gimp_transform_tool_doit): pass
	the type to set_tiles().

	* app/core/gimpchannel.c (gimp_channel_convert)
	* app/core/gimpimage-convert.c (gimp_image_convert)
	* app/core/gimplayer.c (gimp_layer_convert,add_alpha,flatten):
	change calls to set_tiles_full() into set_tiles() because the
	offset doesn't change.


svn path=/trunk/; revision=27535
2008-11-03 20:51:46 +00:00
Michael Natterer 847de4dda6 Bug 559015 – Move tool gives bad information about px moved
2008-11-03  Michael Natterer  <mitch@gimp.org>

	Bug 559015 – Move tool gives bad information about px moved

	* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_init):
	set cursor precision to PIXEL_BORDER because that's what the move
	tool snaps to.

	Unrelated: set CENTER_CROSS_SIZE to an odd number so it's drawn
	symmetrically.


svn path=/trunk/; revision=27533
2008-11-03 19:31:58 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

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


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Martin Nordholts c3b7be242c Instantiate offset_node on-demand.
* app/core/gimpitem.c: Instantiate offset_node on-demand.

* app/core/gimpdrawable.c: Use gimp_item_set_offset().

svn path=/trunk/; revision=27530
2008-11-02 23:16:47 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Martin Nordholts 594bc84ace New function that sets the offset of the item and also keeps the
* app/core/gimpitem.c (gimp_item_set_offsets): New function that
sets the offset of the item and also keeps the offset_node in
sync.

* app/core/gimpdrawable.c (gimp_drawable_real_set_tiles): Use the
function instead of setting the offsets directly. Fixes corrupted
display when cropping images with GEGL enabled for the projection.

svn path=/trunk/; revision=27528
2008-11-02 22:44:33 +00:00
Martin Nordholts 93577a2eec Moved the shift_node from GimpLayer to GimpItem, and call it offset_node.
* app/core/gimpitem.[ch]: Moved the shift_node from GimpLayer to
GimpItem, and call it offset_node. Also added
gimp_item_get_offset_node() meant to be used in the same way as
gimp_item_offsets().

(gimp_item_real_translate): Keep the offset_node up to date.

* app/core/gimplayer.[ch]: Don't manage the offset_node, get it
from GimpItem instead.

svn path=/trunk/; revision=27527
2008-11-02 22:29:05 +00:00
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

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


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

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


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer c14c84ba63 add "update" signal with the same signature as GimpImage::update().
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdrawablestack.[ch]: add "update" signal with the
	same signature as GimpImage::update(). Install handlers for the
	drawables' "update" and "visibility-changed" signals and emit
	"update" accordingly, item offsets taken into account. Also emit
	"update" when drawables are added, removed and reordered.

	* app/core/gimpimage.[ch]: remove handlers and tons of code that
	makes sure the image emits "update" on any of the above handled
	events and simply connect the layer and channel stacks' "update"
	signal to gimp_image_update().


svn path=/trunk/; revision=27523
2008-11-02 19:53:51 +00:00
Michael Natterer 50ac74be1e remove the mask_node and simply set both opacity and the layer mask's
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch]: remove the mask_node and simply set
	both opacity and the layer mask's source node on the opacity_node.
	Needs latest SVN GEGL.


svn path=/trunk/; revision=27522
2008-11-02 18:39:10 +00:00
Martin Nordholts 24fac1de0f Move the base GeglNode here in preparation for moving the GimpLayer
* app/core/gimpitem.[ch]: Move the base GeglNode here in
preparation for moving the GimpLayer gegl:shift op to here as
well. After all, the offsets are properties of GimpItem and not
GimpLayer.

* app/core/gimpdrawable.[ch]: Delegate appropriate stuff to the
GimpItem base class, like part of the visibility toggling and the
creation and destruction of the GimpItem node.

* app/core/gimplayer.c
* app/core/gimpchannel.c
* app/core/gimpdrawablestack.c: Changed accordingly, use the new
function names.

* app/core/gimpitempropundo.c
* app/vectors/gimpvectors-warp.c
* app/vectors/gimpvectorsmodundo.c: Include gegl.h instead of
glib-object.h

svn path=/trunk/; revision=27521
2008-11-02 16:39:38 +00:00
Michael Natterer 5fdbd3f58e set the MOVE cursor when we are in MOVING mode.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c
	(gimp_rectangle_tool_cursor_update): set the MOVE cursor when we
	are in MOVING mode.

	* app/tools/gimptexttool.[ch]: remove members x1,x2,y1,y2 and use
	the rectangle tool's bounding box for creating the text layer (x2
	and y2) were unused anyway. Add boolean member "moving". Implement
	oper_update() and set the tool to moving mode when ALT is pressed.
	Changed button_press(), button_release() and motion() accordingly.
	Some more cleanup and removal of comented out code.


svn path=/trunk/; revision=27519
2008-11-01 19:05:56 +00:00
Michael Natterer f7287be7b5 app/tools/gimptool.[ch] made all GimpCoords* in the tool API const.
2008-11-01  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]
	* app/tools/tool_manager.[ch]: made all GimpCoords* in the tool
	API const.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbrushtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimpeditselectiontool.[ch]
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.[ch]
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.[ch]
	* app/tools/gimpsourcetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: changed accordingly and added const
	to all GimpCoords* in utility functions too.

	* app/tools/gimptexttool.c: don't modify the passed coords. In
	fact, simply removed the code that did because it had no effect.


svn path=/trunk/; revision=27517
2008-11-01 15:17:36 +00:00
Martin Nordholts ca618e3f0b Replaced the XXX for Soft light with a FIXME.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Replaced the XXX for
Soft light with a FIXME.

svn path=/trunk/; revision=27514
2008-11-01 12:23:14 +00:00
Martin Nordholts a9e187586b Prefix the GIMP GEGL operations with "gimp:" instead of "gimp-" so we
* app/gegl/gimpoperation*.c: Prefix the GIMP GEGL operations with
"gimp:" instead of "gimp-" so we follow the GEGL prefix style and
better serialize to XML.

* app/tools/gimp*tool.c

* app/core/gimpdrawable-*.c
* app/core/gimpdrawable.c
* app/core/gimpimagemap.c
* app/core/gimpprojection.c: Changed accordingly.

svn path=/trunk/; revision=27512
2008-11-01 12:08:35 +00:00
Martin Nordholts 657946b2a7 Introduced helper macros fooC to properly un-multiply pre-multiplied data
* app/gegl/gimpoperationpointlayermode.c: Introduced helper macros
fooC to properly un-multiply pre-multiplied data without causing
NaNs. This fixes some compositing issues involving complete
transparency.

svn path=/trunk/; revision=27511
2008-11-01 09:52:58 +00:00
Martin Nordholts 891156945a Renamed fooC aliases to fooCa since they represent pre-multiplied color
* app/gegl/gimpoperationpointlayermode.c: Renamed fooC aliases to
fooCa since they represent pre-multiplied color data.

svn path=/trunk/; revision=27510
2008-11-01 09:43:27 +00:00
Martin Nordholts 0166d505c1 Get rid of GRand in process() and use a lut instead. A little benchmark
* app/gegl/gimpoperationpointlayermode.c: Get rid of GRand in
process() and use a lut instead. A little benchmark showed a
performance improvement of 78%. Also added defines for the the
size of the area of which Dissolve repeats it dissolve pattern.

svn path=/trunk/; revision=27509
2008-11-01 07:36:03 +00:00
Martin Nordholts 5d7bf3ca4b Implemented Erase, Anti Erase, Color Erase and Replace. These are not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented Erase, Anti
Erase, Color Erase and Replace. These are not normal layer modes
and handle alpha in their own way. In addition to this, the
behavior of Replace doesn't map very well to GEGL which uses
infinite sized "layers".

Completely works the same:
 o Erase
 o Anti Erase
 o Color Erase

Works different but similar:
 o Replace

* app/paint-funcs/paint-funcs.[ch]: Expose
paint_funcs_color_erase_helper() so it can be used in the
GimpOperationPointLayerMode implementation. Once the migration is
complete this function can be moved entirely to the op and be
tailored to work on premultiplied data.

svn path=/trunk/; revision=27502
2008-10-31 21:02:26 +00:00
Sven Neumann 2fe030bd19 Bug 558660 – help behavior for locales without manual translation
2008-10-31  Sven Neumann  <sven@gimp.org>

	Bug 558660 – help behavior for locales without manual 
translation
	
	* app/widgets/gimphelp.c (gimp_help_user_manual_is_installed):
	as a fallback check for the english user manual.


svn path=/trunk/; revision=27500
2008-10-31 20:00:19 +00:00
Michael Natterer 5400234712 bail out when the passed display is != tool->display. Makes the keyboard
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
	when the passed display is != tool->display. Makes the keyboard
	work in other displays while the text tools is active.


svn path=/trunk/; revision=27498
2008-10-31 16:49:59 +00:00
Michael Natterer f971d31ff1 add gimp_draw_tool_draw_text_cursor() which draws a properly transformed
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.[ch]: add gimp_draw_tool_draw_text_cursor()
	which draws a properly transformed cursor that always has the same
	line width.

	* app/tools/gimptexttool.c (gimp_text_tool_draw): use it instead
	of drawing a cursor here that is broken at anything but 1:1 zoom.


svn path=/trunk/; revision=27497
2008-10-31 16:48:29 +00:00
Michael Natterer 9e7edcbe41 app/actions/text-tool-actions.c add missing includes and remove unused
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.c: add missing includes and
	remove unused variable.


svn path=/trunk/; revision=27496
2008-10-31 13:18:55 +00:00
Sven Neumann 3c15e5ed19 removed checks for PangoFT2.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* INSTALL: 
	* configure.in: removed checks for PangoFT2.

	* app/config/Makefile.am
	* app/text/Makefile.am
	* app/Makefile.am: removed use of PANGOFT2_CFLAGS and 
PANGOFT2_LIBS.


svn path=/trunk/; revision=27490
2008-10-31 07:53:40 +00:00
Sven Neumann 437c046da4 app/text/gimpfont.c render font previews using PangoCairo.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* app/text/gimpfont.c
	* app/text/gimpfontlist.c: render font previews using 
PangoCairo.


svn path=/trunk/; revision=27489
2008-10-31 07:24:11 +00:00
Sven Neumann 94dd20dadc bumped minimum required version of Cairo to 1.6.4.
2008-10-31  Sven Neumann  <sven@gimp.org>

	* configure.in: bumped minimum required version of Cairo to 
1.6.4.

	* app/core/gimpscanconvert.c: use 
cairo_format_stride_for_width().


svn path=/trunk/; revision=27488
2008-10-31 07:20:07 +00:00
Martin Nordholts b5733dd32e Formating, simplification and fixed operator precedence for the seed (not
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Formating,
simplification and fixed operator precedence for the seed (not
that it matters much).

svn path=/trunk/; revision=27487
2008-10-31 07:04:31 +00:00
Martin Nordholts fc7e65e783 Formating and simplification.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Formating and
simplification.

svn path=/trunk/; revision=27486
2008-10-30 23:37:45 +00:00
Martin Nordholts 12ea533fc3 The GEGL API actually allows us to handle the Dissolve layer mode as a
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): The GEGL API actually
allows us to handle the Dissolve layer mode as a point op. The
GEGL implementation of Dissolve uses a faster implementation for
deterministic behavior than the legacy Dissolve implementation.
The end result should be identical (although not on the
pixel-level).

Completely works the same:
 o Dissolve

svn path=/trunk/; revision=27485
2008-10-30 23:18:35 +00:00
Michael Natterer 106b09f5ae bail out instead of crashing if the tool has no display.
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
	instead of crashing if the tool has no display.

	(gimp_text_tool_draw)
	(gimp_text_tool_draw_preedit)
	(gimp_text_tool_draw_selection)
	(gimp_text_tool_xy_to_offset): need to adjust all drawing and
	event coordinates by a possible negative offset between logical
	rectangle and ink rectangle (if the ink rectangle is larger than
	the logical one).

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): continue normally if
	tool_manager_key_press_active() returns FALSE.


svn path=/trunk/; revision=27484
2008-10-30 23:13:24 +00:00
Sven Neumann dfd721ef5b app/text/gimp-fonts.c removed unused includes.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimp-fonts.c
	* app/text/gimpfont-utils.c: removed unused includes.


svn path=/trunk/; revision=27483
2008-10-30 22:27:57 +00:00
Michael Natterer 7ee008bc48 remove lots of unused variables, apparently my builds were without proper
2008-10-30  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: remove lots of unused variables,
	apparently my builds were without proper warnings for some time.
	Some formatting cleanup and code reordering.

	* app/actions/text-tool-actions.c
	* menus/text-tool-menu.xml: rename "text-tool-input-methods"
	to "text-tool-input-methods-menu".


svn path=/trunk/; revision=27482
2008-10-30 22:18:16 +00:00
Sven Neumann c214f41285 fixed order of includes.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout.c: fixed order of includes.

	* app/text/gimptext-compat.c: ported to PangoCairo like the rest
	of the text rendering code.


svn path=/trunk/; revision=27481
2008-10-30 22:17:52 +00:00
Sven Neumann d3cc6a2cf6 removed an obsolete and misleading comment.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayout-render.c: removed an obsolete and
	misleading comment.


svn path=/trunk/; revision=27480
2008-10-30 22:07:25 +00:00
Martin Nordholts 31e64dace0 Bug 558215 – unit and zoom entries in Statusbar not visible
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_size_allocate): Don't try to be clever,
call gimp_display_shell_scaled() whenever the canvas size changes
so a newly created display shell gets updated properly.

svn path=/trunk/; revision=27469
2008-10-29 22:28:48 +00:00
Sven Neumann b1ff252ca9 Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558451 – Cannot build GIMP using Sun CC on Solaris 2.8

	* app/pdb/gimp-pdb-compat.c
	* app/gegl/gimpoperationtilesink.c
	* app/gegl/gimpoperationtilesource.c
	* app/tools/gimpgegltool.c: applied patches from Eric Lamarque
	fixing the build using Sun CC on Solaris.


svn path=/trunk/; revision=27467
2008-10-29 22:24:08 +00:00
Martin Nordholts 5aa338c668 Implemented the layer modes Hue, Saturation, Color and Value.
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Implemented the layer
modes Hue, Saturation, Color and Value.

Works the same for 100% opaque layers:
 o Hue
 o Saturation
 o Color
 o Value

* libgimpcolor/gimphsl.[ch]: Added gimp_hsl_set().

svn path=/trunk/; revision=27466
2008-10-29 21:25:35 +00:00
Michael Natterer 82ca223376 change member "gboolean stroking" into "gint stroking_count". Add push/pop
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpselection.[ch]: change member "gboolean stroking"
	into "gint stroking_count". Add push/pop API to increase/decrease
	the counter. Pretend the selection is empty if the counter is > 0.
	Enables correctly rendering vector layers even if there is a
	selection.


svn path=/trunk/; revision=27464
2008-10-29 19:55:58 +00:00
Sven Neumann 064f2afd85 Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 557950 – Scaling in Gimp 2.6 is much slower than in Gimp 2.4

	* app/paint-funcs/scale-region.c: don't do multi-pass scaling 
when
	we are scaling up.


svn path=/trunk/; revision=27462
2008-10-29 19:37:52 +00:00
Sven Neumann 755621571c Bug 558420 – projection incorrect with alpha-less layers
2008-10-29  Sven Neumann  <sven@gimp.org>

	Bug 558420 – projection incorrect with alpha-less layers

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	need to initialize the projection if the covering layer is not
	opaque.


svn path=/trunk/; revision=27460
2008-10-29 19:17:30 +00:00
Michael Natterer e616b56880 move the "Antialias" toggle from here...
2008-10-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpstrokeeditor.c: move the "Antialias" toggle from
	here...

	* app/widgets/gimpfilleditor.c: ...to here because it makes sense
	for both filling and stroking.


svn path=/trunk/; revision=27458
2008-10-29 13:30:47 +00:00
Michael Natterer 5530ef6376 turn nested if()s into a switch(release_type).
2008-10-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
	turn nested if()s into a switch(release_type).


svn path=/trunk/; revision=27455
2008-10-28 18:32:40 +00:00
Martin Nordholts cf660f3e94 Bug 556603 – Zoom region always zooms in center of image
* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
When zooming with a click, use gimp_display_shell_scale() instead
of local zoom logic.

svn path=/trunk/; revision=27452
2008-10-28 18:12:20 +00:00
Michael Natterer 88db29948b added "gboolean below" to gimp_enum_radio_frame_add() and
2008-10-28  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpwidgets-utils.[ch]: added "gboolean below" to
	gimp_enum_radio_frame_add() and gimp_enum_radio_box_add() and
	place the widget right of the radio button unless "below" is TRUE.

	* app/dialogs/convert-dialog.c
	* app/dialogs/layer-add-mask-dialog.c
	* app/tools/gimpbucketfilloptions.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/widgets/gimpfilleditor.c: pass TRUE so everything stays as-is.


svn path=/trunk/; revision=27450
2008-10-28 17:40:32 +00:00
Martin Nordholts 9631635fcc Put the existing blend formulas in expanded switch cases again. We need to
* app/gegl/gimpoperationpointlayermode.c
(gimp_operation_point_layer_mode_process): Put the existing blend
formulas in expanded switch cases again. We need to keep the more
complicated layer modes like Hue, Value and Saturation in expanded
switch cases anyway.

svn path=/trunk/; revision=27449
2008-10-28 07:30:25 +00:00
Michael Natterer 73410cef60 some minor cleanups.
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c: some minor cleanups.

	(gimp_text_tool_draw): draw a cursor of two pixels width which is
	between glyphs so it is visible both at the left and the right
	border or the rectangle. Also make it look a little more
	cursor-like.


svn path=/trunk/; revision=27446
2008-10-27 21:22:50 +00:00
Michael Natterer bf97eab43e app/actions/text-tool-actions.c app/actions/text-tool-commands.[ch] rename
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.[ch]
	* menus/text-tool-menu.xml: rename action "path-from-text" to
	"text-to-path".


svn path=/trunk/; revision=27445
2008-10-27 20:40:07 +00:00
Michael Natterer c0cb7c1409 menus/text-tool-menu.xml app/actions/text-tool-actions.c add "Text along
2008-10-27  Michael Natterer  <mitch@gimp.org>

	* menus/text-tool-menu.xml
	* app/actions/text-tool-actions.c
	* app/actions/text-tool-commands.[ch]: add "Text along Path" to the
	text tool context menu.

	* app/tools/gimptextoptions.[ch]: remove the text along path
	button here.

	* app/tools/gimptexttool.c: changed accordingly.

	* app/tools/gimptexttool.[ch]: move public functions together,
	move all virtual function implementations together and put them in
	order, made the text along path function public, factor out
	gimp_text_tool_xy_to_offset() instead of duplicaing this code
	three times, remove gimp_rectangle_tool_frame_item() because it
	doesn't belong here.

	* app/tools/gimprectangletool.[ch]: add
	gimp_rectangle_tool_frame_item() here. Enselic, please process ;)


svn path=/trunk/; revision=27444
2008-10-27 16:21:03 +00:00
Sven Neumann ae42ff5fb7 changed menu labels.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/actions/text-tool-actions.c: changed menu labels.


svn path=/trunk/; revision=27443
2008-10-27 16:11:50 +00:00
Sven Neumann 855bc3af5b hide the file dialog instead of destroying it.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/actions/text-editor-commands.c 
(text_editor_load_response):
	hide the file dialog instead of destroying it.


svn path=/trunk/; revision=27442
2008-10-27 12:27:09 +00:00
Sven Neumann 4ce3a62572 removed unused includes.
2008-10-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptexttool.c: removed unused includes.

	* app/actions/text-tool-commands.c 
(text_tool_load_cmd_callback):
	fixed file dialog for opening text files.


svn path=/trunk/; revision=27441
2008-10-27 12:23:40 +00:00
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