no need to set the tool cursor here, we already do that in init() and

2007-08-02  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpcroptool.c (gimp_crop_tool_cursor_update): no need
	to set the tool cursor here, we already do that in init() and
	never change it.

	* app/widgets/gimpcursor.c (gimp_cursor_new): don't show the move
	cursor and the move modifier at the same time. Some small
	cleanups.


svn path=/trunk/; revision=23104
This commit is contained in:
Michael Natterer 2007-08-02 13:33:38 +00:00 committed by Michael Natterer
parent 50779a28b8
commit 26edfdec1a
3 changed files with 28 additions and 12 deletions

View File

@ -1,3 +1,13 @@
2007-08-02 Michael Natterer <mitch@gimp.org>
* app/tools/gimpcroptool.c (gimp_crop_tool_cursor_update): no need
to set the tool cursor here, we already do that in init() and
never change it.
* app/widgets/gimpcursor.c (gimp_cursor_new): don't show the move
cursor and the move modifier at the same time. Some small
cleanups.
2007-08-02 Sven Neumann <sven@gimp.org>
* plug-ins/jpeg/jpegqual.c: sprinkled const qualifiers.

View File

@ -229,7 +229,6 @@ gimp_crop_tool_cursor_update (GimpTool *tool,
GimpDisplay *display)
{
gimp_rectangle_tool_cursor_update (tool, coords, state, display);
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_CROP);
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);
}

View File

@ -660,6 +660,14 @@ gimp_cursor_new (GdkDisplay *display,
modifier = GIMP_CURSOR_MODIFIER_NONE;
}
/* some more sanity checks
*/
if (cursor_type == GIMP_CURSOR_MOVE &&
modifier == GIMP_CURSOR_MODIFIER_MOVE)
{
modifier = GIMP_CURSOR_MODIFIER_NONE;
}
/* prepare the main cursor */
cursor_type -= GIMP_CURSOR_NONE;
@ -667,19 +675,19 @@ gimp_cursor_new (GdkDisplay *display,
/* prepare the tool cursor */
if (tool_cursor >= GIMP_TOOL_CURSOR_LAST)
tool_cursor = GIMP_TOOL_CURSOR_NONE;
if (tool_cursor != GIMP_TOOL_CURSOR_NONE)
bmtool = &gimp_tool_cursors[tool_cursor];
if (tool_cursor > GIMP_TOOL_CURSOR_NONE &&
tool_cursor < GIMP_TOOL_CURSOR_LAST)
{
bmtool = &gimp_tool_cursors[tool_cursor];
}
/* prepare the cursor modifier */
if (modifier >= GIMP_CURSOR_MODIFIER_LAST)
modifier = GIMP_CURSOR_MODIFIER_NONE;
if (modifier != GIMP_CURSOR_MODIFIER_NONE)
bmmodifier = &gimp_cursor_modifiers[modifier];
if (modifier > GIMP_CURSOR_MODIFIER_NONE &&
modifier < GIMP_CURSOR_MODIFIER_LAST)
{
bmmodifier = &gimp_cursor_modifiers[modifier];
}
if (cursor_format != GIMP_CURSOR_FORMAT_BITMAP &&
gdk_display_supports_cursor_alpha (display) &&
@ -769,7 +777,6 @@ gimp_cursor_new (GdkDisplay *display,
&fg, &bg,
bmcursor->x_hot,
bmcursor->y_hot);
g_object_unref (bitmap);
g_object_unref (mask);
}