[PATCH] Bug 703233 - When you drag a file in nautilus, it updates page

"nbenitezl ." <[email protected]>
Newsgroups gmane.comp.gnome.nautilus
Message-ID <CAAUd642wxUq8-3uWroMpN3qkeniJb883tg9osNcvc_1RkuFuWA@mail.gmail.com>
Hi,
I've attached a patch for http://bugs.gnome.org/703233 The bug is about a
disturbing refresh when you start a drag, please visit the bug link for
more info.

Patch also attached to this mail.

Regards,

-- 
nautilus-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/nautilus-list
0001-Bug-703233-When-you-drag-a-file-in-nautilus-it-updat.patch (application/octet-stream, 1.2 KB)
From 9ccc5e95bffd8e7acab362e65c17f84d6969f3f9 Mon Sep 17 00:00:00 2001
From: Nelson Benitez Leon <[email protected]>
Date: Mon, 29 Jul 2013 10:49:08 +0200
Subject: [PATCH] Bug 703233 - When you drag a file in nautilus, it updates
 page

Don't call nautilus_window_slot_open_location for the current
location, as it's already opened and causes an unwanted refresh.

Bug was introduced in commit 0d635bda
---
 src/nautilus-view-dnd.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/nautilus-view-dnd.c b/src/nautilus-view-dnd.c
index fbae954..b80904f 100644
--- a/src/nautilus-view-dnd.c
+++ b/src/nautilus-view-dnd.c
@@ -520,10 +520,15 @@ nautilus_view_handle_hover (NautilusView *view,
 {
 	NautilusWindowSlot *slot;
 	GFile *location;
+	GFile *current_location;
 
 	slot = nautilus_view_get_nautilus_window_slot (view);
 
 	location = g_file_new_for_uri (target_uri);
-	nautilus_window_slot_open_location (slot, location, 0);
+	current_location = nautilus_window_slot_get_location (slot);
+	if (! g_file_equal(location, current_location)) {
+		nautilus_window_slot_open_location (slot, location, 0);
+	}
 	g_object_unref (location);
+	g_object_unref (current_location);
 }
-- 
1.8.2.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.