diff options
author | Havoc Pennington <hp@redhat.com> | 2000-12-14 23:26:59 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-12-14 23:26:59 +0000 |
commit | 94ec8cff934d0d5559d6474131b3682e943bbc8e (patch) | |
tree | 1e28209981e5b72a75bd7e49f88f0f673e3a6e29 /gtk/gtktextview.c | |
parent | 2e70f892ccf120947b4ab34a968ca4818208211d (diff) | |
download | gdk-pixbuf-94ec8cff934d0d5559d6474131b3682e943bbc8e.tar.gz |
remove unused call to get_last_line()
2000-12-14 Havoc Pennington <hp@redhat.com>
* gtk/gtktextbtree.c (_gtk_text_btree_validate_line): remove
unused call to get_last_line()
* gtk/gtkobject.c (gtk_object_add_arg_type): add G_TYPE_POINTER
here until boxed is working (and maybe after that - we should
really not gratuitously break old code)
* gtk/gtktexttag.c (gtk_text_tag_class_init): add commented-out
specific types for font_desc and tabs args, move them to
GTK_TYPE_POINTER for now, waiting on g_param_spec_boxed() to get
fixed. Move GdkColor args to GTK_TYPE_POINTER also.
* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): temporarily
use GTK_TYPE_POINTER for signal signatures as a hack-around
* gtk/gtk-boxed.defs: Add boxed types for PangoFontDescription and
PangoTabArray
* gtk/gtktextlayout.c (line_display_iter_to_index):
make static
(line_display_index_to_iter): make static
* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): fix marshaller
to marshal a string not a boxed
* gtk/gtkmarshal.list: add marshaller for GtkTextBuffer:insert_text
* gtk/testtext.c (fill_file_buffer): don't use g_utf8_next_char
since the UTF-8 isn't validated yet
* gtk/gtktextsegment.c (char_segment_check_func): don't require
lines to end in '\n'
* gtk/gtktextview.c (gtk_text_view_move_cursor): update to use
forward_to_delimiters, and grapheme boundaries
(gtk_text_view_delete_from_cursor): properly handle non-newline
delimiters, and grapheme boundaries
* gtk/gtktextiter.c (gtk_text_iter_forward_to_newline): rename
to gtk_text_iter_forward_to_delimiters, and make it work properly
if empty lines end with a character other than '\n'
* gtk/gtktextiter.h, gtk/gtktextiter.c: Add movement by cursor
position
Diffstat (limited to 'gtk/gtktextview.c')
-rw-r--r-- | gtk/gtktextview.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 35a4747bb..1a97e93d3 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -3123,7 +3123,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view, switch (step) { case GTK_MOVEMENT_CHARS: - gtk_text_iter_forward_chars (&newplace, count); + gtk_text_iter_forward_cursor_positions (&newplace, count); break; case GTK_MOVEMENT_POSITIONS: @@ -3161,7 +3161,7 @@ gtk_text_view_move_cursor (GtkTextView *text_view, case GTK_MOVEMENT_PARAGRAPH_ENDS: if (count > 0) - gtk_text_iter_forward_to_newline (&newplace); + gtk_text_iter_forward_to_delimiters (&newplace); else if (count < 0) gtk_text_iter_set_line_offset (&newplace, 0); break; @@ -3334,7 +3334,7 @@ gtk_text_view_delete_from_cursor (GtkTextView *text_view, switch (type) { case GTK_DELETE_CHARS: - gtk_text_iter_forward_chars (&end, count); + gtk_text_iter_forward_cursor_positions (&end, count); break; case GTK_DELETE_WORD_ENDS: @@ -3358,15 +3358,15 @@ gtk_text_view_delete_from_cursor (GtkTextView *text_view, * simply delete that newline, instead of * moving to the next one. */ - if (gtk_text_iter_get_char (&end) == '\n') + if (gtk_text_iter_ends_line (&end)) { - gtk_text_iter_forward_char (&end); + gtk_text_iter_forward_line (&end); --count; } while (count > 0) { - if (!gtk_text_iter_forward_to_newline (&end)) + if (!gtk_text_iter_forward_to_delimiters (&end)) break; --count; @@ -3380,12 +3380,12 @@ gtk_text_view_delete_from_cursor (GtkTextView *text_view, if (count > 0) { gtk_text_iter_set_line_offset (&start, 0); - gtk_text_iter_forward_to_newline (&end); + gtk_text_iter_forward_to_delimiters (&end); /* Do the lines beyond the first. */ while (count > 1) { - gtk_text_iter_forward_to_newline (&end); + gtk_text_iter_forward_to_delimiters (&end); --count; } |