allow clicking enter for scrollback search

This commit is contained in:
Daniel Micay 2012-05-22 03:18:29 -04:00
parent 787cc82f2c
commit 94ce0a8316
1 changed files with 4 additions and 1 deletions

5
term.c
View File

@ -29,11 +29,14 @@ static void open_search_dialog(GtkWidget *vte) {
GTK_WINDOW(gtk_widget_get_toplevel(vte)), GTK_WINDOW(gtk_widget_get_toplevel(vte)),
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK, GTK_STOCK_OK,
GTK_RESPONSE_NONE, GTK_RESPONSE_ACCEPT,
NULL); NULL);
content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
g_signal_connect(dialog, "response", G_CALLBACK(search_response_cb), info); g_signal_connect(dialog, "response", G_CALLBACK(search_response_cb), info);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_ACCEPT);
gtk_entry_set_activates_default(GTK_ENTRY(info->entry), TRUE);
gtk_container_add(GTK_CONTAINER(content_area), info->entry); gtk_container_add(GTK_CONTAINER(content_area), info->entry);
gtk_widget_show_all(dialog); gtk_widget_show_all(dialog);
gtk_widget_grab_focus(GTK_WIDGET(info->entry)); gtk_widget_grab_focus(GTK_WIDGET(info->entry));