Permalink
Browse files

Find when activating the find entry in the replace dialog

  • Loading branch information...
1 parent ee891e1 commit 680a556fffa5311d227f476e8e154d20da638414 @b4n b4n committed Jan 9, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/search.c
View
@@ -169,6 +169,9 @@ on_find_entry_activate_backward(GtkEntry *entry, gpointer user_data);
static void
on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data);
+static void
+on_replace_find_entry_activate(GtkEntry *entry, gpointer user_data);
+
static void
on_replace_entry_activate(GtkEntry *entry, gpointer user_data);
@@ -648,6 +651,8 @@ static void create_replace_dialog(void)
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_find)),
"key-press-event", G_CALLBACK(on_widget_key_pressed_set_focus),
gtk_bin_get_child(GTK_BIN(entry_replace)));
+ g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_find)), "activate",
+ G_CALLBACK(on_replace_find_entry_activate), NULL);
g_signal_connect(gtk_bin_get_child(GTK_BIN(entry_replace)), "activate",
G_CALLBACK(on_replace_entry_activate), NULL);
g_signal_connect(replace_dlg.dialog, "response",
@@ -1369,6 +1374,13 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data)
}
+static void
+on_replace_find_entry_activate(GtkEntry *entry, gpointer user_data)
+{
+ on_replace_dialog_response(NULL, GEANY_RESPONSE_FIND, NULL);
+}
+
+
static void
on_replace_entry_activate(GtkEntry *entry, gpointer user_data)
{

0 comments on commit 680a556

Please sign in to comment.