diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | daemon/gvfsbackendcomputer.c | 31 |
2 files changed, 40 insertions, 4 deletions
@@ -1,10 +1,19 @@ 2009-04-16 Alexander Larsson <alexl@redhat.com> + Bug 578574 – always show drive names in computer:// + + * daemon/gvfsbackendcomputer.c: + (recompute_files): + If mount has a drive, use its name as part of the display name. + Patch from David Zeuthen + +2009-04-16 Alexander Larsson <alexl@redhat.com> + Bug 523420 – gvfs-bash-completion.sh has a shebang and is executable - + * programs/Makefile.am: Don't install gvfs-bash-completion.sh as executable - + * programs/gvfs-bash-completion.sh: Remove shebang diff --git a/daemon/gvfsbackendcomputer.c b/daemon/gvfsbackendcomputer.c index aaec50b5..c0d355f5 100644 --- a/daemon/gvfsbackendcomputer.c +++ b/daemon/gvfsbackendcomputer.c @@ -310,6 +310,9 @@ recompute_files (GVfsBackendComputer *backend) char *basename, *filename; const char *extension; int uniq; + gchar *s; + gchar *display_name; + gchar *drive_name; volume_monitor = backend->volume_monitor; @@ -407,16 +410,40 @@ recompute_files (GVfsBackendComputer *backend) if (file->mount) { + if (file->drive != NULL) + { + drive_name = g_drive_get_name (file->drive); + s = g_mount_get_name (file->mount); + display_name = g_strdup_printf ("%s: %s", drive_name, s); + g_free (s); + g_free (drive_name); + } + else + { + display_name = g_mount_get_name (file->mount); + } file->icon = g_mount_get_icon (file->mount); - file->display_name = g_mount_get_name (file->mount); + file->display_name = display_name; file->root = g_mount_get_root (file->mount); file->can_unmount = g_mount_can_unmount (file->mount); file->can_eject = g_mount_can_eject (file->mount); } else if (file->volume) { + if (file->drive != NULL) + { + drive_name = g_drive_get_name (file->drive); + s = g_volume_get_name (file->volume); + display_name = g_strdup_printf ("%s: %s", drive_name, s); + g_free (s); + g_free (drive_name); + } + else + { + display_name = g_volume_get_name (file->volume); + } file->icon = g_volume_get_icon (file->volume); - file->display_name = g_volume_get_name (file->volume); + file->display_name = display_name; file->can_mount = g_volume_can_mount (file->volume); file->root = NULL; file->can_eject = g_volume_can_eject (file->volume); |