summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Streltsov <[email protected]>2019-08-09 00:02:11 +0300
committerPablo Barciela <[email protected]>2019-08-09 14:27:31 +0200
commitbba4c05a3276bdf6c2cf1a3989106a2793fb7642 (patch)
tree4bea927bd22a86c3f7a34f92d6c7fdebb3b8a8ac /src
parenta42ba3c50a7536dc80f109b579220279e95fd9c3 (diff)
downloadcaja-bba4c05a3276bdf6c2cf1a3989106a2793fb7642.tar.bz2
caja-bba4c05a3276bdf6c2cf1a3989106a2793fb7642.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
Diffstat (limited to 'src')
-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 cf06f8d1..7535861c 100644
--- a/src/caja-window-manage-views.c
+++ b/src/caja-window-manage-views.c
@@ -1251,7 +1251,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,