*/
/** @file disobedience/search.c
* @brief Search support
- *
- * TODO:
- * - cleverer focus to implement typeahead find
*/
#include "disobedience.h"
#include "choose.h"
void choose_next_clicked(GtkButton attribute((unused)) *button,
gpointer attribute((unused)) userdata) {
+ gtk_widget_grab_focus(choose_view);
if(!choose_n_search_results)
return;
/* Find the last visible row */
void choose_prev_clicked(GtkButton attribute((unused)) *button,
gpointer attribute((unused)) userdata) {
+ gtk_widget_grab_focus(choose_view);
/* TODO can we de-dupe with choose_next_clicked? Probably yes. */
if(!choose_n_search_results)
return;
static void choose_clear_clicked(GtkButton attribute((unused)) *button,
gpointer attribute((unused)) userdata) {
gtk_entry_set_text(GTK_ENTRY(choose_search_entry), "");
+ gtk_widget_grab_focus(choose_view);
/* We start things off straight away in this case */
initiate_search();
}
}
/** @brief Called for key-*-event on the main view
- *
- * Switches focus to the
*/
static gboolean choose_key_event(GtkWidget attribute((unused)) *widget,
GdkEventKey *event,