[nautilus/gnome-3-2] window-slot: don't go through the back list when checking a mount
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-2] window-slot: don't go through the back list when checking a mount
- Date: Mon, 17 Oct 2011 21:11:57 +0000 (UTC)
commit 02262cf95bf135f7091fb7f1ca66125a350fce49
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Sep 28 21:02:38 2011 -0400
window-slot: don't go through the back list when checking a mount
There's no reason the slot shouldn't be closed if one of the locations
in the back history belongs to the mount (what we should do is cleaning
up that location from the history, which we don't yet).
src/nautilus-window-slot.c | 30 ++++--------------------------
1 files changed, 4 insertions(+), 26 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 9b11ca0..b47071a 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -742,9 +742,7 @@ gboolean
nautilus_window_slot_should_close_with_mount (NautilusWindowSlot *slot,
GMount *mount)
{
- NautilusBookmark *bookmark;
- GFile *mount_location, *bookmark_location;
- GList *l;
+ GFile *mount_location;
gboolean close_with_mount;
if (slot->pane->window->details->initiated_unmount) {
@@ -752,29 +750,9 @@ nautilus_window_slot_should_close_with_mount (NautilusWindowSlot *slot,
}
mount_location = g_mount_get_root (mount);
-
- close_with_mount = TRUE;
-
- for (l = slot->back_list; l != NULL; l = l->next) {
- bookmark = NAUTILUS_BOOKMARK (l->data);
-
- bookmark_location = nautilus_bookmark_get_location (bookmark);
- close_with_mount &= g_file_has_prefix (bookmark_location, mount_location) ||
- g_file_equal (bookmark_location, mount_location);
- g_object_unref (bookmark_location);
-
- if (!close_with_mount) {
- break;
- }
- }
-
- close_with_mount &= g_file_has_prefix (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location) ||
- g_file_equal (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location);
-
- /* we could also consider the forward list here, but since the âgo homeâ request
- * in nautilus-window-manager-views.c:mount_removed_callback() would discard those
- * anyway, we don't consider them.
- */
+ close_with_mount =
+ g_file_has_prefix (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location) ||
+ g_file_equal (NAUTILUS_WINDOW_SLOT (slot)->location, mount_location);
g_object_unref (mount_location);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]