Commit be2d9bba authored by Cosimo Cecchi's avatar Cosimo Cecchi

view: make nautilus_view_load_location() consistent with its name

parent 69c2c9f8
......@@ -3002,20 +3002,24 @@ fm_directory_view_get_allow_moves (FMDirectoryView *view)
void
nautilus_view_load_location (NautilusView *nautilus_view,
const char *location)
GFile *location)
{
NautilusDirectory *directory;
FMDirectoryView *directory_view;
gchar *uri;
directory_view = FM_DIRECTORY_VIEW (nautilus_view);
uri = g_file_get_uri (location);
if (eel_uri_is_search (location)) {
if (eel_uri_is_search (uri)) {
directory_view->details->allow_moves = FALSE;
} else {
directory_view->details->allow_moves = TRUE;
}
directory = nautilus_directory_get_by_uri (location);
g_free (uri);
directory = nautilus_directory_get (location);
load_directory (directory_view, directory);
nautilus_directory_unref (directory);
}
......
......@@ -429,7 +429,7 @@ void nautilus_view_set_selection (NautilusView *v
void nautilus_view_load_location (NautilusView *view,
const char *location_uri);
GFile *location);
void nautilus_view_stop_loading (NautilusView *view);
char * nautilus_view_get_first_visible_file (NautilusView *view);
......
......@@ -1213,7 +1213,6 @@ load_new_location (NautilusWindowSlot *slot,
NautilusWindow *window;
GList *selection_copy;
NautilusView *view;
char *uri;
g_assert (slot != NULL);
g_assert (location != NULL);
......@@ -1228,18 +1227,14 @@ load_new_location (NautilusWindowSlot *slot,
/* Note, these may recurse into report_load_underway */
if (slot->content_view != NULL && tell_current_content_view) {
view = slot->content_view;
uri = g_file_get_uri (location);
nautilus_view_load_location (slot->content_view, uri);
g_free (uri);
nautilus_view_load_location (slot->content_view, location);
}
if (slot->new_content_view != NULL && tell_new_content_view &&
(!tell_current_content_view ||
slot->new_content_view != slot->content_view) ) {
view = slot->new_content_view;
uri = g_file_get_uri (location);
nautilus_view_load_location (slot->new_content_view, uri);
g_free (uri);
nautilus_view_load_location (slot->new_content_view, location);
}
if (view != NULL) {
/* slot->new_content_view might have changed here if
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment