[nautilus: 26/47] view: make nautilus_view_load_location() consistent with its name
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus: 26/47] view: make nautilus_view_load_location() consistent with its name
- Date: Tue, 11 Jan 2011 16:02:51 +0000 (UTC)
commit be2d9bba9864f2834a57b608d47140f1e20eca66
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 29 18:55:49 2010 +0100
view: make nautilus_view_load_location() consistent with its name
src/nautilus-view.c | 10 +++++++---
src/nautilus-view.h | 2 +-
src/nautilus-window-manage-views.c | 9 ++-------
3 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index a15e721..18e63e7 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -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);
}
diff --git a/src/nautilus-view.h b/src/nautilus-view.h
index 9b65cb9..d155c51 100644
--- a/src/nautilus-view.h
+++ b/src/nautilus-view.h
@@ -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);
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index fa5b0ef..2b27e29 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]