diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-18 15:23:02 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-20 17:38:35 -0300 |
commit | 404f1492dbe03b407abd4ca0c2b743f7810f4b3e (patch) | |
tree | babcbe37fa37648d8731acd20a19e0967ebe8cc9 /libnautilus-private/nautilus-file.c | |
parent | abef8cac2f1df4b808fcb66b35877b75b54774e4 (diff) | |
download | nautilus-404f1492dbe03b407abd4ca0c2b743f7810f4b3e.tar.gz |
places-view: implement a view for Other Locations
GtkFileChooser received a Other Locations view that lists
persistent devices, as well as networks and the root location
for the computer's hard drive.
Since Nautilus is a file management tool too, it should keep
consistency between Gtk+ file chooser, something that doesn't
happen since it doesn't display Other Locations.
To fix that, add NautilusPlacesView, a NautilusView implementation
that displays the GtkPlacesView widget. In order to implement that,
update window-slot to correctly display the places-view whenever
Other Locations is clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=753871
Diffstat (limited to 'libnautilus-private/nautilus-file.c')
-rw-r--r-- | libnautilus-private/nautilus-file.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c index e12e03f80..a7c0e609f 100644 --- a/libnautilus-private/nautilus-file.c +++ b/libnautilus-private/nautilus-file.c @@ -7015,6 +7015,31 @@ nautilus_file_is_in_network (NautilusFile *file) return nautilus_directory_is_in_network (file->details->directory); } +/** + * nautilus_file_is_other_locations + * + * Check if this file is Other Locations. + * @file: NautilusFile representing the file in question. + * + * Returns: TRUE if @file is Other Locations. + * + **/ +gboolean +nautilus_file_is_other_locations (NautilusFile *file) +{ + gboolean is_other_locations; + gchar *uri; + + g_assert (NAUTILUS_IS_FILE (file)); + + uri = nautilus_file_get_uri (file); + is_other_locations = g_strcmp0 (uri, "other-locations:///") == 0; + + g_free (uri); + + return is_other_locations; +} + GError * nautilus_file_get_file_info_error (NautilusFile *file) { |