forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
d30ba09733
commit
4957e325c0
@ -1,5 +1,11 @@
|
|||||||
2005-09-13 Matthias Clasen <mclasen@redhat.com>
|
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/gtkiconview.c (gtk_icon_view_class_init):
|
||||||
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
||||||
docs. (#316008, #316027, #316121, Guillaume Cottenceau)
|
docs. (#316008, #316027, #316121, Guillaume Cottenceau)
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
2005-09-13 Matthias Clasen <mclasen@redhat.com>
|
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/gtkiconview.c (gtk_icon_view_class_init):
|
||||||
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
(gtk_icon_view_get_dest_item_at_pos): Fix typos in the
|
||||||
docs. (#316008, #316027, #316121, Guillaume Cottenceau)
|
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
|
if (event->keyval == GDK_Return ||
|
||||||
|| event->keyval == GDK_Escape)
|
event->keyval == GDK_KP_Enter ||
|
||||||
|
event->keyval == GDK_ISO_Enter ||
|
||||||
|
event->keyval == GDK_Escape)
|
||||||
{
|
{
|
||||||
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
GtkEntryCompletion *completion = gtk_entry_get_completion (entry);
|
||||||
|
|
||||||
if (completion && completion->priv->completion_timeout)
|
if (completion && completion->priv->completion_timeout)
|
||||||
{
|
{
|
||||||
g_source_remove (completion->priv->completion_timeout);
|
g_source_remove (completion->priv->completion_timeout);
|
||||||
completion->priv->completion_timeout = 0;
|
completion->priv->completion_timeout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gtk_entry_reset_im_context (entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event))
|
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 &&
|
(context_simple->in_hex_sequence && !hex_keyval &&
|
||||||
!is_hex_start && !is_space && !is_backspace))
|
!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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user