mirror of https://github.com/GNOME/gimp.git
Switch to design mode when Escape gets pressed. Untabbified.
2004-10-25 Simon Budig <simon@gimp.org> * app/tools/gimpvectortool.c: Switch to design mode when Escape gets pressed. Untabbified.
This commit is contained in:
parent
e88a663631
commit
fdd150e310
|
@ -1,3 +1,8 @@
|
||||||
|
2004-10-25 Simon Budig <simon@gimp.org>
|
||||||
|
|
||||||
|
* app/tools/gimpvectortool.c: Switch to design mode when
|
||||||
|
Escape gets pressed. Untabbified.
|
||||||
|
|
||||||
2004-10-25 Michael Natterer <mitch@gimp.org>
|
2004-10-25 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/actions/gradient-editor-commands.c
|
* app/actions/gradient-editor-commands.c
|
||||||
|
|
|
@ -175,18 +175,18 @@ gimp_vector_tool_get_type (void)
|
||||||
static const GTypeInfo tool_info =
|
static const GTypeInfo tool_info =
|
||||||
{
|
{
|
||||||
sizeof (GimpVectorToolClass),
|
sizeof (GimpVectorToolClass),
|
||||||
(GBaseInitFunc) NULL,
|
(GBaseInitFunc) NULL,
|
||||||
(GBaseFinalizeFunc) NULL,
|
(GBaseFinalizeFunc) NULL,
|
||||||
(GClassInitFunc) gimp_vector_tool_class_init,
|
(GClassInitFunc) gimp_vector_tool_class_init,
|
||||||
NULL, /* class_finalize */
|
NULL, /* class_finalize */
|
||||||
NULL, /* class_data */
|
NULL, /* class_data */
|
||||||
sizeof (GimpVectorTool),
|
sizeof (GimpVectorTool),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
(GInstanceInitFunc) gimp_vector_tool_init,
|
(GInstanceInitFunc) gimp_vector_tool_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
tool_type = g_type_register_static (GIMP_TYPE_DRAW_TOOL,
|
tool_type = g_type_register_static (GIMP_TYPE_DRAW_TOOL,
|
||||||
"GimpVectorTool",
|
"GimpVectorTool",
|
||||||
&tool_info, 0);
|
&tool_info, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,14 +788,16 @@ gimp_vector_tool_key_press (GimpTool *tool,
|
||||||
GdkEventKey *kevent,
|
GdkEventKey *kevent,
|
||||||
GimpDisplay *gdisp)
|
GimpDisplay *gdisp)
|
||||||
{
|
{
|
||||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||||
GimpDisplayShell *shell;
|
GimpVectorOptions *options;
|
||||||
gdouble xdist, ydist;
|
|
||||||
gdouble pixels = 1.0;
|
GimpDisplayShell *shell;
|
||||||
|
gdouble xdist, ydist;
|
||||||
|
gdouble pixels = 1.0;
|
||||||
|
|
||||||
if (! vector_tool->vectors)
|
if (! vector_tool->vectors)
|
||||||
return TRUE;
|
return FALSE;
|
||||||
|
|
||||||
shell = GIMP_DISPLAY_SHELL (draw_tool->gdisp->shell);
|
shell = GIMP_DISPLAY_SHELL (draw_tool->gdisp->shell);
|
||||||
|
|
||||||
|
@ -856,8 +858,16 @@ gimp_vector_tool_key_press (GimpTool *tool,
|
||||||
vector_tool->have_undo = FALSE;
|
vector_tool->have_undo = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
case GDK_Escape:
|
||||||
|
options = GIMP_VECTOR_OPTIONS (tool->tool_info->tool_options);
|
||||||
|
|
||||||
|
if (options->edit_mode != GIMP_VECTOR_MODE_DESIGN)
|
||||||
|
g_object_set (options, "vectors-edit-mode",
|
||||||
|
GIMP_VECTOR_MODE_DESIGN, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_image_flush (gdisp->gimage);
|
gimp_image_flush (gdisp->gimage);
|
||||||
|
|
Loading…
Reference in New Issue