forked from AuroraMiddleware/gtk
change GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
2002-01-17 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work as in the keynav spec, though it makes the interpretation of GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes any sense anyhow.
This commit is contained in:
parent
6bc31ea4d9
commit
c6a3df0474
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -1,3 +1,13 @@
|
||||
2002-01-17 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_move_cursor_internal): change
|
||||
GTK_MOVEMENT_PARAGRAPHS to go to start/end of paragraph before it
|
||||
starts to go up/down paragraphs. This makes Ctrl+Up/Ctrl+Down work
|
||||
as in the keynav spec, though it makes the interpretation of
|
||||
GTK_MOVEMENT_PARAGRAPHS different from the interpretation of some
|
||||
of the other GTK_MOVEMENT_ thingies, maybe, as if that enum makes
|
||||
any sense anyhow.
|
||||
|
||||
Thu Jan 17 16:34:55 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gtk/gtktreeview.c (gtk_tree_view_real_select_cursor_row): For
|
||||
|
@ -4457,8 +4457,28 @@ gtk_text_view_move_cursor_internal (GtkTextView *text_view,
|
||||
break;
|
||||
|
||||
case GTK_MOVEMENT_PARAGRAPHS:
|
||||
gtk_text_iter_forward_lines (&newplace, count);
|
||||
gtk_text_iter_set_line_offset (&newplace, 0);
|
||||
if (count > 0)
|
||||
{
|
||||
if (!gtk_text_iter_ends_line (&newplace))
|
||||
{
|
||||
gtk_text_iter_forward_to_line_end (&newplace);
|
||||
--count;
|
||||
}
|
||||
}
|
||||
else if (count < 0)
|
||||
{
|
||||
if (gtk_text_iter_get_line_offset (&newplace) > 0)
|
||||
{
|
||||
gtk_text_iter_set_line_offset (&newplace, 0);
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
if (count != 0)
|
||||
{
|
||||
gtk_text_iter_forward_lines (&newplace, count);
|
||||
gtk_text_iter_set_line_offset (&newplace, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case GTK_MOVEMENT_PARAGRAPH_ENDS:
|
||||
|
Loading…
Reference in New Issue
Block a user