From 0ec598ff2d9795a9ab68165ae3a1c057a7eacb9d Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Tue, 23 Feb 2016 16:38:50 +0100 Subject: window-slot: avoid random switching of the view We were not initializing the view mode before search to the invalid id, which then was initialized as 0 that it's actually a view id. This was confusing the checks and making random changes of the view on the first time the location was changed. This was introduced as a regression when we introduced the separated search view mode, which also reworked all of the view id handling. --- src/nautilus-window-slot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index 92a88a23c..8b948edd7 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -703,6 +703,8 @@ nautilus_window_slot_init (NautilusWindowSlot *slot) nautilus_application_add_accelerator (app, "slot.files-view-mode(1)", "1"); nautilus_application_add_accelerator (app, "slot.files-view-mode(0)", "2"); nautilus_application_add_accelerator (app, "slot.search-visible", "f"); + + slot->details->view_mode_before_search = NAUTILUS_VIEW_INVALID_ID; } #define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW -- cgit v1.2.1