From 51b4f03a2df8ea5b795e2dbafc2470be1a599d3c Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Sat, 24 Mar 2007 16:27:19 +0000 Subject: [PATCH] Don't beep when pressing escape to close the Find or Replace dialogs. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1421 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 2 ++ src/search.c | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 257c2c3c..eb46d241 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,8 @@ * src/keybindings.c: Ignore Caps Lock in keybindings_got_event() (could cause problems with e.g. Shift-F9). + * src/search.c: + Don't beep when pressing escape to close the Find or Replace dialogs. 2007-03-23 Nick Treleaven diff --git a/src/search.c b/src/search.c index b05be7ab..2c88925a 100644 --- a/src/search.c +++ b/src/search.c @@ -815,7 +815,7 @@ on_find_entry_activate(GtkEntry *entry, gpointer user_data) static void on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) { - if (response == GTK_RESPONSE_CANCEL) + if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) gtk_widget_hide(widgets.find_dialog); else { @@ -879,8 +879,6 @@ on_find_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) search_mark(idx, search_data.text, search_data.flags); break; } - - // Note: we can get GTK_RESPONSE_DELETE_EVENT responses when ESC is pressed } if (check_close) gtk_widget_hide(widgets.find_dialog); @@ -907,7 +905,7 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) gboolean close_window; gchar *find, *replace; - if (response == GTK_RESPONSE_CANCEL) + if (response == GTK_RESPONSE_CANCEL || response == GTK_RESPONSE_DELETE_EVENT) { gtk_widget_hide(widgets.replace_dialog); return; @@ -1007,7 +1005,6 @@ on_replace_dialog_response(GtkDialog *dialog, gint response, gpointer user_data) if (close_window) gtk_widget_hide(widgets.replace_dialog); break; } - // Note: we can get GTK_RESPONSE_DELETE_EVENT responses when ESC is pressed } g_free(find); g_free(replace);