filechooser: Only do search_start_query() while we are in search mode

This signal can be emitted by GtkSearchEntry after search has been
cancelled, and other operation mode is set. It doesn't make sense to
populate the search model in that state anymore, so just avoid doing it.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
This commit is contained in:
Carlos Garnacho 2015-03-03 17:43:14 +01:00
parent b2f3b67494
commit 5751d4f66e

View File

@ -6304,6 +6304,9 @@ search_entry_activate_cb (GtkFileChooserWidget *impl)
GtkFileChooserWidgetPrivate *priv = impl->priv;
const char *text;
if (priv->operation_mode != OPERATION_MODE_SEARCH)
return;
text = gtk_entry_get_text (GTK_ENTRY (priv->search_entry));
/* reset any existing query object */