[gtk] filechooserwidget: Focus the searchbar when searching



commit aaae141687e133bba9df7fad5a73de7d2ad9e69c
Author: Timm Bäder <mail baedert org>
Date:   Fri Oct 18 07:43:21 2019 +0200

    filechooserwidget: Focus the searchbar when searching
    
    This code path is taken if the search is already active, so focus the
    search entry.

 gtk/gtkfilechooserwidget.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index c022c98a7a..aa5e456fc0 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -1437,6 +1437,8 @@ widget_key_press_cb (GtkEventControllerKey *controller,
       priv->starting_search = TRUE;
       if (gtk_event_controller_key_forward (controller, priv->search_entry))
         {
+          gtk_widget_grab_focus (priv->search_entry);
+
           if (priv->operation_mode != OPERATION_MODE_SEARCH &&
               priv->starting_search)
             operation_mode_set (impl, OPERATION_MODE_SEARCH);


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