diff options
author | David Zeuthen <davidz@redhat.com> | 2009-06-17 09:49:44 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2009-06-17 09:50:35 -0400 |
commit | 4053577a19585c63e23e6c6e85011e2df9910745 (patch) | |
tree | 8c77e6ab423827a8623e7b55ad77ef362eb669af /programs | |
parent | 8a72222d454bdf12e88402b2f012667e7c8e9754 (diff) | |
download | gvfs-4053577a19585c63e23e6c6e85011e2df9910745.tar.gz |
Bug 585591 – Starting/stopping drives
This is the GVfs implementation for the new GIO API for
starting/stopping drives. See
http://bugzilla.gnome.org/show_bug.cgi?id=585591
for details.
Diffstat (limited to 'programs')
-rw-r--r-- | programs/gvfs-mount.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/programs/gvfs-mount.c b/programs/gvfs-mount.c index b72b31d2..b2699a66 100644 --- a/programs/gvfs-mount.c +++ b/programs/gvfs-mount.c @@ -542,6 +542,9 @@ list_drives (GList *drives, if (extra_detail) { + GEnumValue *enum_value; + gpointer klass; + ids = g_drive_enumerate_identifiers (drive); if (ids && ids[0] != NULL) { @@ -569,8 +572,19 @@ list_drives (GList *drives, g_print ("%*sis_media_check_automatic=%d\n", indent + 2, "", g_drive_is_media_check_automatic (drive)); g_print ("%*scan_poll_for_media=%d\n", indent + 2, "", g_drive_can_poll_for_media (drive)); g_print ("%*scan_eject=%d\n", indent + 2, "", g_drive_can_eject (drive)); + g_print ("%*scan_start=%d\n", indent + 2, "", g_drive_can_start (drive)); + g_print ("%*scan_stop=%d\n", indent + 2, "", g_drive_can_stop (drive)); + + enum_value = NULL; + klass = g_type_class_ref (G_TYPE_DRIVE_START_STOP_TYPE); + if (klass != NULL) + { + enum_value = g_enum_get_value (klass, g_drive_get_start_stop_type (drive)); + g_print ("%*sstart_stop_type=%s\n", indent + 2, "", + enum_value != NULL ? enum_value->value_nick : "UNKNOWN"); + g_type_class_unref (klass); + } } - volumes = g_drive_get_volumes (drive); list_volumes (volumes, indent + 2, FALSE); g_list_foreach (volumes, (GFunc)g_object_unref, NULL); |