diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 6 | ||||
-rw-r--r-- | gtk/gtkentry.c | 10 | ||||
-rw-r--r-- | gtk/gtkimcontextsimple.c | 6 |
4 files changed, 24 insertions, 4 deletions
@@ -1,5 +1,11 @@ 2005-09-13 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): + Let GDK_Return pass through in some more cases. + + * gtk/gtkentry.c (gtk_entry_key_press): Reset the im context before + activating the entry. + * gtk/gtkiconview.c (gtk_icon_view_class_init): (gtk_icon_view_get_dest_item_at_pos): Fix typos in the docs. (#316008, #316027, #316121, Guillaume Cottenceau) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index d01059fe17..4062131372 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,11 @@ 2005-09-13 Matthias Clasen <mclasen@redhat.com> + * gtk/gtkimcontextsimple.c (gtk_im_context_simple_filter_keypress): + Let GDK_Return pass through in some more cases. + + * gtk/gtkentry.c (gtk_entry_key_press): Reset the im context before + activating the entry. + * gtk/gtkiconview.c (gtk_icon_view_class_init): (gtk_icon_view_get_dest_item_at_pos): Fix typos in the docs. (#316008, #316027, #316121, Guillaume Cottenceau) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 60cd89e379..2814f2b344 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -1893,16 +1893,20 @@ gtk_entry_key_press (GtkWidget *widget, } } - if (event->keyval == GDK_Return || event->keyval == GDK_ISO_Enter - || event->keyval == GDK_Escape) + if (event->keyval == GDK_Return || + event->keyval == GDK_KP_Enter || + event->keyval == GDK_ISO_Enter || + event->keyval == GDK_Escape) { GtkEntryCompletion *completion = gtk_entry_get_completion (entry); - + if (completion && completion->priv->completion_timeout) { g_source_remove (completion->priv->completion_timeout); completion->priv->completion_timeout = 0; } + + gtk_entry_reset_im_context (entry); } if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event)) diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c index ac98ac0656..0bea1c646f 100644 --- a/gtk/gtkimcontextsimple.c +++ b/gtk/gtkimcontextsimple.c @@ -1384,7 +1384,11 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context, (context_simple->in_hex_sequence && !hex_keyval && !is_hex_start && !is_space && !is_backspace)) { - if (event->state & (gtk_accelerator_get_default_mod_mask () & ~GDK_SHIFT_MASK)) + if (event->state & (gtk_accelerator_get_default_mod_mask () & ~GDK_SHIFT_MASK) || + (context_simple->in_hex_sequence && context_simple->modifiers_dropped && + (event->keyval == GDK_Return || + event->keyval == GDK_ISO_Enter || + event->keyval == GDK_KP_Enter))) return FALSE; } |