summaryrefslogtreecommitdiff
path: root/src/nautilus-window-slot-dnd.c
diff options
context:
space:
mode:
authorNelson Benitez Leon <nbenitezl@gmail.com>2013-08-05 15:38:32 +0200
committerNelson Benítez León <nbenitezl+gnome@gmail.com>2013-08-05 21:01:40 +0200
commit4618b96b4218e5ef7c29982029153cf7312c323f (patch)
tree8b939b038733565cfa3c9c86248f8c7e6cb854e9 /src/nautilus-window-slot-dnd.c
parent31059f33c85ba261056ee501b7c3fe627b8fb463 (diff)
downloadnautilus-4618b96b4218e5ef7c29982029153cf7312c323f.tar.gz
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>
Diffstat (limited to 'src/nautilus-window-slot-dnd.c')
-rw-r--r--src/nautilus-window-slot-dnd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index b9e6df82a..b4d0c822f 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);
}