Commit 6a45d5b8 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Handle keypresses better when there is no completion. (#458298, Christian

2007-07-19  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkentry.c (gtk_entry_completion_key_press): Handle
        keypresses better when there is no completion.  (#458298,
        Christian Persch, patch by Xan Lopez)

        * gtk/gtkentrycompletion.c
        (gtk_entry_completion_insert_completion_text): Small cleanup.



svn path=/trunk/; revision=18505
parent e1926de8
2007-07-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Handle
keypresses better when there is no completion. (#458298,
Christian Persch, patch by Xan Lopez)
* gtk/gtkentrycompletion.c
(gtk_entry_completion_insert_completion_text): Small cleanup.
2007-07-19 Matthias Clasen <mclasen@redhat.com>
* gtk/gtksettings.c (apply_queued_setting): Merge color
......
......@@ -5893,9 +5893,17 @@ gtk_entry_completion_key_press (GtkWidget *widget,
event->keyval == GDK_Right ||
event->keyval == GDK_KP_Right)
{
GtkTreeSelection *sel;
GtkTreeIter iter;
GtkTreeModel *model = NULL;
_gtk_entry_reset_im_context (GTK_ENTRY (widget));
_gtk_entry_completion_popdown (completion);
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view));
if (!gtk_tree_selection_get_selected (sel, &model, &iter))
return FALSE;
if (completion->priv->inline_selection)
{
/* Escape rejects the tentative completion */
......
......@@ -1690,7 +1690,8 @@ gtk_entry_completion_insert_completion_text (GtkEntryCompletion *completion,
if (completion->priv->completion_prefix == NULL)
completion->priv->completion_prefix = g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->entry)));
gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
gtk_entry_set_text (GTK_ENTRY (priv->entry), text);
len = strlen (priv->completion_prefix);
gtk_editable_select_region (GTK_EDITABLE (priv->entry), len, -1);
......
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