Commit a8bbf6b2 authored by Martin Nordholts's avatar Martin Nordholts Committed by Martin Nordholts

Applied modified patch from Daniel Hornung that changes the mouse cursor

2008-04-12  Martin Nordholts  <martinn@svn.gnome.org>

	Applied modified patch from Daniel Hornung that changes the mouse
	cursor to a "clicking will create a selection"-icon when hovering
	the center of a pending Scissors Select Tool selection (bug #493370)

	* app/tools/gimpiscissorstool.c
	(gimp_iscissors_tool_cursor_update): Use the new cursor icon.

	* cursors/modifier-select.png
	* cursors/xbm/modifier-select.xbm
	* cursors/xbm/modifier-select-mask.xbm: New cursor icon.

	* cursors/makefile.msc
	* cursors/Makefile.am 
	* app/widgets/gimpcursor.c
	* app/widgets/widgets-enums.h: Changed accordingly.

svn path=/trunk/; revision=25473
parent e946f603
2008-04-12 Martin Nordholts <martinn@svn.gnome.org>
Applied modified patch from Daniel Hornung that changes the mouse
cursor to a "clicking will create a selection"-icon when hovering
the center of a pending Scissors Select Tool selection (bug #493370)
* app/tools/gimpiscissorstool.c
(gimp_iscissors_tool_cursor_update): Use the new cursor icon.
* cursors/modifier-select.png
* cursors/xbm/modifier-select.xbm
* cursors/xbm/modifier-select-mask.xbm: New cursor icon.
* cursors/makefile.msc
* cursors/Makefile.am
* app/widgets/gimpcursor.c
* app/widgets/widgets-enums.h: Changed accordingly.
2008-04-12 Martin Nordholts <martinn@svn.gnome.org>
* plug-ins/script-fu/scripts/3d-outline.scm
......
......@@ -1018,9 +1018,18 @@ gimp_iscissors_tool_cursor_update (GimpTool *tool,
switch (iscissors->op)
{
case ISCISSORS_OP_SELECT:
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords,
state, display);
return;
{
GimpSelectionOptions *options;
options = GIMP_SELECTION_TOOL_GET_OPTIONS (tool);
/* Do not overwrite the modifiers for add, subtract, intersect */
if(options->operation == GIMP_CHANNEL_OP_REPLACE)
{
modifier = GIMP_CURSOR_MODIFIER_SELECT;
}
}
break;
case ISCISSORS_OP_MOVE_POINT:
modifier = GIMP_CURSOR_MODIFIER_MOVE;
......@@ -1042,10 +1051,19 @@ gimp_iscissors_tool_cursor_update (GimpTool *tool,
break;
}
gimp_tool_set_cursor (tool, display,
GIMP_CURSOR_MOUSE,
GIMP_TOOL_CURSOR_ISCISSORS,
modifier);
if (modifier != GIMP_CURSOR_MODIFIER_NONE)
{
gimp_tool_set_cursor (tool, display,
GIMP_CURSOR_MOUSE,
GIMP_TOOL_CURSOR_ISCISSORS,
modifier);
}
else
{
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords,
state, display);
}
}
static gboolean
......
......@@ -158,6 +158,8 @@
#include "cursors/xbm/modifier-pattern-mask.xbm"
#include "cursors/xbm/modifier-join.xbm"
#include "cursors/xbm/modifier-join-mask.xbm"
#include "cursors/xbm/modifier-select.xbm"
#include "cursors/xbm/modifier-select-mask.xbm"
typedef struct _GimpCursor GimpCursor;
......@@ -587,6 +589,12 @@ static GimpCursor gimp_cursor_modifiers[] =
modifier_join_width, modifier_join_height,
0, 0,
modifier_join, NULL, NULL, NULL
},
{
modifier_select_bits, modifier_select_mask_bits,
modifier_select_width, modifier_select_height,
0, 0,
modifier_select, NULL, NULL, NULL
}
};
......
......@@ -280,6 +280,7 @@ typedef enum /*< skip >*/
GIMP_CURSOR_MODIFIER_BACKGROUND,
GIMP_CURSOR_MODIFIER_PATTERN,
GIMP_CURSOR_MODIFIER_JOIN,
GIMP_CURSOR_MODIFIER_SELECT,
GIMP_CURSOR_MODIFIER_LAST
} GimpCursorModifier;
......
......@@ -30,6 +30,7 @@ CURSOR_IMAGES = \
modifier-pattern.png \
modifier-plus.png \
modifier-resize.png \
modifier-select.png \
\
tool-airbrush.png \
tool-blend.png \
......
......@@ -30,6 +30,7 @@ CURSOR_LIST = \
modifier_pattern modifier-pattern.png \
modifier_plus modifier-plus.png \
modifier_resize modifier-resize.png \
modifier_select modifier-select.png \
\
tool_airbrush tool-airbrush.png \
tool_blend tool-blend.png \
......
#define modifier_select_mask_width 32
#define modifier_select_mask_height 32
static unsigned char modifier_select_mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0xe0, 0x3d,
0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x38, 0xe0,
0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 0x10, 0x40,
0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0xc0, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
#define modifier_select_width 32
#define modifier_select_height 32
static unsigned char modifier_select_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40,
0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x18, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment