You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gnome-commander/gnome-commander-1.4.5-GNOME...

40 lines
1.7 KiB

From 7fdf3251a44ba6a829d9ab02302751f4973fa5b3 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Thu, 7 May 2015 14:55:29 +0900
Subject: [PATCH] update_search_status_widgets: reset response enum when
searching is done
https://bugzilla.gnome.org/show_bug.cgi?id=748869
On GnomeCmdSearchDialog::Private::on_dialog_response,
default response was set to GCMD_RESPONSE_STOP and
the sensitiveness to GCMD_RESPONSE_FIND was set to false.
Now when searching is done, on update_search_status_widgets
now the sensitiveness to GCMD_RESPONSE_STOP was also
set to false, while the default response was still set
to GCMD_RESPONSE_STOP, which seems to be causing infinite
loop issue when searching is executed (when "Enter" key is pressed).
So reset the default response to match the current
response sensitiveness.
---
src/dialogs/gnome-cmd-search-dialog.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc
index 8bd48da..7597dcd 100644
--- a/src/dialogs/gnome-cmd-search-dialog.cc
+++ b/src/dialogs/gnome-cmd-search-dialog.cc
@@ -532,6 +532,7 @@ static gboolean update_search_status_widgets (SearchData *data)
gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_GOTO, matches>0);
gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_STOP, FALSE);
gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_FIND, TRUE);
+ gtk_dialog_set_default_response (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_FIND);
if (matches)
gtk_widget_grab_focus (*data->dialog->priv->result_list); // set focus to result list
--
2.4.0