[nautilus] Unwanted refresh when hovering over pathbar location



commit 4618b96b4218e5ef7c29982029153cf7312c323f
Author: Nelson Benitez Leon <nbenitezl gmail com>
Date:   Mon Aug 5 15:38:32 2013 +0200

    Unwanted refresh when hovering over pathbar location
    
    Don't call nautilus_window_slot_open_location if the location
    has already been loaded, as it causes an unwanted refresh.
    
    Fixes bug 705492
    
    Signed-off-by: Nelson Benítez León <nbenitezl+gnome gmail com>

 src/nautilus-window-slot-dnd.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index b9e6df8..b4d0c82 100644
--- a/src/nautilus-window-slot-dnd.c
+++ b/src/nautilus-window-slot-dnd.c
@@ -79,6 +79,7 @@ static void
 switch_location (NautilusDragSlotProxyInfo *drag_info)
 {
   GFile *location;
+  GFile *current_location;
   NautilusWindowSlot *target_slot;
   GtkWidget *window;
 
@@ -91,8 +92,11 @@ switch_location (NautilusDragSlotProxyInfo *drag_info)
 
   target_slot = nautilus_window_get_active_slot (NAUTILUS_WINDOW (window));
 
+  current_location = nautilus_window_slot_get_location (target_slot);
   location = nautilus_file_get_location (drag_info->target_file);
-  nautilus_window_slot_open_location (target_slot, location, 0);
+  if (! (current_location != NULL && g_file_equal (location, current_location))) {
+       nautilus_window_slot_open_location (target_slot, location, 0);
+  }
   g_object_unref (location);
 }
 


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