summaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
authorChristian Kellner <gicmo@gnome.org>2009-10-09 17:07:46 +0200
committerAlexander Larsson <alexl@redhat.com>2009-11-26 16:28:26 +0100
commit6ad0cb9175acc635057232fec96d32eaad4e0237 (patch)
treead86e457ec7f60c2da98bf837a31b0b7e7a6ec9f /programs
parentf2f50e72569406cfd974dcef6f293ebff3378f61 (diff)
downloadgvfs-6ad0cb9175acc635057232fec96d32eaad4e0237.tar.gz
Add "default location" support for mounts
The "default location" of the given mount is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume). Backends can use g_vfs_backend_set_default_location () to set the default location (before registering the mount). https://bugzilla.gnome.org/show_bug.cgi?id=561998
Diffstat (limited to 'programs')
-rw-r--r--programs/gvfs-mount.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c
index 9ec68a5c..27c78e7d 100644
--- a/programs/gvfs-mount.c
+++ b/programs/gvfs-mount.c
@@ -359,7 +359,7 @@ list_mounts (GList *mounts,
GMount *mount;
GVolume *volume;
char *name, *uuid, *uri;
- GFile *root;
+ GFile *root, *default_location;
GIcon *icon;
char **x_content_types;
char *type_name;
@@ -394,6 +394,15 @@ list_mounts (GList *mounts,
if (uuid)
g_print ("%*suuid=%s\n", indent + 2, "", uuid);
+ default_location = g_mount_get_default_location (mount);
+ if (default_location)
+ {
+ char *loc_uri = g_file_get_uri (default_location);
+ g_print ("%*sdefault_location=%s\n", indent + 2, "", loc_uri);
+ g_free (loc_uri);
+ g_object_unref (default_location);
+ }
+
icon = g_mount_get_icon (mount);
if (icon)
{