file chooser: Load a directory when leaving search

Ensure that some folder contents are shown in
the list when we leave search mode.

https://bugzilla.gnome.org/show_bug.cgi?id=743659
This commit is contained in:
Matthias Clasen 2015-01-28 18:15:19 -05:00
parent 696129d83c
commit 59c04d5184

View File

@ -2621,7 +2621,13 @@ gtk_file_chooser_widget_set_property (GObject *object,
if (g_value_get_boolean (value))
operation_mode_set (impl, OPERATION_MODE_SEARCH);
else
operation_mode_set (impl, OPERATION_MODE_BROWSE);
{
operation_mode_set (impl, OPERATION_MODE_BROWSE);
if (priv->current_folder)
change_folder_and_display_error (impl, priv->current_folder, FALSE);
else
switch_to_home_dir (impl);
}
break;
case GTK_FILE_CHOOSER_PROP_ACTION: