glib r6582 - trunk/gio
- From: alexl svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6582 - trunk/gio
- Date: Mon, 25 Feb 2008 11:15:06 +0000 (GMT)
Author: alexl
Date: Mon Feb 25 11:15:06 2008
New Revision: 6582
URL: http://svn.gnome.org/viewvc/glib?rev=6582&view=rev
Log:
2008-02-25 Alexander Larsson <alexl redhat com>
* gunixmounts.c:
(g_unix_mount_guess_should_display):
Remove type guessing, instead just display
mounts in /media and in ~/.
Modified:
trunk/gio/ChangeLog
trunk/gio/gunixmounts.c
Modified: trunk/gio/gunixmounts.c
==============================================================================
--- trunk/gio/gunixmounts.c (original)
+++ trunk/gio/gunixmounts.c Mon Feb 25 11:15:06 2008
@@ -1866,25 +1866,27 @@
g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry)
{
GUnixMountType guessed_type;
+ const char *mount_path;
/* Never display internal mountpoints */
if (g_unix_mount_is_system_internal (mount_entry))
return FALSE;
-
- /* Only display things that look "removable" or
- things in /media (which are generally user mountable) */
- guessed_type = g_unix_mount_guess_type (mount_entry);
- if (guessed_type == G_UNIX_MOUNT_TYPE_IPOD ||
- guessed_type == G_UNIX_MOUNT_TYPE_CDROM ||
- guessed_type == G_UNIX_MOUNT_TYPE_FLOPPY ||
- guessed_type == G_UNIX_MOUNT_TYPE_ZIP ||
- guessed_type == G_UNIX_MOUNT_TYPE_JAZ ||
- guessed_type == G_UNIX_MOUNT_TYPE_CAMERA ||
- guessed_type == G_UNIX_MOUNT_TYPE_MEMSTICK ||
- (mount_entry->mount_path != NULL &&
- g_str_has_prefix (mount_entry->mount_path, "/media")))
- return TRUE;
-
+
+ /* Only display things in /media (which are generally user mountable)
+ and home dir (fuse stuff) */
+ mount_path = mount_entry->mount_path;
+ if (mount_path != NULL)
+ {
+ if (strstr (mount_path, "/.gvfs") != NULL)
+ return TRUE;
+
+ if (g_str_has_prefix (mount_path, "/media/"))
+ return TRUE;
+
+ if (g_str_has_prefix (mount_path, g_get_home_dir ()))
+ return TRUE;
+ }
+
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]