Commit Graph

11242 Commits

Author SHA1 Message Date
Michael Natterer e28e864ac6 remove obsolete assertion and redundant cast.
2008-10-11  Michael Natterer  <mitch@gimp.org>

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


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

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

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

	(gimp_drawable_stack_get_graph): free the reverse list.


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

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

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

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


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

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

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

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

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

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


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

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

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


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

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

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


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

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

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

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


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

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


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

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

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


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

	Bug 554983 – Layers Projection using GEGL

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

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

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

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

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

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

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

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


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

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

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


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

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

	(gimp_layer_apply_mask): properly disconnect the mask node.

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


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

	Address Bug 554983 – Layers Projection using GEGL

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

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

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

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

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

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


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

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

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

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

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

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

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


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

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

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

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

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

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

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

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


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

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

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


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

	Bug 134956 – Curves tool doesn't save free curves

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

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

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

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

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

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


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

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


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

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

	(gimp_curves_config_load_cruft): reset the curve before loading it.

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


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

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


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

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


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

	Bug 555362 – gimp-remote is not working properly

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


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

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


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

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


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

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


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

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


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

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

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


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

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


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

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


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

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

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

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

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

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


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

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

	(find_contiguous_segment): changed to return gboolean not gint.


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

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

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

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


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

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


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

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

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


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

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


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

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

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

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

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

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

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

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


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

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


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

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

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

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

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

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


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

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

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

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


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

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


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

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

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


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

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


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

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


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

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


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

        * configure.in: bumped version to 2.6.0.

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

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


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

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

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

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

svn path=/trunk/; revision=27077
2008-09-29 15:42:56 +00:00
Michael Natterer 8938cca43f no need to memcpy() the arrays, they are properly copied by
2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_copy): no need to memcpy() the
	arrays, they are properly copied by gimp_config_sync() now. Add
	call to gimp_data_dirty() so GimpCurvesConfig gets notified.

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_set_property):
	use gimp_config_copy() instead of copying the curve menually.


svn path=/trunk/; revision=27076
2008-09-29 12:33:58 +00:00
Michael Natterer a4ff76a5ac remove some casts that were always useless and are even more useless now
2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.c
	(gimp_dialog_factories_show_foreach)
	(gimp_dialog_factories_hide_foreach): remove some casts that were
	always useless and are even more useless now after the recent
	readability improvement.


svn path=/trunk/; revision=27075
2008-09-29 11:08:42 +00:00
Sven Neumann 5d13567424 reduced default window height to give a window aspect ratio of roughly 3:1
2008-09-29  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): 
reduced
	default window height to give a window aspect ratio of roughly 
3:1
	as requested by Peter.


svn path=/trunk/; revision=27072
2008-09-29 09:48:32 +00:00
Martin Nordholts 6e876e8f7c Increase readability with widget = list->data.
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_show_foreach)
(gimp_dialog_factories_hide_foreach): Increase readability with
widget = list->data.

svn path=/trunk/; revision=27068
2008-09-28 07:46:48 +00:00
Michael Natterer e9958b1bc7 reorder functions and add static prototypes.
2008-09-26  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpnavigationview.c: reorder functions and add
	static prototypes.


svn path=/trunk/; revision=27065
2008-09-26 18:21:36 +00:00
Michael Natterer a3d0c68a70 fix calculation of final lookup table to not darken the image.
2008-09-25  Michael Natterer  <mitch@gimp.org>

	* app/base/colorize.c (colorize_calculate): fix calculation of
	final lookup table to not darken the image.


svn path=/trunk/; revision=27062
2008-09-25 18:14:05 +00:00
Michael Natterer 4a91523321 use the new helper function here too.
2008-09-25  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_pixbuf): use the new helper function here
	too.


svn path=/trunk/; revision=27060
2008-09-25 16:59:02 +00:00
Sven Neumann 92a5eec265 moved duplicate code to a helper function.
2008-09-25  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_component)
	(gimp_display_shell_drop_drawable): moved duplicate code to a
	helper function.


svn path=/trunk/; revision=27058
2008-09-25 15:41:57 +00:00
Sven Neumann 95cd081d13 added a 'restored' flag to the Gimp object and set it in
2008-09-25  Sven Neumann  <sven@gimp.org>

	* app/core/gimp.[ch]: added a 'restored' flag to the Gimp object
	and set it in gimp_real_restore(). Added method 
gimp_is_restored().

	* app/gui/gui.c: call gui_unique_init() in gui_init() instead of
	that later in gui_restore_after_callback(). By doing so we start
	our DBus service (or message proxy window on Win32) much earlier
	in the start process, thus reducing the time frame where two
	instances of gimp can be launched.

	* app/gui/gui-unique.c
	* app/gui/gimpdbusservice.c: wait handling the queued file-open
	requests until gimp is fully restored.

	* app/gui/splash.c (splash_update): only run one iteration of 
the
	main loop. Doing it in a while loop can cause us to get stuck if
	the gimp-unique service already added an idle handler.


svn path=/trunk/; revision=27049
2008-09-25 08:56:58 +00:00
Martin Nordholts 63ca4578b9 Bug 549925 – incorrect math: adding/substracting empty selection
deselects selection

* app/tools/gimprectangleselecttool.c
(gimp_rectangle_select_tool_execute): Be more intuitive when
clicking outside the current selection for the selection modes Add
and Subtract. More specifically, don't alter the selection mask at
all.

svn path=/trunk/; revision=27048
2008-09-24 21:15:54 +00:00
Martin Nordholts f08e322809 Added new utility function gimp_rectangle_select_tool_get_operation(), and
* app/tools/gimprectangleselecttool.c: Added new utility function
gimp_rectangle_select_tool_get_operation(), and started using it.

svn path=/trunk/; revision=27047
2008-09-24 20:55:55 +00:00
Michael Natterer 8fb79f1439 call gimp_controller_editor_sel_changed() with the right GtkTreeSelection
2008-09-24  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcontrollereditor.c
	(gimp_controller_editor_edit_response): call
	gimp_controller_editor_sel_changed() with the right
	GtkTreeSelection object (the editor's, not the action
	list's). Fixes crash upon selecting an action for a controller
	event. Spotted by Alexander Rabtchevich.


svn path=/trunk/; revision=27041
2008-09-24 09:12:36 +00:00
Martin Nordholts 7bb585132d Update documentation, the layer does not need to have an alpha channel. A
* tools/pdbgen/pdb/selection.pdb (selection_layer_alpha): Update
documentation, the layer does not need to have an alpha channel. A
layer without an alpha channel is considered opaque.

* app/pdb/selection-cmds.c 
* libgimp/gimpselection_pdb.c: Regenerated.

svn path=/trunk/; revision=27040
2008-09-24 09:09:27 +00:00
Sven Neumann c286952086 tools/pdbgen/pdb/layer.pdb added new scale procedures that allow to
2008-09-24  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/image.pdb: added new scale procedures that
	allow to specify the interpolation explicitly. Fixes bug 
#486977.
	Also pass the progress parameter to the scale and rotate 
functions.

	* app/pdb/image-cmds.c
	* app/pdb/internal-procs.c
	* app/pdb/layer-cmds.c
	* libgimp/gimpimage_pdb.[ch]
	* libgimp/gimplayer_pdb.[ch]: regenerated.

	* libgimp/gimp.def: updated.


svn path=/trunk/; revision=27039
2008-09-24 08:28:16 +00:00
Sven Neumann c01408279c fixed error and some typos in the PDB documentation.
2008-09-24  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/image.pdb: fixed error and some typos in the
	PDB documentation.

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


svn path=/trunk/; revision=27038
2008-09-24 07:47:58 +00:00
Sven Neumann 5b7038f23c simplified
svn path=/trunk/; revision=27036
2008-09-23 07:15:37 +00:00
Sven Neumann a8cc137009 Move the "Use GEGL" check-box to the Colors menu (bug #548760):
2008-09-23  Sven Neumann  <sven@gimp.org>

	Move the "Use GEGL" check-box to the Colors menu (bug #548760):

	* app/actions/Makefile.am
	* app/actions/config-actions.[ch]
	* app/actions/config-commands.[ch]: new files holding the 
"config"
	action group that includes the "use-gegl" toggle action.

	* app/actions/debug-actions.c
	* app/actions/debug-commands.[ch]: removed the "use-gegl" 
action
	here.

	* app/menus/menus.c
	* app/actions/actions.c: added the new action group.

	* app/widgets/gimphelp-ids.h: added a help ID for the 
"use-gegl"
	action.

	* menus/image-menu.xml.in: moved the "Use GEGL" check-box to 
the
	Colors menu.


svn path=/trunk/; revision=27035
2008-09-23 07:02:24 +00:00
Sven Neumann 5f8befc536 don't set a help ID on the display menu items.
2008-09-21  Sven Neumann  <sven@gimp.org>

	* app/actions/windows-actions.c: don't set a help ID on the
	display menu items.

	* app/widgets/gimphelp-ids.h: removed now unused help ID.

	* app/menus/windows-menu.c: show a larger image preview in the
	tooltip.


svn path=/trunk/; revision=27028
2008-09-21 18:53:14 +00:00
Sven Neumann 3b9c941369 put translator comment on a single line, looks better in the .po file.
2008-09-20  Sven Neumann  <sven@gimp.org>

	* app/dialogs/about-dialog.c: put translator comment on a single
	line, looks better in the .po file.


svn path=/trunk/; revision=27025
2008-09-20 21:30:48 +00:00
Simon Budig 4372c0754b whitespace fix
2008-09-20  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: whitespace fix

	* app/gegl/gimplevelsconfig.c: make sure that the points set by
	default gets unset before calculating the levels->curves
	transition. We don't want stray points in the corners.


svn path=/trunk/; revision=27018
2008-09-19 22:41:58 +00:00
Sven Neumann c7af52b846 renamed "file-new-menu" to "file-create-menu" and changed the menu label
2008-09-19  Sven Neumann  <sven@gimp.org>

	* app/actions/file-actions.c: renamed "file-new-menu" to
	"file-create-menu" and changed the menu label from "New" to 
"Create".

	* app/plug-in/plug-in-menu-path.c
	* menus/image-menu.xml.in
	* plug-ins/common/screenshot.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/script-fu/scripts/*.scm
	* plug-ins/twain/twain.c
	* plug-ins/win-snap/winsnap.c: changed accordingly.


svn path=/trunk/; revision=27013
2008-09-19 12:01:12 +00:00
Sven Neumann d986821b36 try to use the menu label with ellipsis instead of the result of
2008-09-19  Sven Neumann  <sven@gimp.org>

	* app/actions/plug-in-actions.c 
(plug_in_actions_history_changed):
	try to use the menu label with ellipsis instead of the result of
	gimp_plug_in_procedure_get_label() which has ellipsis and
	mnemonics stripped.


svn path=/trunk/; revision=27005
2008-09-19 06:43:37 +00:00
Sven Neumann 82b57dcdfe need to set the point at the index corresponding to the x value.
2008-09-19  Sven Neumann  <sven@gimp.org>

	* app/gegl/gimplevelsconfig.c 
(gimp_levels_config_to_curves_config):
	need to set the point at the index corresponding to the x value.


svn path=/trunk/; revision=27003
2008-09-18 22:54:51 +00:00
Sven Neumann c6be62a797 app/core/gimpcurve.c (gimp_curve_plot) formatting.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_plot)
	* app/gegl/gimplevelsconfig.c 
(gimp_levels_config_to_curves_config):
	formatting.


svn path=/trunk/; revision=27002
2008-09-18 21:55:28 +00:00
Simon Budig 1f788a5af2 comment fix
2008-09-18  Simon Budig  <simon@gimp.org>

	* app/core/gimpcurve.c: comment fix

	* app/gegl/gimplevelsconfig.c: improve the levels->curves
	transition. Not perfect, the result does not match a "real"
	gamma correction, especially in the dark areas, where the
	curves are too dark compared to the levels.


svn path=/trunk/; revision=27001
2008-09-18 19:48:04 +00:00
Sven Neumann 1a8859805c app/plug-in/gimppluginprocedure.c minor cleanups.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.c
	* libgimp/gimp.c: minor cleanups.


svn path=/trunk/; revision=26999
2008-09-18 16:25:39 +00:00
Michael Natterer 651cb5b325 reset the RC styles of the dock's children after parsing the RC file
2008-09-18  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdock.c (gimp_dock_style_set): reset the RC
	styles of the dock's children after parsing the RC file snippet
	for them. Fixes font size for detached dockables.


svn path=/trunk/; revision=26992
2008-09-18 10:55:53 +00:00
Tor Lillqvist 25ecbc063d Use INVALID_HANDLE_VALUE instead of INVALID_FILE_HANDLE which was an
2008-09-18  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/gimppluginshm.c: Use INVALID_HANDLE_VALUE instead of
	INVALID_FILE_HANDLE which was an misunderstanding.


svn path=/trunk/; revision=26989
2008-09-18 09:35:00 +00:00
Sven Neumann 0490cd0a75 made the font scale factor for the docks configurable in gtkrc.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdock.c: made the font scale factor for the 
docks
	configurable in gtkrc.

	* themes/Default/gtkrc
	* themes/Small/gtkrc: for documentation purposes, added the
	default value for GimpDock::font-scale here. Changed all style
	property names to use the canonical names.


svn path=/trunk/; revision=26988
2008-09-18 09:33:20 +00:00
Sven Neumann d9a2d8242e no need to check if the drawable is attached as shadow tiles are per
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-shadow.c 
(gimp_drawable_get_shadow_tiles):
	no need to check if the drawable is attached as shadow tiles are
	per drawable now.


svn path=/trunk/; revision=26986
2008-09-17 23:26:02 +00:00
Simon Budig 17129f3db0 quickfix: avoid last-minute-code-cleanup before checkin...
2008-09-18  Simon Budig  <simon@gimp.org>

	* app/gegl/gimpbrightnesscontrastconfig.c: quickfix:
	avoid last-minute-code-cleanup before checkin...


svn path=/trunk/; revision=26985
2008-09-17 23:09:29 +00:00
Simon Budig 53385418fb fix the brightness/contrast --> levels step by doing proper math (TM).
2008-09-18  Simon Budig  <simon@gimp.org>

	* app/gegl/gimpbrightnesscontrastconfig.c: fix the
	brightness/contrast --> levels step by doing proper math (TM).


svn path=/trunk/; revision=26984
2008-09-17 22:55:55 +00:00
Sven Neumann cd4dd6c5b6 gimp_drawable_mask_intersect() and gimp_drawable_mask_bounds() may only be
2008-09-18  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/drawable.pdb: gimp_drawable_mask_intersect()
	and gimp_drawable_mask_bounds() may only be used on attached
	drawables. Added missing checks.

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


svn path=/trunk/; revision=26983
2008-09-17 22:52:06 +00:00
Sven Neumann bc75eec6fc formatting.
2008-09-17  Sven Neumann  <sven@gimp.org>

	* app/actions/edit-actions.c (edit_actions_update): formatting.


svn path=/trunk/; revision=26979
2008-09-17 21:54:53 +00:00
Michael Natterer 2f13a57002 cosmetic paranoia.
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdockable.c: cosmetic paranoia.


svn path=/trunk/; revision=26971
2008-09-17 11:44:17 +00:00
Michael Natterer 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

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


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00
Michael Natterer b0dab70de8 add GError parameter to gimp_image_add_{channel,layer,vectors}() and
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add GError parameter to
	gimp_image_add_{channel,layer,vectors}() and remove calls to
	g_warning(). Changed checks to be possible failures at all.

	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
	here too.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/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/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: pass a NULL error.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the error.

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


svn path=/trunk/; revision=26963
2008-09-17 08:27:35 +00:00
Sven Neumann b2ad06a19f added GError parameter to gimp_image_{raise,lower}_{channel,layer,vectors}
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added GError parameter to
	gimp_image_{raise,lower}_{channel,layer,vectors} functions and
	removed calls to g_message().

	* app/actions/channels-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c: pass NULL for the GError
	parameter as these actions are insensitive if they would fail.

	* tools/pdbgen/pdb/image.pdb: changed accordingly. Corrected the
	documentation.

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


svn path=/trunk/; revision=26953
2008-09-16 20:56:41 +00:00
Sven Neumann db7c35373d unified error messages.
2008-09-16  Sven Neumann  <sven@gimp.org>

	* app/core/gimppalette-load.c (gimp_palette_load): unified error
	messages.


svn path=/trunk/; revision=26952
2008-09-16 20:25:15 +00:00
Michael Natterer 5e6b0345d1 use the "tool options" icon for the "context" action group since that's
2008-09-16  Michael Natterer  <mitch@gimp.org>

	* app/actions/actions.c: use the "tool options" icon for the
	"context" action group since that's what its actions mostly
	control.

	* app/actions/dialogs-actions.c: use the "brush", "gradient" and
	"palette" icons also for their resp. editors since that's also the
	icons they use in their dockable tabs.


svn path=/trunk/; revision=26949
2008-09-16 08:38:09 +00:00
Michael Natterer d2307c1bf6 add GError parameter and replace g_message() by g_set_error().
2008-09-15  Michael Natterer  <mitch@gimp.org>

	* app/core/gimplayer.[ch] (gimp_layer_add_mask): add GError
	parameter and replace g_message() by g_set_error().

	* app/core/gimplayermaskundo.c
	* app/xcf/xcf-load.c
	* app/actions/layers-commands.c: pass NULL errors since these
	places know what they are doing. Ha ha...

	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/image.pdb: pass the error so we get more real
	error messages for failed PDB calls.

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


svn path=/trunk/; revision=26948
2008-09-15 21:05:01 +00:00
Michael Natterer c7a92cddc2 Bug 552413 – Script triggers Gimp-Core-CRITICAL
2008-09-15  Michael Natterer  <mitch@gimp.org>

	Bug 552413 – Script triggers Gimp-Core-CRITICAL

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb: add some more checks that produce
	proper PDB error messages when adding and removing layer masks
	instead of having the code run into assertions in the called core
	functions. Also add some more checks when removing layers,
	channels or vectors.

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


svn path=/trunk/; revision=26947
2008-09-15 20:45:42 +00:00
Michael Schumacher 97b36969a1 removed double "the" from translatable string. Fixes bug #552127.
2008-09-13  Michael Schumacher  <schumaml@cvs.gnome.org>

	* app/actions/edit-actions.c (edit_actions): removed double "the"
	from translatable string. Fixes bug #552127.

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

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

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


svn path=/trunk/; revision=26935
2008-09-12 10:35:35 +00:00
Michael Natterer af9817b466 make a string pointer const.
2008-09-11  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-modules.c (gimp_modules_unload): make a string
	pointer const.


svn path=/trunk/; revision=26927
2008-09-11 17:19:07 +00:00
Tor Lillqvist 2a01f97b6e Untabify.
2008-09-10  Tor Lillqvist  <tml@novell.com>

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


svn path=/trunk/; revision=26918
2008-09-10 20:01:45 +00:00
Tor Lillqvist 0fb8352667 Destroy the proxy window here so that gimp_unique_win32_open() in
2008-09-10  Tor Lillqvist  <tml@novell.com>

	* app/gui/gui-unique.c (gui_unique_win32_exit): Destroy the proxy
	window here so that gimp_unique_win32_open() in app/unique.c won't
	find it. This is important especially in a developer version where
	the debug output window might be left open and the proxy window
	still existing for a long time after the GTK+ main loop of the
	GIMP GUI has finished. Thanks to Michael Schumacher for pointing
	this out.

	There is still a small race window here after GIMP has begun
	closing down its GUI in gui_exit_callback() and before the proxy
	window has gone away. If another GIMP starts during that interval,
	it will find the proxy window and send it a message, which will
	then either be ignored, or the proxy window will have been
	destroyed before it gets the message. Let's ignore that. There is
	a much wider time window during which multiple GIMP instances may
	be started during GIMP startup anyway.


svn path=/trunk/; revision=26917
2008-09-10 20:00:53 +00:00
Tor Lillqvist 9950975d6b gui_unique_win32_message_handler() can be static. Include file/file-open.h
2008-09-10  Tor Lillqvist  <tml@novell.com>

	* app/gui/gui-unique.c: gui_unique_win32_message_handler() can be
	static. Include file/file-open.h for file_open_from_command_line()
	declaration. Fix copy/paste glitch in gui_unique_exit().


svn path=/trunk/; revision=26916
2008-09-10 19:25:54 +00:00
Michael Natterer 420b60b8de factor out function that selects a path and scrolls to that path. Keep the
2008-09-10  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactionview.c: factor out function that selects a
	path and scrolls to that path. Keep the selected path visible if
	it is still there after filtering.


svn path=/trunk/; revision=26914
2008-09-10 10:44:41 +00:00
Michael Natterer 440214f259 made action labels more consistent, use '°' instead of 'degrees'.
2008-09-10  Michael Natterer  <mitch@gimp.org>

	* app/actions/context-actions.c: made action labels more
	consistent, use '°' instead of 'degrees'.

	* app/actions/context-commands.c: cosmetic change in macro
	parameters.


svn path=/trunk/; revision=26913
2008-09-10 10:01:54 +00:00
Michael Natterer 72c4ef1a83 app/Makefile.am remove references to $(REGEXREPL).
2008-09-09  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* plug-ins/script-fu/Makefile.am: remove references to $(REGEXREPL).


svn path=/trunk/; revision=26907
2008-09-09 12:21:43 +00:00
Sven Neumann bdce2966d6 based on a patch from David Gowers clamp the brush scale so that the brush
2008-09-08  Sven Neumann  <sven@gimp.org>

	* app/paint/gimpbrushcore.c: based on a patch from David Gowers
	clamp the brush scale so that the brush never becomes smaller 
than
	0.5 pixels. Fixes bug #548631.


svn path=/trunk/; revision=26900
2008-09-08 19:06:32 +00:00
Michael Natterer 3827523fe7 Bug 551306 – Color picker for text tool does not show selected palette
2008-09-08  Michael Natterer  <mitch@gimp.org>

	Bug 551306 – Color picker for text tool does not show selected
	palette

	* app/tools/gimptexttool.c (gimp_text_tool_register): add
	GIMP_CONTEXT_PALETTE_MASK to the tool option's context mask so the
	color popup's palette follows the globally selected palette.


svn path=/trunk/; revision=26899
2008-09-08 12:50:41 +00:00
Sven Neumann 52142fde13 restored alphabetic order. Use real name instead of a nick.
2008-09-08  Sven Neumann  <sven@gimp.org>

	* authors.xml: restored alphabetic order. Use real name instead 
of
	a nick.

	* AUTHORS: regenerated.

	* app/dialogs/authors.xsl: changed rule to only include
	contributors from the 2.6 development cycle in the About dialog.


svn path=/trunk/; revision=26898
2008-09-08 10:48:16 +00:00
Sven Neumann ce43257d5b Applied 'gimp-decimate.diff' as announced on the mailing-list:
2008-09-07  Sven Neumann  <sven@gimp.org>

	Applied 'gimp-decimate.diff' as announced on the mailing-list:

	* app/gimp-log.[ch]: added log domain "scale".

	* app/paint-funcs/scale-region.c: replaced decimation routines
	with box filters. Only use the decimation routines to pre-scale
	the image, always apply the interpolation for the final step.


svn path=/trunk/; revision=26896
2008-09-07 21:13:09 +00:00
Martin Nordholts 59a62ce7a1 Invalidating the view renderer is just plain wrong, revert to redrawing
* app/widgets/gimpnavigationview.c
(gimp_navigation_view_set_marker): Invalidating the view renderer
is just plain wrong, revert to redrawing the view. We will need to
solve the flicker in some other way.

svn path=/trunk/; revision=26894
2008-09-07 16:19:32 +00:00
Martin Nordholts 0cc59223c1 Bug 551141 – "Select all" does not work
* app/core/gimpchannel.c (gimp_channel_real_all): We don't want to
clear the region, we want to fill it with OPAQUE_OPACITY.

svn path=/trunk/; revision=26891
2008-09-07 06:47:17 +00:00
Michael Natterer 0d64c0d4e8 don't use // for comments.
2008-09-06  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationhuesaturation.c
	(gimp_operation_hue_saturation_process): don't use // for comments.


svn path=/trunk/; revision=26885
2008-09-06 11:26:21 +00:00
Martin Nordholts cc90920d69 mapped_* -> mapped_*_hue.
* app/gegl/gimpoperationhuesaturation.c
(gimp_operation_hue_saturation_process): mapped_* -> mapped_*_hue.

svn path=/trunk/; revision=26884
2008-09-06 07:26:33 +00:00
Martin Nordholts cadfb1c68f Bug 527085 – Hue/Saturation (working improperly)
* app/gegl/gimpoperationhuesaturation.c
(gimp_operation_hue_saturation_process): Properly map the
secondary hue. Based on patch by Michael Deal.

svn path=/trunk/; revision=26883
2008-09-06 06:53:43 +00:00
Sven Neumann ec789594af also blacklist the "stress" operations
svn path=/trunk/; revision=26880
2008-09-05 17:41:29 +00:00
Sven Neumann de8671671f blacklist "color-convert" and all GIMP operations.
2008-09-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpgegltool.c: blacklist "color-convert" and all 
GIMP
	operations.


svn path=/trunk/; revision=26879
2008-09-05 17:37:17 +00:00
Sven Neumann 39ed2677f6 added a blacklist of operations that should not be shown. We may want to
2008-09-05  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpgegltool.c: added a blacklist of operations that
	should not be shown. We may want to add more operations here.


svn path=/trunk/; revision=26878
2008-09-05 17:11:48 +00:00
Michael Natterer a270381096 made the "args" parameter const.
2008-09-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugindebug.[ch] (gimp_plug_in_debug_argv): made
	the "args" parameter const.

	* app/plug-in/gimpplugin.c (gimp_plug_in_open): made some strings
	const.


svn path=/trunk/; revision=26877
2008-09-05 15:46:00 +00:00
Michael Natterer f1b8cab63d Bug 545325 – Scrollbars do not disappear automatically
2008-09-05  Michael Natterer  <mitch@gimp.org>

	Bug 545325 – Scrollbars do not disappear automatically

	* app/widgets/gimpcontainertreeview.c: autosize the columns after
	each operation that can reduce the treeview's width.


svn path=/trunk/; revision=26875
2008-09-05 14:06:01 +00:00
Michael Natterer 941310a309 Bug 550983 – The size displayed in the status bar isn't correct
2008-09-05  Michael Natterer  <mitch@gimp.org>

	Bug 550983 – The size displayed in the status bar isn't correct

	* app/tools/gimprectangletool.c: use the right precision when
	pushing the rectangle's size as coordinates to the statusbar.


svn path=/trunk/; revision=26872
2008-09-05 12:15:24 +00:00
Michael Natterer 0194327f6d app/widgets/Makefile.am app/widgets/widgets-types.h new simple widget
2008-09-05  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpactioneditor.[ch]: new simple widget which
	contains a GimpActionView plus the search entry.

	* app/dialogs/keyboard-shortcuts-dialog.c: use the new widget
	instead of implementing the search entry here.

	* app/widgets/gimpcontrollereditor.c: use a GimpActionEditor
	instead of GimpActionView so the actions become searchable here
	too.


svn path=/trunk/; revision=26870
2008-09-05 10:37:06 +00:00
Sven Neumann 66a3aedea6 expose the preview when the tool is initialized. Fixes missing redraws
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c 
(gimp_transform_tool_initialize):
	expose the preview when the tool is initialized. Fixes missing
	redraws when the tool is selected from the menus (bug #550911).

	(gimp_transform_tool_motion): expose the preview after
	recalculating the transformation matrix.


svn path=/trunk/; revision=26868
2008-09-04 21:34:38 +00:00
Sven Neumann 8172ba88a1 improved the new DND code.
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c: improved the new DND code.


svn path=/trunk/; revision=26867
2008-09-04 18:14:56 +00:00
Tor Lillqvist b8f94b37b3 app/base/base-utils.h The return type of get_pid() should be gint, not
2008-09-04  Tor Lillqvist  <tml@novell.com>

	* app/base/base-utils.h
	* app/base/base-utils.c: The return type of get_pid() should be
	gint, not GPid. This matches also the C library on Windows, in
	which the return type of getpid() is int, not a pointer or
	intptr_t. The use for GPid in the GLib API is as a "handle" to a
	descendant processes, returned by the g_spawn_*() functions, and
	passed to the g_child_watch_*() functions, not as a "process
	identifier".


svn path=/trunk/; revision=26866
2008-09-04 17:54:06 +00:00
Sven Neumann 05e7e9dc54 handle drops on the empty image window.
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_drawable) 
(gimp_display_shell_drop_pixbuf):
	handle drops on the empty image window.


svn path=/trunk/; revision=26864
2008-09-04 15:45:23 +00:00
Sven Neumann f184843d65 tweaked spacing between entry and button and resolved a mnemnic conflict.
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/dialogs/keyboard-shortcuts-dialog.c: tweaked spacing 
between
	entry and button and resolved a mnemnic conflict.


svn path=/trunk/; revision=26862
2008-09-04 14:42:16 +00:00
Michael Natterer 4bbc40b732 add a column for the casefold label of the action and filter on that.
2008-09-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactionview.[ch]: add a column for the casefold
	label of the action and filter on that.

	* app/dialogs/keyboard-shortcuts-dialog.c: add a button to clear
	the filter entry. Changed the label to "Search:".


svn path=/trunk/; revision=26861
2008-09-04 14:28:00 +00:00
Michael Natterer ffdb533ab8 add an GtkTreeModelFilter between the GtkTreeView and the actual
2008-09-04  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpactionview.[ch]: add an GtkTreeModelFilter
	between the GtkTreeView and the actual GtkTreeStore. Add API to
	set the filter which is simply a string that's matched with
	strstr(). Quite some things improvable here...

	* app/dialogs/keyboard-shortcuts-dialog.c: add a "Filter" entry
	and set the filter on the action view.


svn path=/trunk/; revision=26859
2008-09-04 13:46:45 +00:00
Sven Neumann 8ec1d65a4a removed trailing whitespace
svn path=/trunk/; revision=26852
2008-09-04 08:37:32 +00:00
Michael Natterer da8137b43c made the string parameters const.
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_set_static_strings):
	made the string parameters const.


svn path=/trunk/; revision=26846
2008-09-03 20:26:05 +00:00
Michael Natterer d6f1bc5cf8 app/widgets/gimpcontrollerkeyboard.c (struct _KeyboardEvent) made the
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpcontrollerkeyboard.c (struct _KeyboardEvent)
	* app/widgets/gimpcontrollerwheel.c (struct _WheelEvent): made the
	blurbs const.


svn path=/trunk/; revision=26845
2008-09-03 20:17:57 +00:00
Michael Natterer a1e7315643 remove the call to gdk_window_get_pointer() again.
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpnavigationview.c
	(gimp_navigation_view_motion_notify): remove the call to
	gdk_window_get_pointer() again.

	(gimp_navigation_view_grab_pointer): instead, grab the pointer
	properly with owner_events=FALSE so all events are reported with
	respect to the widget's window.


svn path=/trunk/; revision=26844
2008-09-03 20:13:35 +00:00
Michael Natterer 435f6e3974 app/display/gimpdisplayshell-callbacks.c libgimpwidgets/gimpcolorselect.c
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* libgimpwidgets/gimpcolorselect.c
	* modules/color-selector-water.c
	* plug-ins/ifs-compose/ifs-compose.c: instead of using
	gdk_window_get_pointer() if GdkEventMotion::is_hint is TRUE,
	simply always use the coords from the event and call
	gdk_event_request_motions() to ask for more motion events. This is
	the recommended way and also works for events from devices other
	than the core pointer.

	* plug-ins/ifs-compose/ifs-compose.c (design_area_motion): some
	code cleanup while i was at it.


svn path=/trunk/; revision=26843
2008-09-03 19:24:51 +00:00
Sven Neumann 2552aa2b37 if INVALID_FILE_HANDLE is undefined, define it as the constant that we
2008-09-02  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginshm.c: if INVALID_FILE_HANDLE is 
undefined,
	define it as the constant that we used to use here.


svn path=/trunk/; revision=26839
2008-09-02 20:52:25 +00:00
Michael Natterer 9d18f2aa9e use gtk_widget_get_style() instead of widget->style.
2008-09-02  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpstatusbar.c: use gtk_widget_get_style() instead
	of widget->style.


svn path=/trunk/; revision=26837
2008-09-02 12:55:46 +00:00
Michael Natterer 017e5ef73a no need to set strlen(sting)+1 bytes on the GtkSelectionData because
2008-09-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpselectiondata.c: no need to set strlen(sting)+1
	bytes on the GtkSelectionData because gtk_selection_data_set()
	zero-terminates all data anyway.


svn path=/trunk/; revision=26835
2008-09-02 12:00:07 +00:00
Michael Natterer 641dbb6593 return a const string, no need to strdup it since it's only used
2008-09-02  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpselectiondata.c (gimp_selection_data_get_name):
	return a const string, no need to strdup it since it's only used
	temporarily in this file.

	(gimp_selection_data_get_image)
	(gimp_selection_data_get_component)
	(gimp_selection_data_get_item)
	(gimp_selection_data_get_object): changed accordingly. Move
	variables to local scopes and simplify.


svn path=/trunk/; revision=26834
2008-09-02 11:30:28 +00:00
Sven Neumann 5ed7a372ee use the constant INVALID_FILE_HANDLE instead of 0xFFFFFFFF. Fixes shared
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginshm.c (gimp_plug_in_shm_new): use the
	constant INVALID_FILE_HANDLE instead of 0xFFFFFFFF. Fixes shared
	memory tile transport on 64bit Windows systems.


svn path=/trunk/; revision=26827
2008-09-01 20:55:31 +00:00
Sven Neumann a5f8345609 added clear_region().
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/paint-funcs.[ch]: added clear_region().

	* app/base/tile-manager-crop.c
	* app/core/gimpchannel.c
	* app/core/gimpimage-merge.c
	* app/core/gimpmaskundo.c
	* app/core/gimpprojection-construct.c: use it instead of calling
	color_region() with a zero color.



svn path=/trunk/; revision=26826
2008-09-01 20:44:00 +00:00
Sven Neumann 88955a3118 also need to initialize the projection if the layer mask could introduce
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection-construct.c 
(gimp_projection_initialize):
	also need to initialize the projection if the layer mask could
	introduce transparency. Fixes bug #550024.


svn path=/trunk/; revision=26824
2008-09-01 20:24:59 +00:00
Martin Nordholts 1d7e141c2d We need to set the scale before using it. Fixes at least
2008-08-31  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_set_initial_scale): We need to set the scale
	before using it. Fixes at least gimp_display_shell_fill() and
	Image -> Duplicate giving weird initial scales.

svn path=/trunk/; revision=26823
2008-08-31 09:12:55 +00:00
Michael Natterer d9bc8db7a3 app/widgets/gimplayertreeview.c libgimpwidgets/gimpcolorscales.c
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimplayertreeview.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimppropwidgets.c
	* libgimpwidgets/gimpscaleentry.c
	* libgimpwidgets/gimpwidgets.c: use gtk_adjustment_get_value()
	instead of adjustment->value.


svn path=/trunk/; revision=26815
2008-08-29 15:54:10 +00:00
Michael Natterer edcd1e7810 libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.h
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimphruler.[ch]
	* libgimpwidgets/gimpvruler.[ch]: remove separate H/VRuler classes.

	* libgimpwidgets/gimpruler.[ch]: add an "orientation" property
	instead. Add gimp_ruler_new().

	* libgimpwidgets/gimpwidgets.def: changed accordingly.

	* app/dialogs/resolution-calibrate-dialog.c
	* app/display/gimpdisplayshell.c
	* plug-ins/gfig/gfig-preview.c
	* plug-ins/imagemap/imap_preview.c: ditto.


svn path=/trunk/; revision=26810
2008-08-29 10:25:29 +00:00
Michael Natterer a2bf2da39b #include "gimpwidgets-utils.h", not "gimpwidgets-utils.c" (eek).
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimphelp.c: #include "gimpwidgets-utils.h", not
	"gimpwidgets-utils.c" (eek).


svn path=/trunk/; revision=26808
2008-08-29 09:05:49 +00:00
Martin Nordholts 3cfd2a33c0 Canonically calculate scale to use for zoom-focus calculations so that it
2008-08-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_to): Canonically calculate scale to use
	for zoom-focus calculations so that it also works when not in Dot
	by dot-mode.

svn path=/trunk/; revision=26805
2008-08-28 19:35:14 +00:00
Martin Nordholts 2975f815a8 Make the size-changed-detailed signal also contain previous image size.
2008-08-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
	also contain previous image size.

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): Take the
	previous image size into account and center the image if it starts
	to fit (axis indepentently) in the viewport due to the resize.

	* app/core/gimpundo.h
	* app/core/gimpimage-undo.c
	* app/core/gimpimageundo.[ch]
	* app/core/gimpimage-undo-push.[ch]: Manage the
	previous-size-information.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c: Propagate previous size to the
	size-changed-detailed signal emission and the undo-system.

svn path=/trunk/; revision=26804
2008-08-28 19:12:03 +00:00
Sven Neumann 176fb24579 allow to disable the Wilber image shown at the top of the toolbox.
2008-08-28  Sven Neumann  <sven@gimp.org>

        * app/config/gimpguiconfig.[ch]: allow to disable the Wilber 
image
        shown at the top of the toolbox.

        * app/widgets/gimptoolbox.c: honor the new gimprc option.

        * app/config/gimprc-blurbs.h: document the old and new toolbox
        preferences.


svn path=/trunk/; revision=26800
2008-08-28 14:30:47 +00:00
Michael Natterer b19d4b85c3 some tiny formatting fixes.
2008-08-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimprectangletool.c: some tiny formatting fixes.


svn path=/trunk/; revision=26799
2008-08-28 12:54:14 +00:00
Sven Neumann c9c3329441 fixed shift direction.
2008-08-28  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale_determine_progress):
	(scale_region_tile): fixed shift direction.


svn path=/trunk/; revision=26797
2008-08-28 08:46:08 +00:00
Michael Natterer 808ddd311b try the find_widget_under_pointer() hack only if the menu item's parent is
2008-08-27  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.c (gimp_ui_manager_item_key_press):
	try the find_widget_under_pointer() hack only if the menu item's
	parent is really a GtkMenu (not a GtkMenuBar). Fixes crash spotted
	by rubikcube.


svn path=/trunk/; revision=26796
2008-08-27 19:36:41 +00:00
Sven Neumann 6a3e8b4cca sprinkled more const qualifiers.
2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/core/gimp-transform-region.c: sprinkled more const 
qualifiers.

	* app/paint-funcs/scale-region.c: call the progress callback 
less
	often.


svn path=/trunk/; revision=26790
2008-08-27 10:19:15 +00:00
Sven Neumann 26645c5549 moved hiding the dialog from gimp_transform_tool_real_transform() to
2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c: moved hiding the dialog from 
	gimp_transform_tool_real_transform() to 
gimp_transform_tool_doit().
	Delay undrawing the preview in doit() until the transformation 
is
	done. This removes the annoying flicker at the end.


svn path=/trunk/; revision=26789
2008-08-27 09:56:46 +00:00
Sven Neumann 915803cfa9 fixed compilation
svn path=/trunk/; revision=26788
2008-08-27 08:21:34 +00:00
Sven Neumann 28cdc4d9a0 hide the tool dialog before starting to perform the transformation.
2008-08-27  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptransformtool.c 
(gimp_transform_tool_real_transform):
	hide the tool dialog before starting to perform the 
transformation.


svn path=/trunk/; revision=26787
2008-08-27 07:42:28 +00:00
Sven Neumann a8fd690b17 also use PixelSurround for the linear interpolation. Sprinkled some const
2008-08-27  Sven Neumann  <sven@gimp.org>

        * app/core/gimp-transform-region.c: also use PixelSurround for 
the
        linear interpolation. Sprinkled some const qualifiers.


svn path=/trunk/; revision=26786
2008-08-27 06:52:08 +00:00
Sven Neumann 6e764915d5 updated documentation.
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: updated documentation.


svn path=/trunk/; revision=26783
2008-08-26 21:06:09 +00:00
Sven Neumann 7a0dd79621 removed another unneeded cast that I missed earlier
svn path=/trunk/; revision=26782
2008-08-26 20:32:24 +00:00
Sven Neumann 58160691c2 removed unneeded casts
svn path=/trunk/; revision=26781
2008-08-26 19:55:12 +00:00
Sven Neumann ad4eb2f528 further simplified the code path that is executed when a brush is scaled
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: further simplified the code 
path
	that is executed when a brush is scaled up. We don't need to 
scale
	in several steps here.


svn path=/trunk/; revision=26780
2008-08-26 19:52:35 +00:00
Sven Neumann 8499f5e247 removed some unused parameters from the code that is used for brush
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: removed some unused parameters
	from the code that is used for brush scaling. Added sanity 
checks.


svn path=/trunk/; revision=26779
2008-08-26 19:43:00 +00:00
Martin Nordholts b5b51b475f libgimpwidgets/gimpwidgets.c
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* libgimpwidgets/gimpwidgets.c

	* plug-ins/common/file-xbm.c
	* plug-ins/common/file-wmf.c
	* plug-ins/common/file-svg.c
	* plug-ins/common/file-gih.c
	* plug-ins/common/blur-motion.c
	* plug-ins/file-jpeg/jpeg-save.c
	* plug-ins/lighting/lighting-ui.c
	* plug-ins/map-object/map-object-ui.c

	* app/tools/gimpsheartool.c
	* app/tools/gimpaligntool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimplevelstool.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/offset-dialog.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpcolormapeditor.c
	* app/dialogs/layer-options-dialog.c
	* app/display/gimpdisplayshell-scale-dialog.c: Pass page_size = 0
	to gimp_spin_button_new() to adapt to new and correct value
	clamping in GTK+.

svn path=/trunk/; revision=26778
2008-08-26 19:32:14 +00:00
Martin Nordholts d9e5942ec6 Fix stupid slip-up in my last commit
svn path=/trunk/; revision=26777
2008-08-26 18:59:23 +00:00
Sven Neumann 3792d638a2 added missing call to colorize_init().
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-colorize.c (gimp_drawable_colorize): 
	added missing call to colorize_init().


svn path=/trunk/; revision=26776
2008-08-26 18:58:23 +00:00
Martin Nordholts dd672dde70 New function.
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_unoverscrollify): New function.

	* app/display/gimpdisplayshell-autoscroll.c
	(gimp_display_shell_autoscroll_timeout): Make sure the autoscroll
	does not result in overscroll. This more or less finalizes the
	implementation of the enhancement request in bug #362915.

svn path=/trunk/; revision=26775
2008-08-26 18:50:54 +00:00
Martin Nordholts ad693bbf9e If no scroll should be applied we can return early.
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll): If no scroll should be applied we can
	return early.

svn path=/trunk/; revision=26774
2008-08-26 17:53:54 +00:00
Martin Nordholts fb56170667 Pass the scroll amount in variables that we can modify as we please before
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-autoscroll.c
	(gimp_display_shell_autoscroll_timeout): Pass the scroll amount in
	variables that we can modify as we please before they actually
	reach gimp_display_shell_scroll().

svn path=/trunk/; revision=26773
2008-08-26 17:47:30 +00:00
Michael Natterer 92cbcd03b2 don't hardcode the attach coords for the fixed containing the dynamics
2008-08-26  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimppaintoptions-gui.c (gimp_paint_options_gui): don't
	hardcode the attach coords for the fixed containing the dynamics
	labels but use the table's real width instead. Fixes broken table
	layout in the airbrush options.


svn path=/trunk/; revision=26771
2008-08-26 14:50:05 +00:00
Sven Neumann 55db28831c more fiddling with the edges
svn path=/trunk/; revision=26770
2008-08-26 07:41:53 +00:00
Sven Neumann 281cefc12d attempt to fix the newly introduced smear edge mode.
2008-08-26  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: attempt to fix the newly introduced
	smear edge mode.


svn path=/trunk/; revision=26769
2008-08-26 07:24:55 +00:00
Sven Neumann 4fe29ba110 use PixelSurround to access the source pixels in a more efficient way.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: use PixelSurround to access 
the
	source pixels in a more efficient way.


svn path=/trunk/; revision=26768
2008-08-25 23:12:14 +00:00
Sven Neumann 972309fe48 changed to silently return in case of out-of-bounds access. There's code
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (read_pixel_data_1): changed to 
silently
	return in case of out-of-bounds access. There's code that relies
	on this.

	* app/base/pixel-surround.[ch]: added SMEAR as another edge
	strategy for the PixelSurround helper.

	* core/gimp-transform-region.c: changed accordingly.


svn path=/trunk/; revision=26767
2008-08-25 20:38:52 +00:00
Sven Neumann 106072e3b8 moved scale_region() to the top of the file
svn path=/trunk/; revision=26766
2008-08-25 18:43:24 +00:00
Sven Neumann 184c85e985 minor cleanup
svn path=/trunk/; revision=26762
2008-08-25 17:34:28 +00:00
Sven Neumann 9584208543 reverted last change; it was bogus.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: reverted last change; it was 
bogus.


svn path=/trunk/; revision=26761
2008-08-25 17:26:32 +00:00
Sven Neumann df292234f2 don't scale in several steps if interpolation is GIMP_INTERPOLATION_NONE.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: don't scale in several steps 
if
	interpolation is GIMP_INTERPOLATION_NONE.


svn path=/trunk/; revision=26760
2008-08-25 16:30:37 +00:00
Sven Neumann 6fb1940834 implemented uses integer arithmetic. (pixel_average): reduced rounding
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (gaussian_decimate)
	(gaussian_lanczos2): implemented uses integer arithmetic.
	(pixel_average): reduced rounding errors.


svn path=/trunk/; revision=26759
2008-08-25 16:20:59 +00:00
Sven Neumann e607d2ce0a fixed rounding errors in color conversion.
2008-08-25  Sven Neumann  <sven@gimp.org>

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


svn path=/trunk/; revision=26758
2008-08-25 13:20:07 +00:00
Sven Neumann 3e5d269e59 provide a macro version of tile_data_pointer().
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/base/tile-private.h: provide a macro version of
	tile_data_pointer().

	* app/base/tile.c (tile_data_pointer): turned into a wrapper
	around the TILE_DATA_POINTER() macro.

	* app/base/tile-manager.c (read_pixel_data) (read_pixel_data_1)
	(write_pixel_data) (write_pixel_data_1): access tile struct
	members directly and use the new macro to access the tile data.


svn path=/trunk/; revision=26757
2008-08-25 13:00:28 +00:00
Sven Neumann 35980b2291 formatting.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-render.c 
(render_image_tile_fault):
	formatting.


svn path=/trunk/; revision=26756
2008-08-25 12:40:46 +00:00
Sven Neumann 47afc75282 removed redundant check that is already performed by
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/base/tile-manager.c (read_pixel_data_1): removed redundant
	check that is already performed by tile_manager_get_tile_num().
	Warn if an out-of-bounds read is requested, instead of silently
	doing nothing.



svn path=/trunk/; revision=26755
2008-08-25 12:00:58 +00:00
Sven Neumann afcd02f76a also hide the dialog from image_scale_confirm_response()
svn path=/trunk/; revision=26754
2008-08-25 11:57:22 +00:00
Sven Neumann e34e1b5918 hide the Scale dialog before starting to perform the scale operation.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/dialogs/image-scale-dialog.c: hide the Scale dialog before
	starting to perform the scale operation.


svn path=/trunk/; revision=26753
2008-08-25 11:41:03 +00:00
Sven Neumann 5970750152 further code cleanup and some documentation
svn path=/trunk/; revision=26752
2008-08-25 10:26:41 +00:00
Sven Neumann c206db2c2a fixed progress feedback.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: fixed progress feedback.


svn path=/trunk/; revision=26751
2008-08-25 08:03:44 +00:00
Sven Neumann 46ee36089c improved progress bar calculations. Still buggy though.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: improved progress bar
	calculations. Still buggy though.


svn path=/trunk/; revision=26750
2008-08-25 07:42:49 +00:00
Sven Neumann 4ec451658c another small cleanup
svn path=/trunk/; revision=26749
2008-08-25 07:10:14 +00:00
Sven Neumann aa5cca0002 some more cleanups.
2008-08-25  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: some more cleanups.


svn path=/trunk/; revision=26748
2008-08-25 06:46:26 +00:00
Martin Nordholts ee44ab3d32 Set page_size for the Ouput/Input Levels lower/upper adjustments to 0 to
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/tools/gimplevelstool.c (gimp_levels_tool_dialog): Set
	page_size for the Ouput/Input Levels lower/upper adjustments to 0
	to adapt to new and more correct value clamping in GTK+.

svn path=/trunk/; revision=26743
2008-08-24 13:57:42 +00:00
Martin Nordholts 8f5adb2f62 Prevent the popup from being positioned far away from the click position.
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpnavigationeditor.c
	(gimp_navigation_editor_popup): Prevent the popup from being
	positioned far away from the click position. This is further work
	on bug #362915.

svn path=/trunk/; revision=26741
2008-08-24 08:56:02 +00:00
Martin Nordholts f50037c474 Further clarify and simplify.
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpnavigationeditor.c
	(gimp_navigation_editor_popup): Further clarify and simplify.

svn path=/trunk/; revision=26740
2008-08-24 08:31:45 +00:00
Martin Nordholts f887047d6e Correct the positioning calculation (while still retaining current overall
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpnavigationeditor.c
	(gimp_navigation_editor_popup): Correct the positioning
	calculation (while still retaining current overall behaviour).

svn path=/trunk/; revision=26739
2008-08-24 08:05:07 +00:00
Martin Nordholts 513d0c9b46 Use a define for border width.
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimpnavigationview.c
	(gimp_navigation_view_draw_marker): Use a define for border width.

svn path=/trunk/; revision=26738
2008-08-24 07:10:31 +00:00
Martin Nordholts fa3b6cdb1a Don't redraw the view, only invalidate it. This causes the redraw to occur
2008-08-24  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimpnavigationview.c
	(gimp_navigation_view_set_marker): Don't redraw the view, only
	invalidate it. This causes the redraw to occur in an idle-handler
	intead of each time this function is called, which reduces flicker
	when opening new images. Stil some flicker left though...

svn path=/trunk/; revision=26737
2008-08-24 06:02:21 +00:00
Sven Neumann 93e5a3d293 use a constant to decide if we should decimate or interpolate.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale) (scale_pr): use a
	constant to decide if we should decimate or interpolate.


svn path=/trunk/; revision=26736
2008-08-24 00:08:39 +00:00
Sven Neumann 510e21219f instead of iterating over tiles manually and using write_pixel_data_1() to
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: instead of iterating over 
tiles
	manually and using write_pixel_data_1() to write the data, use
	pixel_region_process() to iterate over the destination.


svn path=/trunk/; revision=26735
2008-08-23 23:59:09 +00:00
Sven Neumann bb61099be5 added more const qualifiers.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c: added more const qualifiers.


svn path=/trunk/; revision=26734
2008-08-23 23:43:31 +00:00
Sven Neumann c7f3b68c08 sprinkled with const qualifiers. Moved calculations out of the loops.
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): sprinkled with const
	qualifiers. Moved calculations out of the loops.


svn path=/trunk/; revision=26733
2008-08-23 23:13:18 +00:00
Sven Neumann d588580cba removed optimization of the case where the source and dest regions are the
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): removed optimization 
of
	the case where the source and dest regions are the same size. 
This
	should not happen any longer.


svn path=/trunk/; revision=26732
2008-08-23 22:58:16 +00:00
Sven Neumann 8187067243 avoid unnecessary scaling when scaling factor is 2^n. (pixel_average):
2008-08-24  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (determine_scale): avoid
	unnecessary scaling when scaling factor is 2^n.
	(pixel_average): replaced with optimized pixel averager from
	tile-pyramid.c (from the gimp-2-4 branch with some minor
	corrections).


svn path=/trunk/; revision=26731
2008-08-23 22:43:21 +00:00
Sven Neumann 6203139692 replaced code that copies pixels from one tile-manager to another by a
2008-08-23  Sven Neumann  <sven@gimp.org>

	* app/paint-funcs/scale-region.c (scale): replaced code that
	copies pixels from one tile-manager to another by a call to
	copy_region().


svn path=/trunk/; revision=26730
2008-08-23 21:39:11 +00:00
Lars-Peter Clausen d4fac257aa Don't dereference final_start_seg and final_end_seg if NULL.
2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

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


svn path=/trunk/; revision=26725
2008-08-23 13:20:54 +00:00
Lars-Peter Clausen aa129cfc1d Fix indentation in previous patch.
2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

	Fix indentation in previous patch.

	* tools/pdbgen/pdb/gradient.pdb
	* app/pdb/gradient-cmds.c


svn path=/trunk/; revision=26724
2008-08-23 13:18:13 +00:00
Lars-Peter Clausen 96e8524ce1 Don't crash if the index of the last segment is out of range.
2008-08-23  Lars-Peter Clausen  <lars@metafoo.de>

	* tools/pdbgen/pdb/gradient.pdb
	(gimp_gradient_segment_range_blend_(colors|opacity)): Don't crash 
	if the index of the last segment is out of range.

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


svn path=/trunk/; revision=26723
2008-08-23 12:51:10 +00:00
Sven Neumann 41fef08ad7 only create and use a timer if GIMP_UNSTABLE is defined.
2008-08-23  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagemap.c (gimp_image_map_init): only create and
	use a timer if GIMP_UNSTABLE is defined.


svn path=/trunk/; revision=26720
2008-08-22 22:47:06 +00:00
Sven Neumann ec12326ccb app/widgets/gimpnavigationview.c hardcode the colors to black and white.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpnavigationview.c
	* libgimpwidgets/gimpscrolledpreview.c: hardcode the colors to
	black and white. Using theme colors doesn't make sense here.


svn path=/trunk/; revision=26719
2008-08-22 21:44:52 +00:00
Sven Neumann 0b8e67f2b8 formatting
svn path=/trunk/; revision=26717
2008-08-22 21:04:28 +00:00
Sven Neumann 8c5fe3b574 indicate the viewport by shading the outside region using Cairo.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpnavigationview.c: indicate the viewport by
	shading the outside region using Cairo.


svn path=/trunk/; revision=26716
2008-08-22 20:58:46 +00:00
Martin Nordholts 9a52100e44 Align static function prototypes.
2008-08-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpnavigationeditor.c: Align static function
	prototypes.

svn path=/trunk/; revision=26715
2008-08-22 18:51:36 +00:00
Martin Nordholts 84b0b44d49 Don't confine the cursor to the navigation view window because that
2008-08-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimpnavigationview.c
	(gimp_navigation_view_grab_pointer): Don't confine the cursor to
	the navigation view window because that limitation only feels in
	the way with overscroll.

svn path=/trunk/; revision=26714
2008-08-22 16:30:52 +00:00
Michael Natterer ce00697368 #define GIMP_CANVAS_EVENT_MASK.
2008-08-22  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.h: #define GIMP_CANVAS_EVENT_MASK.

	* app/display/gimpcanvas.c (gimp_canvas_realize): use it here.


svn path=/trunk/; revision=26713
2008-08-22 16:05:46 +00:00
Michael Natterer c1e13e2c5d add gimp_canvas_scroll() which scrolls the canvas and makes the result
2008-08-22  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: add gimp_canvas_scroll() which
	scrolls the canvas and makes the result visible immediately.

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll): use the new function.


svn path=/trunk/; revision=26712
2008-08-22 15:57:41 +00:00
Sven Neumann bf89d956a4 removed the "Use GEGL" check-box from the toolbox.
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimptoolbox.c: removed the "Use GEGL" check-box
	from the toolbox.

	* app/config/gimpcoreconfig.c: changed the default for 
"use-gegl"
	to FALSE (in preparation of the 2.6 release).

	* app/actions/debug-commands.[ch]
	* app/actions/debug-actions.c
	* menus/image-menu.xml.in: added a "Use GEGL" check-box to the
	Debug menu. Temporary solution until a final decision is made.


svn path=/trunk/; revision=26711
2008-08-22 15:33:02 +00:00
Sven Neumann 961683cc23 app/widgets/gimpaction.c app/widgets/gimpdockable.c
2008-08-22  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpaction.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpradioaction.c
	* app/widgets/gimpstringaction.c
	* app/widgets/gimptoggleaction.c: added basic support for icon
	names for actions and dockables. Uses the stock-id as icon name
	if the icon theme provides an icon under this name.

	* app/dialogs/dialogs.c
	* app/actions/documents-actions.c
	* app/actions/dialogs-actions.c: use the "document-open-recent"
	icon for the document history.


svn path=/trunk/; revision=26710
2008-08-22 08:57:11 +00:00
Martin Nordholts cafc9289fc Adapted to play nicely with the overscroll feature. Basically remove
2008-08-22  Martin Nordholts  <martinn@svn.gnome.org>

	* app/widgets/gimpnavigationview.c: Adapted to play nicely with
	the overscroll feature. Basically remove limitations of the
	marker, but also draw the marker frame with an inner and outer
	border so it is possible to see on what side the viewport is when
	zoomed out and overscrolled to the max. This is further work on
	bug #362915.

svn path=/trunk/; revision=26709
2008-08-22 06:50:52 +00:00
Michael Natterer 041fd8e125 turn into a GtkContainer subclass mainly to reduce the diff to a local
2008-08-21  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: turn into a GtkContainer subclass
	mainly to reduce the diff to a local hack I'm at. Also swallow
	some code that used to be called on the canvas widget externally.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): remove
	the swallowed code.

	* app/display/gimpdisplayshell-callbacks.h: remove canvas event
	mask define.


svn path=/trunk/; revision=26708
2008-08-21 23:55:58 +00:00
Sven Neumann 2b1bf9b77a app/plug-in/gimppluginprocedure.[ch] moved error handling for asynchronous
2008-08-21  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]
	* app/plug-in/gimptemporaryprocedure.c: moved error handling for
	asynchronous procedure calls to a central place. Use the plug-in
	label instead of the procedure name for the error message.


svn path=/trunk/; revision=26703
2008-08-21 18:09:41 +00:00
Sven Neumann 5e95e896b1 app/plug-in/gimppluginprocedure.c don't just free the return values when
2008-08-21  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.c
	* app/plug-in/gimptemporaryprocedure.c: don't just free the 
return
	values when running procedures asynchronously. Instead examine
	them and display the error message if there's one.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run_temp): return NULL if
	procedure->plug_in is not set.

	* app/plug-in/gimpplugin-message.c: comment.


svn path=/trunk/; revision=26700
2008-08-21 16:27:06 +00:00
Michael Natterer 9fc779f44f set precision back to PIXEL_CENTER because it's set to SUBPIXEL by the
2008-08-21  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpforegroundselecttool.c
	(gimp_foreground_select_tool_init): set precision back to
	PIXEL_CENTER because it's set to SUBPIXEL by the parent class.


svn path=/trunk/; revision=26687
2008-08-21 08:19:54 +00:00
Martin Nordholts 120b65469f Fix typo in last commit
svn path=/trunk/; revision=26686
2008-08-20 20:01:45 +00:00
Martin Nordholts ec0849dce8 Use a constant for the minimum step amount for scrollbars.
2008-08-20  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c: Use a constant for the
	minimum step amount for scrollbars.

svn path=/trunk/; revision=26685
2008-08-20 19:46:58 +00:00
Michael Natterer 8ea6e59970 reindent prototypes.
2008-08-20  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpuimanager.c: reindent prototypes.

	Steal find_widget_under_pointer() from gtktooltip.c

	(gimp_ui_manager_item_key_press): use the function to invoke help
	for the widget under the pointer if there is no selected menu
	item. Makes F1 work on insensitive menu items.


svn path=/trunk/; revision=26684
2008-08-20 18:20:42 +00:00
Michael Natterer 1206af4149 add PANGO_ALIGN_LEFT to the switch to fix warning about unhandled value.
2008-08-20  Michael Natterer  <mitch@gimp.org>

	* app/text/gimptextlayout-render.c (gimp_text_layout_render): add
	PANGO_ALIGN_LEFT to the switch to fix warning about unhandled value.


svn path=/trunk/; revision=26682
2008-08-20 17:07:46 +00:00
Michael Natterer d51c50820f Bug 496772 – Position shown in the statusbar needs more precision (for
2008-08-20  Michael Natterer  <mitch@gimp.org>

	Bug 496772 – Position shown in the statusbar needs more
	precision (for some tools)

	* app/display/display-enums.[ch]: add enum GimpCursorPrecision
	which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }.

	* app/display/gimpdisplayshell-cursor.[ch]: add "precision"
	parameter to gimp_display_shell_update_cursor() and pass it
	on to the statusbar.

	* app/display/gimpstatusbar.[ch]: add "precision" parameters to
	the cursor coordinates APIs, offset the passed coords accordingly
	and display them with one decimal point if SUBPIXEL is requested
	and the display's unit is PIXEL. Keep a second floating-point
	format string around at any time.

	* app/tools/gimptoolcontrol.[ch]: add a "precision" member and API
	so tools can configure the precision they need. Defalt to
	PIXEL_CENTER since that's right for almost all tools.

	* app/display/gimpdisplayshell-callbacks.c: pass the tool's
	precision to gimp_display_shell_update_cursor().

	* app/tools/gimptool.[ch]: add "precision" parameter to
	gimp_tool_push_status_coords() and pass it on to the statusbar.

	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c: set precision in init() where
	needed. Adjust the precision in the fly when needed, e.g. while
	moving guides or when toggling hard-edge on paint tools. Also pass
	an appropriate precision to gimp_tool_push_status_coords(), which
	is not always the tool's precision as used for cursor display.


svn path=/trunk/; revision=26681
2008-08-20 16:22:09 +00:00
Michael Natterer 4c356fe42b make gimp_perspective_clone_get_matrix() static and add
2008-08-20  Michael Natterer  <mitch@gimp.org>

	* app/paint/gimpperspectiveclone.[ch]: make
	gimp_perspective_clone_get_matrix() static and add
	gimp_perspective_clone_set_transform().

	* app/tools/gimpperspectiveclonetool.c
	(gimp_perspective_clone_tool_mode_notify): use above set_transform()
	API instead of poking into the object.

	(gimp_perspective_clone_tool_constructor): call
	gimp_perspective_clone_tool_mode_notify() to set up things instead
	of duplicating code.


svn path=/trunk/; revision=26673
2008-08-20 09:49:40 +00:00
Michael Natterer e650b579a7 formatting.
2008-08-20  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpperspectiveclonetool.[ch]: formatting.


svn path=/trunk/; revision=26672
2008-08-20 08:57:01 +00:00
Sven Neumann cdf2726bc9 flush the image when done to cause the actions to be updated (in
2008-08-20  Sven Neumann  <sven@gimp.org>

	* app/file/file-save.c (file_save): flush the image when done to
	cause the actions to be updated (in particular File->Revert).


svn path=/trunk/; revision=26669
2008-08-20 06:30:59 +00:00
Sven Neumann 0b804f4d50 find guides outside the image as well. This complements the change that we
2008-08-19  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage-guides.c (gimp_image_find_guide): find 
guides
	outside the image as well. This complements the change that we
	also draw guides outside the image now.


svn path=/trunk/; revision=26665
2008-08-19 17:48:33 +00:00
Michael Natterer 8ed8670d01 formatting.
2008-08-19  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpgegltool.c (gimp_gegl_tool_dialog): formatting.


svn path=/trunk/; revision=26664
2008-08-19 15:42:31 +00:00
Michael Natterer 960b30cd9e app/plug-in/gimpplugin.[ch] (struct GimpPlugIn) move the error_handler
2008-08-19  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugin.[ch] (struct GimpPlugIn)
	* app/plug-in/gimppluginprocframe.[ch] (struct GimpPlugInProcFrame):
	move the error_handler from the plug-in to the proc-frame.

	* app/plug-in/gimppluginprocframe.c
	* app/plug-in/gimpplugin-message.c: changed accordingly.


svn path=/trunk/; revision=26661
2008-08-19 08:24:48 +00:00
Sven Neumann 369d991fd2 Complements the fix for bug #344818:
2008-08-19  Sven Neumann  <sven@gimp.org>

	Complements the fix for bug #344818:

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

	* tools/pdbgen/enums.pl: regenerated.

	* app/plug-in/gimpplugin.[ch]: added error_handler to 
GimpPlugIn.

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	only display an error message for a failed procedure call if the
	plug-in's error-handler is set to 
GIMP_PDB_ERROR_HANDLER_INTERNAL.
	
	* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
	the plug-in's error-handler.

	* app/pdb/plug-in-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpenums.c.tail
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* plug-ins/common/file-compressor.c
	* plug-ins/file-uri/uri.c: set the error-handler to
	GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding 
the
	error with their return values.


svn path=/trunk/; revision=26656
2008-08-18 22:54:26 +00:00
Sven Neumann a2cd4b73ec Next step towards fixing bug #344818:
2008-08-17  Sven Neumann  <sven@gimp.org>

	Next step towards fixing bug #344818:

	* app/pdb/gimpprocedure.c (gimp_procedure_execute): if the error
	has not already been set, construct one from the error message
	that is optionally passed with the return values.

	* plug-ins/common/file-png.c: changed to pass an error message
	with the return values instead of calling g_message() in case of
	an error.


svn path=/trunk/; revision=26620
2008-08-17 12:13:46 +00:00
Sven Neumann 04539e92ed renamed gimp_plug_in_proc_frame_get_return_vals() to
2008-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocframe.[ch]: renamed
	gimp_plug_in_proc_frame_get_return_vals() to
	gimp_plug_in_proc_frame_get_return_values().

	* app/plug-in/gimppluginmanager-call.c: changed accordingly.

svn path=/trunk/; revision=26619
2008-08-17 12:08:52 +00:00
Sven Neumann 51d56e3a43 introduced a utility function to reduce code duplication.
2008-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin-progress.c
	(gimp_plug_in_progress_cancel_callback): introduced a utility
	function to reduce code duplication.

	* app/pdb/gimppdb.c (gimp_pdb_execute_procedure_by_name): 
changed
	to use g_error_new_literal().


svn path=/trunk/; revision=26616
2008-08-17 11:00:41 +00:00
Martin Nordholts a07760dea5 Simpliy.
2008-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): Simpliy.

svn path=/trunk/; revision=26614
2008-08-17 10:48:49 +00:00
Martin Nordholts a4a05e8c59 If the image ends up below or to the right of the viewport top and left
2008-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): If the image ends up
	below or to the right of the viewport top and left edges, and the
	image is not centered on a given axis, align the top left image
	edge with the top left viewport edge. This is basically the best
	we can do without an API for start and end of a window resize
	cycle using the mouse.

svn path=/trunk/; revision=26613
2008-08-17 07:38:25 +00:00
Martin Nordholts 9311a413fa Don't apply the centering logic on zoom_on_resize.
2008-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): Don't apply the
	centering logic on zoom_on_resize.

svn path=/trunk/; revision=26612
2008-08-17 07:29:48 +00:00
Martin Nordholts 384df24b80 When applying the centering logic we need to know the size of the new
2008-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.[ch]
	(gimp_display_shell_configure_event): When applying the centering
	logic we need to know the size of the new canvas, so instead of
	having it here, only make sure that this logic is run on the next
	canvas size-allocate.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): If the size-allocate
	comes from a top level window resize, apply centering logic.

svn path=/trunk/; revision=26611
2008-08-17 07:21:41 +00:00
Martin Nordholts 7902305706 Oops, correct parameter order.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image_on_next_size_allocate):
	Oops, correct parameter order.

svn path=/trunk/; revision=26609
2008-08-16 19:18:31 +00:00
Martin Nordholts f45897f6c7 Support axis independence.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.[ch]
	(gimp_display_shell_scroll_center_image_on_next_size_allocate):
	Support axis independence.

	* app/display/gimpdisplayshell.c: Adapt.

svn path=/trunk/; revision=26608
2008-08-16 18:50:38 +00:00
Martin Nordholts 80ff2e82c3 Explain that this function needs to be used with care since it is risky.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image_on_next_size_allocate):
	Explain that this function needs to be used with care since it is
	risky.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_new)
	(gimp_display_shell_fill): Clarify that it is safe to use the
	risky function.

	(gimp_display_shell_configure_event): Make proper comparisions (<=
	not =) and explain that usage of the risky function is safe.

	(gimp_display_shell_shrink_wrap): Always call
	gimp_display_shell_scroll_center_image() and let size-requests be
	handled by GimpDisplayShell::configure_event().

	* app/actions/view-commands.c (view_shrink_wrap_cmd_callback): No
	need to center anything explicitly any longer.

svn path=/trunk/; revision=26607
2008-08-16 18:25:32 +00:00
Sven Neumann c4f3f05df4 removed the term 'PDB' from the user-visible error messages.
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	removed the term 'PDB' from the user-visible error messages.


svn path=/trunk/; revision=26601
2008-08-16 17:11:22 +00:00
Sven Neumann b025652601 pass error parameter to gimp_vectors_import functions.
2008-08-16  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/vectors.pdb: pass error parameter to
	gimp_vectors_import functions.

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


svn path=/trunk/; revision=26600
2008-08-16 17:07:30 +00:00
Martin Nordholts ec15a39b14 Remove the centering logic because we do not always want to run it when
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): Remove the centering
	logic because we do not always want to run it when the canvas size
	changes. For example, the canvas size changes if rulers are
	toggled on/off.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_configure_event): Implement
	GtkWidget::configure_event() for the display shell and put the
	image centering logic here instead, since this class function is
	run when the top level window size changes. Run it only if the
	size (not position) of the window changes.

svn path=/trunk/; revision=26599
2008-08-16 16:52:05 +00:00
Michael Natterer 46c7d2518a remove #include "core/gimpguide.h"
2008-08-16  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpdrawtool.c: remove #include "core/gimpguide.h"


svn path=/trunk/; revision=26597
2008-08-16 15:36:17 +00:00
Sven Neumann f0c60f8779 added missing space
svn path=/trunk/; revision=26595
2008-08-16 14:13:44 +00:00
Sven Neumann c2f12f7e64 changed error message to be similar to the message thrown from
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimppdb.c (gimp_pdb_execute_procedure_by_name): 
changed
	error message to be similar to the message thrown from
	gimp_procedure_validate_args().


svn path=/trunk/; revision=26594
2008-08-16 14:12:38 +00:00
Sven Neumann f84608d539 If a procedure call fails, pass a string describing the error as the
2008-08-16  Sven Neumann  <sven@gimp.org>

	If a procedure call fails, pass a string describing the error as
	the second return value. First step towars fixing bug #344818.

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_get_return_values):
	added a GError parameter. If it is set, pass the error message 
to
	the return values.

	* app/pdb/gimppdberror.h: added some more error codes.

	* app/pdb/gimppdb.c
	* app/xcf/xcf.c: pass errors to 
gimp_procedure_get_return_values().

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	show a different error message for execution vs. calling errors.

	* app/plug-in/gimpplugin-progress.c
	(gimp_plug_in_progress_cancel_callback): pass the error
	GIMP_PDB_CANCELLED to gimp_procedure_get_return_values().

	* app/plug-in/gimppluginmanager-call.[ch]
	(gimp_plug_in_manager_call_run): removed the 
'destroy_return_vals'
	parameter.

	* app/plug-in/gimppluginprocedure.c: destroy the return values 
here.

	* app/plug-in/gimppluginprocframe.c: pass an error to
	gimp_procedure_get_return_values().

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: generate code that passes the
	error to gimp_procedure_get_return_values().

	* app/pdb/*-cmds.c: regenerated.
	
	* plug-ins/pygimp/pygimp-pdb.c: extract the error message from 
the
	return values and pass it to the exception that is thrown.


svn path=/trunk/; revision=26593
2008-08-16 13:57:57 +00:00
Martin Nordholts b9acd50751 Also handle the case when only the offset is wrong. Not pretty but simple.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/actions/view-commands.c (view_shrink_wrap_cmd_callback):
	Also handle the case when only the offset is wrong. Not pretty but
	simple.

svn path=/trunk/; revision=26592
2008-08-16 13:53:18 +00:00
Sven Neumann 750a56ef74 removed unused includes
svn path=/trunk/; revision=26591
2008-08-16 11:54:25 +00:00
Sven Neumann f9ebb8c9fd app/display/Makefile.am app/display/gimpdisplayshell-scale.[ch] split
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/display/Makefile.am
	* app/display/gimpdisplayshell-scale.[ch]
	* app/display/gimpdisplayshell-scale-dialog.[ch]: split scale
	dialog into a new file.

	* app/actions/view-commands.c: changed accordingly.

svn path=/trunk/; revision=26590
2008-08-16 11:51:10 +00:00
Martin Nordholts 1250993fe1 New function.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_viewport_coord_almost_centered): New
	function.

	(gimp_display_shell_scale): Center the image on zoom also if it is
	almost centered. This makes the image centered all the way when
	zooming out far away.

svn path=/trunk/; revision=26589
2008-08-16 10:25:50 +00:00
Sven Neumann 659b1f727f app/tools/gimpfreeselecttool.c formatting.
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/tools/gimpfreeselecttool.c
	* app/tools/gimprectangletool.c: formatting.


svn path=/trunk/; revision=26588
2008-08-16 10:07:43 +00:00
Martin Nordholts 8d7b13ae01 Reimplement to increase readability.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_to): Reimplement to increase
	readability.

svn path=/trunk/; revision=26587
2008-08-16 08:59:58 +00:00
Martin Nordholts 46f7ce1a01 Nice-ify.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_to): Nice-ify.

svn path=/trunk/; revision=26586
2008-08-16 07:15:33 +00:00