diff options
author | Tim Janik <timj@gtk.org> | 1999-02-24 18:47:49 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-02-24 18:47:49 +0000 |
commit | 3ae4d004ca7bab27898276b00b6b14f4e2eebf40 (patch) | |
tree | 447a62ea961bcbd9c3dc9b9d8222124b73d2d7da /gtk/gtktext.c | |
parent | c4fe78345e11dfd2ed909500cdc6000682d96304 (diff) | |
download | gtk+-3ae4d004ca7bab27898276b00b6b14f4e2eebf40.tar.gz |
if the widget is not editable, don't silently eat up GDK_Return, GDK_Home
Wed Feb 24 19:35:15 1999 Tim Janik <timj@gtk.org>
* gtk/gtktext.c (gtk_text_key_press): if the widget is not editable,
don't silently eat up GDK_Return, GDK_Home and GDK_End, return FALSE
instead so the user can still hook up key bindings.
Diffstat (limited to 'gtk/gtktext.c')
-rw-r--r-- | gtk/gtktext.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtktext.c b/gtk/gtktext.c index ed510a9e68..7d8daf2307 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -2001,11 +2001,15 @@ gtk_text_key_press (GtkWidget *widget, { case GDK_Home: if (event->state & GDK_CONTROL_MASK) - scroll_int (text, -text->vadj->value); + scroll_int (text, -text->vadj->value); + else + return_val = FALSE; break; case GDK_End: if (event->state & GDK_CONTROL_MASK) scroll_int (text, +text->vadj->upper); + else + return_val = FALSE; break; case GDK_Page_Up: scroll_int (text, -text->vadj->page_increment); break; case GDK_Page_Down: scroll_int (text, +text->vadj->page_increment); break; @@ -2014,6 +2018,8 @@ gtk_text_key_press (GtkWidget *widget, case GDK_Return: if (event->state & GDK_CONTROL_MASK) gtk_signal_emit_by_name (GTK_OBJECT (text), "activate"); + else + return_val = FALSE; break; default: return_val = FALSE; |