info: Update from gnome-settings-daemon
This commit is contained in:
parent
9c56a95358
commit
3d063ebaf7
2 changed files with 20 additions and 0 deletions
|
@ -103,3 +103,22 @@ gsd_should_ignore_unix_mount (GUnixMountEntry *mount)
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
gsd_is_removable_mount (GUnixMountEntry *mount)
|
||||||
|
{
|
||||||
|
const char *mount_path;
|
||||||
|
char *path;
|
||||||
|
|
||||||
|
mount_path = g_unix_mount_get_mount_path (mount);
|
||||||
|
if (mount_path == NULL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
path = g_strdup_printf ("/run/media/%s", g_get_user_name ());
|
||||||
|
if (g_str_has_prefix (mount_path, path)) {
|
||||||
|
g_free (path);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
g_free (path);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
gboolean gsd_should_ignore_unix_mount (GUnixMountEntry *mount);
|
gboolean gsd_should_ignore_unix_mount (GUnixMountEntry *mount);
|
||||||
|
gboolean gsd_is_removable_mount (GUnixMountEntry *mount);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue