summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2007-10-09 09:41:00 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-10-09 09:41:00 +0000
commit026a6499e6923818d89eb821a81f8bd11bb68e15 (patch)
tree4a91fe73e94fa46bf1a1f3b86d404d190b15c9ee /daemon
parent6f6ab7302de0257589be2e6c3c9b93a581694a88 (diff)
downloadgvfs-026a6499e6923818d89eb821a81f8bd11bb68e15.tar.gz
Pull in gio-unix-2.0
2007-10-09 Alexander Larsson <alexl@redhat.com> * configure.ac: Pull in gio-unix-2.0 * daemon/gvfsbackendtrash.c: Use GUnixMounts instead of volume monitor This shows *all* mounts and avoids unnecessary stuff svn path=/trunk/; revision=972
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gvfsbackendtrash.c45
1 files changed, 13 insertions, 32 deletions
diff --git a/daemon/gvfsbackendtrash.c b/daemon/gvfsbackendtrash.c
index 9636a472..ebddb365 100644
--- a/daemon/gvfsbackendtrash.c
+++ b/daemon/gvfsbackendtrash.c
@@ -13,8 +13,8 @@
#include <glib/gi18n.h>
#include <gio/gioerror.h>
#include <gio/gfile.h>
-#include <gio/gvolumemonitor.h>
#include <gio/gthemedicon.h>
+#include <gio/gunixmounts.h>
#include "gvfsuriutils.h"
@@ -580,12 +580,10 @@ static void
enumerate_root (GVfsBackend *backend,
GVfsJobEnumerate *job)
{
- GVolumeMonitor *monitor;
- GList *volumes, *l;
- GVolume *volume;
- GFile *topdir_file;
- char *topdir;
+ GList *mounts, *l;
+ const char *topdir;
char *home_trash;
+ GUnixMount *mount;
/* Always succeeds */
g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -594,35 +592,18 @@ enumerate_root (GVfsBackend *backend,
enumerate_root_trashdir (backend, job, g_get_user_data_dir (), home_trash);
g_free (home_trash);
- monitor = g_volume_monitor_get ();
-
-
- volumes = g_volume_monitor_get_mounted_volumes (monitor);
-
- for (l = volumes; l != NULL; l = l->next)
+ mounts = g_get_unix_mounts ();
+ for (l = mounts; l != NULL; l = l->next)
{
- volume = l->data;
-
- topdir_file = g_volume_get_root (volume);
- if (topdir_file)
- {
- if (g_file_is_native (topdir_file))
- {
- topdir = g_file_get_path (topdir_file);
-
- if (topdir)
- enumerate_root_topdir (backend, job, topdir);
-
- g_free (topdir);
- }
-
- g_object_unref (topdir_file);
- }
+ mount = l->data;
+
+ topdir = g_unix_mount_get_mount_path (mount);
+ if (topdir)
+ enumerate_root_topdir (backend, job, topdir);
- g_object_unref (volume);
+ g_unix_mount_free (mount);
}
- g_list_free (volumes);
-
+ g_list_free (mounts);
g_vfs_job_enumerate_done (job);
}