[PATCH] Bug 705492 - Unwanted refresh when hovering over pathbar location

"nbenitezl ." <[email protected]>
Newsgroups gmane.comp.gnome.nautilus
Message-ID <CAAUd6436xthr-N8tpkrJQEbgpjY4VqmsNnjY++6NSOrJfhx_iA@mail.gmail.com>
Hi,
I've attached a patch for http://bugs.gnome.org/705492

This is a very similar bug to the one I submitted a fix for, in the past
week, but this is is about when hovering over the pathbar buttons. You can
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-Unwanted-refresh-when-hovering-over-pathbar-location.patch (application/octet-stream, 1.4 KB)
From 7318cab1de775e84cd039d882edcae07c894d142 Mon Sep 17 00:00:00 2001
From: Nelson Benitez Leon <[email protected]>
Date: Mon, 5 Aug 2013 15:38:32 +0200
Subject: [PATCH] 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 Benitez Leon <[email protected]>
---
 src/nautilus-window-slot-dnd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/nautilus-window-slot-dnd.c b/src/nautilus-window-slot-dnd.c
index b9e6df8..b956239 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);
 }
 
-- 
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.