implement RFC 3196, 'When changing quicksearch Search Type, set focus to search input...
authorPaul <paul@claws-mail.org>
Tue, 3 Jun 2014 16:55:47 +0000 (17:55 +0100)
committerPaul <paul@claws-mail.org>
Tue, 3 Jun 2014 16:55:47 +0000 (17:55 +0100)
and simplify a bit

src/gtk/quicksearch.c

index 7f78f95a3ca87d8e9aa647e8fdef3764483fd35a..f10948b9ee507021879558ba07f558e20b29b213 100644 (file)
@@ -376,6 +376,7 @@ static gboolean searchtype_changed(GtkMenuItem *widget, gpointer data)
        quicksearch_set_popdown_strings(quicksearch);
 
        quicksearch_invoke_execute(quicksearch, FALSE);
+       gtk_widget_grab_focus(quicksearch->search_string_entry);
 
        return TRUE;
 }
@@ -852,8 +853,7 @@ void quicksearch_show(QuickSearch *quicksearch)
        GtkWidget *ctree = NULL;
        gtk_widget_show(quicksearch->hbox_search);
        update_extended_buttons(quicksearch);
-       gtk_widget_grab_focus(
-               GTK_WIDGET(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))));
+       gtk_widget_grab_focus(quicksearch->search_string_entry);
 
        if (!mainwin || !mainwin->summaryview) {
                return;