aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2016-10-20 18:31:27 -0400
committerSteven Rostedt <rostedt@goodmis.org>2016-10-20 18:31:27 -0400
commite1175ca83080bb992bfb93ec0467cb040565931e (patch)
tree8336c1da77873f7c5d7bafcef8f66ddc6bd4f55e
parent5670dbf636d1d37842a69e884dfef5f2519a2384 (diff)
downloadtrace-cmd-e1175ca83080bb992bfb93ec0467cb040565931e.tar.gz
trace-view: Place focus back into search box after search
When searching the tree rows, after an item is found, it would be nice to repeat the search with a keyboard instead of having to move the mouse back to the entry and selecting again. Instead, have the focus come back to the search entry box and allow the search to happen again with just hitting "enter". Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--trace-view.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trace-view.c b/trace-view.c
index 3b95529d..2a5b1ad5 100644
--- a/trace-view.c
+++ b/trace-view.c
@@ -864,6 +864,8 @@ static void search_tree(gpointer data)
path = gtk_tree_model_get_path(model, &iter);
select_row_from_path(info->treeview, path);
gtk_tree_path_free(path);
+
+ gtk_widget_grab_focus(GTK_WIDGET(info->entry));
}
void trace_view_search_setup(GtkBox *box, GtkTreeView *treeview)