Commit 4957e325 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Let GDK_Return pass through in some more cases.

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.
parent d30ba097
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)
......
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)
......
......@@ -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))
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment