summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Streltsov <[email protected]>2019-08-09 00:02:11 +0300
committerraveit65 <[email protected]>2019-08-09 09:39:04 +0200
commit27ca0ac7e6b73b1c633674d119f03a8e19dcd3fd (patch)
tree8c3d0ffc43c0d155de77ac72a4751956b63065a1
parentdd4a31a1eb6fdd0fd4c22276de864d83c98830a2 (diff)
downloadcaja-27ca0ac7e6b73b1c633674d119f03a8e19dcd3fd.tar.bz2
caja-27ca0ac7e6b73b1c633674d119f03a8e19dcd3fd.tar.xz
Use the same view settings for search results as the folder being searched
Fix issue https://github.com/mate-desktop/caja/issues/704
-rw-r--r--src/caja-window-manage-views.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/caja-window-manage-views.c b/src/caja-window-manage-views.c
index 40cf9ae8..caaa858b 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -1266,7 +1266,20 @@ got_file_info_for_view_selection_callback (CajaFile *file,
/* Otherwise, use default */
if (view_id == NULL)
{
- view_id = caja_global_preferences_get_default_folder_viewer_preference_as_iid ();
+ char *uri;
+ uri = caja_file_get_uri (file);
+
+ /* Use same view settings for search results as the current folder */
+ if (eel_uri_is_search (uri))
+ {
+ view_id = g_strdup (caja_view_get_view_id (slot->content_view));
+ }
+ else
+ {
+ view_id = caja_global_preferences_get_default_folder_viewer_preference_as_iid ();
+ }
+
+ g_free (uri);
if (view_id != NULL &&
!caja_view_factory_view_supports_uri (view_id,