When tab is pressed and the text view isn't editable, move the focus

2002-01-03  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtktextview.c (gtk_text_view_key_press_event): When
	tab is pressed and the text view isn't editable,
	move the focus instead.
This commit is contained in:
Anders Carlsson 2002-01-03 18:27:16 +00:00 committed by Anders Carlsson
parent 0ea3acb02e
commit 39900836ca
8 changed files with 36 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -1,5 +1,9 @@
2002-01-03 Anders Carlsson <andersca@gnu.org>
* gtk/gtktextview.c (gtk_text_view_key_press_event): When
tab is pressed and the text view isn't editable,
move the focus instead.
* gtk/gtkstyle.c (gtk_default_draw_focus): Free dash list if
necessary.

View File

@ -3596,7 +3596,14 @@ gtk_text_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
event->keyval == GDK_ISO_Left_Tab) &&
!(event->state & GDK_CONTROL_MASK))
{
gtk_text_view_commit_text (text_view, "\t");
/* If the text isn't editable, move the focus instead */
if (text_view->editable)
gtk_text_view_commit_text (text_view, "\t");
else
gtk_text_view_move_focus (text_view,
(event->state & GDK_SHIFT_MASK) ?
GTK_DIR_TAB_BACKWARD: GTK_DIR_TAB_FORWARD);
retval = TRUE;
}
else