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

"nbenitezl ." <[email protected]>
Newsgroups gmane.comp.gnome.nautilus
Message-ID <CAAUd641i-NXP0KPJJ3QcfKJraYe5oOE3abAmebg+4NMyBKWFxw@mail.gmail.com>
The patch had some issue, I've posted a new patch in the bugzilla page and
also attached to this email.


Regards,


2013/7/29 nbenitezl . <[email protected]>

> 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 aeed16f2a1d493092927db8c4478374a41732dc0 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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nautilus-view-dnd.c b/src/nautilus-view-dnd.c
index fbae954..6700765 100644
--- a/src/nautilus-view-dnd.c
+++ b/src/nautilus-view-dnd.c
@@ -520,10 +520,14 @@ 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 (! (current_location != NULL && g_file_equal(location, current_location))) {
+		nautilus_window_slot_open_location (slot, location, 0);
+	}
 	g_object_unref (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.