[gnome-logs/wip/empty-listbox: 1/2] Avoid overwriting the first typeahead find letter



commit e3683c5bab72e670a8cb0f0d3e9b200fd0cda499
Author: David King <davidk gnome org>
Date:   Fri Oct 25 14:23:37 2013 +0100

    Avoid overwriting the first typeahead find letter
    
    Grabbing the focus of the search entry caused the whole contents of the
    entry to be selected. As this was done when entering a character to
    bring up the search entry, it was easy to type a whole word, overwriting
    the first (selected) character.
    
    Fix the problem by setting the cursor position to the end of the search
    entry immediately after grabbing focus.

 src/gl-window.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/gl-window.c b/src/gl-window.c
index f7378f1..e9e4351 100644
--- a/src/gl-window.c
+++ b/src/gl-window.c
@@ -182,6 +182,7 @@ on_search (GSimpleAction *action,
     if (state)
     {
         gtk_widget_grab_focus (priv->search_entry);
+        gtk_editable_set_position (GTK_EDITABLE (priv->search_entry), -1);
     }
     else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]