[nautilus] window-slot: remove "use default location"



commit 70fbae08fee1beee9ae4a352b05fe041610173b7
Author: Carlos Soriano <csoriano gnome org>
Date:   Wed Sep 2 17:56:07 2015 +0200

    window-slot: remove "use default location"
    
    There was a flag to use default location of the mount, but
    we were actually never using it.
    It was used to opening the connect to server dialog, which is
    droped by now.

 src/nautilus-window-slot.c |   34 +---------------------------------
 src/nautilus-window.h      |    3 +--
 2 files changed, 2 insertions(+), 35 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 6bed02c..6232b59 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -120,7 +120,6 @@ struct NautilusWindowSlotDetails {
        guint location_change_distance;
        char *pending_scroll_to;
        GList *pending_selection;
-       gboolean pending_use_default_location;
        NautilusFile *determine_view_file;
        GCancellable *mount_cancellable;
        GError *mount_error;
@@ -747,7 +746,6 @@ nautilus_window_slot_open_location_full (NautilusWindowSlot      *slot,
             nautilus_file_selection_equal (old_selection, new_selection))
           goto done;
 
-       slot->details->pending_use_default_location = ((flags & 
NAUTILUS_WINDOW_OPEN_FLAG_USE_DEFAULT_LOCATION) != 0);
        begin_location_change (slot, location, old_location, new_selection,
                               NAUTILUS_LOCATION_CHANGE_STANDARD, 0, NULL);
 
@@ -1153,11 +1151,10 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
        NautilusWindowSlot *slot;
        NautilusFile *viewed_file, *parent_file;
         NautilusView *view;
-       GFile *location, *default_location;
+       GFile *location;
        GMountOperation *mount_op;
        MountNotMountedData *data;
        NautilusApplication *app;
-       GMount *mount;
 
        slot = callback_data;
        window = nautilus_window_slot_get_window (slot);
@@ -1192,35 +1189,6 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
                goto done;
        }
 
-       mount = NULL;
-       default_location = NULL;
-
-       if (slot->details->pending_use_default_location) {
-               mount = nautilus_file_get_mount (file);
-               slot->details->pending_use_default_location = FALSE;
-       }
-
-       if (mount != NULL) {
-               default_location = g_mount_get_default_location (mount);
-               g_object_unref (mount);
-       }
-
-       if (default_location != NULL &&
-           !g_file_equal (slot->details->pending_location, default_location)) {
-               g_clear_object (&slot->details->pending_location);
-               slot->details->pending_location = default_location;
-               slot->details->determine_view_file = nautilus_file_get (default_location);
-
-               nautilus_file_invalidate_all_attributes (slot->details->determine_view_file);
-               nautilus_file_call_when_ready (slot->details->determine_view_file,
-                                              NAUTILUS_FILE_ATTRIBUTE_INFO |
-                                              NAUTILUS_FILE_ATTRIBUTE_MOUNT,
-                                              got_file_info_for_view_selection_callback,
-                                              slot);
-
-               goto done;
-       }
-
        parent_file = nautilus_file_get_parent (file);
        if ((parent_file != NULL) &&
            nautilus_file_get_file_type (file) == G_FILE_TYPE_REGULAR) {
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index 4caa55d..d9b0b24 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -42,8 +42,7 @@ typedef enum {
         NAUTILUS_WINDOW_OPEN_FLAG_NEW_WINDOW = 1 << 1,
         NAUTILUS_WINDOW_OPEN_FLAG_NEW_TAB = 1 << 2,
         NAUTILUS_WINDOW_OPEN_SLOT_APPEND = 1 << 3,
-        NAUTILUS_WINDOW_OPEN_FLAG_USE_DEFAULT_LOCATION = 1 << 4,
-        NAUTILUS_WINDOW_OPEN_FLAG_DONT_MAKE_ACTIVE = 1 << 5
+        NAUTILUS_WINDOW_OPEN_FLAG_DONT_MAKE_ACTIVE = 1 << 4
 } NautilusWindowOpenFlags;
 
 typedef gboolean (* NautilusWindowGoToCallback) (NautilusWindow *window,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]