diff options
author | David Zeuthen <davidz@redhat.com> | 2008-07-29 18:27:21 +0000 |
---|---|---|
committer | David Zeuthen <davidz@src.gnome.org> | 2008-07-29 18:27:21 +0000 |
commit | 9510e8d3d62df724d1a223a97cb4fd256fbcb735 (patch) | |
tree | cbc514ade6498048698b27b9ca4dc0b627990e67 /programs | |
parent | 55c35a750f678ed7f3f413d5c1058cf76f2881bb (diff) | |
download | gvfs-9510e8d3d62df724d1a223a97cb4fd256fbcb735.tar.gz |
Add x-content/* support to daemon mounts. Right now a backend can only set
2008-07-29 David Zeuthen <davidz@redhat.com>
* client/gdaemonmount.c:
* common/gmounttracker.c:
* common/gmounttracker.h:
* daemon/gvfsbackend.c:
* daemon/gvfsbackend.h:
* daemon/gvfsbackendcdda.c:
* daemon/gvfsbackendgphoto2.c:
* daemon/mount.c:
Add x-content/* support to daemon mounts. Right now a backend
can only set the x-content/* type ahead of time. We might want
to add support dynamically obtaining it too (e.g. support
force_rescan).
* monitor/hal/ghalmount.c:
* monitor/hal/ghalvolume.c:
* monitor/hal/ghalvolumemonitor.c:
* monitor/hal/hal-utils.c:
* monitor/hal/hal-utils.h:
Add x-content/* support to the HAL volume monitor.
* monitor/proxy/gproxymount.c:
* monitor/proxy/gproxymount.h:
* monitor/proxy/gproxyvolumemonitor.c:
* monitor/proxy/gproxyvolumemonitor.h:
* monitor/proxy/gvfsproxyvolumemonitordaemon.c:
Add x-content/* support to proxy volume monitor. Also fix
a number of bugs the initial implementation had.
* programs/gvfs-mount.c:
Print out x-content-types.
svn path=/trunk/; revision=1845
Diffstat (limited to 'programs')
-rw-r--r-- | programs/gvfs-mount.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c index ec767f8d..b2659a29 100644 --- a/programs/gvfs-mount.c +++ b/programs/gvfs-mount.c @@ -1,3 +1,4 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ /* GIO - GLib Input, Output and Streaming Library * * Copyright (C) 2006-2007 Red Hat, Inc. @@ -303,6 +304,7 @@ list_mounts (GList *mounts, char *name, *uuid, *uri; GFile *root; GIcon *icon; + char **x_content_types; for (c = 0, l = mounts; l != NULL; l = l->next, c++) { @@ -330,14 +332,25 @@ list_mounts (GList *mounts, if (uuid) g_print ("%*suuid=%s\n", indent + 2, "", uuid); - icon = g_mount_get_icon (mount); - if (icon) - { - if (G_IS_THEMED_ICON (icon)) - show_themed_icon_names (G_THEMED_ICON (icon), indent + 2); + icon = g_mount_get_icon (mount); + if (icon) + { + if (G_IS_THEMED_ICON (icon)) + show_themed_icon_names (G_THEMED_ICON (icon), indent + 2); + + g_object_unref (icon); + } - g_object_unref (icon); - } + x_content_types = g_mount_guess_content_type_sync (mount, FALSE, NULL, NULL); + if (x_content_types != NULL && g_strv_length (x_content_types) > 0) + { + int n; + g_print ("%*sx_content_types:", indent + 2, ""); + for (n = 0; x_content_types[n] != NULL; n++) + g_print (" %s", x_content_types[n]); + g_print ("\n"); + } + g_strfreev (x_content_types); g_print ("%*scan_unmount=%d\n", indent + 2, "", g_mount_can_unmount (mount)); g_print ("%*scan_eject=%d\n", indent + 2, "", g_mount_can_eject (mount)); |