[gimp] app: pause/resume the draw tool at some more reasonable places
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: pause/resume the draw tool at some more reasonable places
- Date: Tue, 23 Feb 2010 10:40:52 +0000 (UTC)
commit 6224e3d5f74799ffac43234c12aa799ed181ba66
Author: Michael Natterer <mitch gimp org>
Date: Mon Feb 22 18:48:13 2010 +0100
app: pause/resume the draw tool at some more reasonable places
app/tools/gimptexttool-editor.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 6da51ef..56ba119 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -346,12 +346,16 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
gint x_pos = -1;
gboolean retval = TRUE;
+ gimp_draw_tool_pause (GIMP_DRAW_TOOL (text_tool));
+
if (gtk_im_context_filter_keypress (text_tool->im_context, kevent))
{
text_tool->needs_im_reset = TRUE;
text_tool->x_pos = -1;
- return TRUE;
+ gimp_draw_tool_resume (GIMP_DRAW_TOOL (text_tool));
+
+ return TRUE;
}
gimp_text_tool_ensure_proxy (text_tool);
@@ -361,6 +365,8 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
{
GIMP_LOG (TEXT_EDITING, "binding handled event");
+ gimp_draw_tool_resume (GIMP_DRAW_TOOL (text_tool));
+
return TRUE;
}
@@ -369,8 +375,6 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
gtk_text_buffer_get_iter_at_mark (buffer, &selection,
gtk_text_buffer_get_selection_bound (buffer));
- gimp_draw_tool_pause (GIMP_DRAW_TOOL (text_tool));
-
switch (kevent->keyval)
{
case GDK_Return:
@@ -840,7 +844,11 @@ gimp_text_tool_delete_from_cursor (GimpTextTool *text_tool,
case GTK_DELETE_CHARS:
if (gtk_text_buffer_get_has_selection (buffer))
{
+ gimp_draw_tool_pause (GIMP_DRAW_TOOL (text_tool));
+
gtk_text_buffer_delete_selection (buffer, TRUE, TRUE);
+
+ gimp_draw_tool_resume (GIMP_DRAW_TOOL (text_tool));
return;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]