[nautilus/wip/csoriano/zoomsv3: 3/3] window-slot: avoid random switching of the view



commit 59930d6349c4d3712da39fcb5aba680b0a9a1684
Author: Carlos Soriano <csoriano gnome org>
Date:   Tue Feb 23 16:38:50 2016 +0100

    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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 92a88a2..8b948ed 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)", "<control>1");
         nautilus_application_add_accelerator (app, "slot.files-view-mode(0)", "<control>2");
         nautilus_application_add_accelerator (app, "slot.search-visible", "<control>f");
+
+        slot->details->view_mode_before_search = NAUTILUS_VIEW_INVALID_ID;
 }
 
 #define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]