gimp r27429 - in trunk: . app/tools
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27429 - in trunk: . app/tools
- Date: Sun, 26 Oct 2008 21:50:20 +0000 (UTC)
Author: mitch
Date: Sun Oct 26 21:50:20 2008
New Revision: 27429
URL: http://svn.gnome.org/viewvc/gimp?rev=27429&view=rev
Log:
2008-10-26 Michael Natterer <mitch gimp org>
* app/tools/gimptexttool.c: handle Tab, some more cleanup.
Modified:
trunk/ChangeLog
trunk/app/tools/gimptexttool.c
Modified: trunk/app/tools/gimptexttool.c
==============================================================================
--- trunk/app/tools/gimptexttool.c (original)
+++ trunk/app/tools/gimptexttool.c Sun Oct 26 21:50:20 2008
@@ -505,23 +505,22 @@
gchar *string;
gtk_text_buffer_get_bounds (text_tool->text_buffer,
- &start, &end);
+ &start, &end);
string = gtk_text_buffer_get_text (text_tool->text_buffer,
&start, &end, TRUE);
pango_layout_xy_to_index (text_tool->layout->layout,
x * PANGO_SCALE,
y * PANGO_SCALE,
&offset, &trailing);
- offset = g_utf8_pointer_to_offset (string,
- (string + offset));
+ offset = g_utf8_pointer_to_offset (string, string + offset);
offset += trailing;
g_free (string);
gtk_text_buffer_get_iter_at_offset (text_tool->text_buffer,
- &cursor, offset);
+ &cursor, offset);
gtk_text_buffer_place_cursor (text_tool->text_buffer,
- &cursor);
+ &cursor);
}
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
@@ -629,19 +628,20 @@
gtk_text_buffer_get_bounds (text_tool->text_buffer, &start, &end);
string = gtk_text_buffer_get_text (text_tool->text_buffer,
- &start, &end, TRUE);
+ &start, &end, TRUE);
pango_layout_xy_to_index (text_tool->layout->layout,
x * PANGO_SCALE,
y * PANGO_SCALE,
&offset, &trailing);
- offset = g_utf8_pointer_to_offset (string, (string + offset));
+ offset = g_utf8_pointer_to_offset (string, string + offset);
offset += trailing;
g_free (string);
- gtk_text_buffer_get_iter_at_offset (text_tool->text_buffer, &cursor, offset);
+ gtk_text_buffer_get_iter_at_offset (text_tool->text_buffer,
+ &cursor, offset);
gtk_text_buffer_move_mark_by_name (text_tool->text_buffer,
"selection_bound", &cursor);
}
@@ -786,6 +786,14 @@
gimp_text_tool_update_layout (text_tool);
break;
+ case GDK_Tab:
+ case GDK_KP_Tab:
+ case GDK_ISO_Left_Tab:
+ gimp_text_tool_enter_text (text_tool, "\t");
+ gimp_text_tool_reset_im_context (text_tool);
+ gimp_text_tool_update_layout (text_tool);
+ break;
+
case GDK_BackSpace:
gimp_text_tool_delete_text (text_tool, TRUE);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]