From 3ae4d004ca7bab27898276b00b6b14f4e2eebf40 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 24 Feb 1999 18:47:49 +0000 Subject: [PATCH] if the widget is not editable, don't silently eat up GDK_Return, GDK_Home Wed Feb 24 19:35:15 1999 Tim Janik * 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. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktext.c | 8 +++++++- 8 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bfda15d2ba..1ef8c2e217 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Wed Feb 24 19:35:15 1999 Tim Janik + + * 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. + Wed Feb 24 11:19:12 1999 Tim Janik * gtk/gtkwidget.c (gtk_widget_size_request): warn about 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;