diff --git a/ChangeLog b/ChangeLog index cb0b2c38f5..e02b9bd29a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-08-02 Michael Natterer + + * 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 * plug-ins/jpeg/jpegqual.c: sprinkled const qualifiers. diff --git a/app/tools/gimpcroptool.c b/app/tools/gimpcroptool.c index 6890458dc4..c95835d2a3 100644 --- a/app/tools/gimpcroptool.c +++ b/app/tools/gimpcroptool.c @@ -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); } diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c index a912ffa48f..3d06285353 100644 --- a/app/widgets/gimpcursor.c +++ b/app/widgets/gimpcursor.c @@ -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); }