[gnome-disk-utility] Add support for new :drive-can-spindown property



commit bd8c78232b4aa4773eb1a64c9571f89e3abb1a0a
Author: David Zeuthen <davidz redhat com>
Date:   Mon Jun 22 13:56:25 2009 -0400

    Add support for new :drive-can-spindown property
    
    Also bump required version of DeviceKit-disks to 006.

 configure.ac         |    2 +-
 src/gdu/gdu-device.c |    9 +++++++++
 src/gdu/gdu-device.h |    1 +
 3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3005cc5..d5d7801 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,7 +128,7 @@ GTK2_REQUIRED=2.17.2
 UNIQUE_REQUIRED=1.0
 LIBNOTIFY_REQUIRED=0.3.0
 NAUTILUS_REQUIRED=2.24.0
-DEVKIT_DISKS_REQUIRED=005
+DEVKIT_DISKS_REQUIRED=006
 
 SCROLLKEEPER_REQUIRED=0.3.14
 INTLTOOL_REQUIRED=0.35.0
diff --git a/src/gdu/gdu-device.c b/src/gdu/gdu-device.c
index bed2471..82eeec0 100644
--- a/src/gdu/gdu-device.c
+++ b/src/gdu/gdu-device.c
@@ -118,6 +118,7 @@ typedef struct
         char    *drive_media;
         gboolean drive_is_media_ejectable;
         gboolean drive_can_detach;
+        gboolean drive_can_spindown;
 
         gboolean optical_disc_is_blank;
         gboolean optical_disc_is_appendable;
@@ -315,6 +316,8 @@ collect_props (const char *key, const GValue *value, DeviceProperties *props)
                 props->drive_is_media_ejectable = g_value_get_boolean (value);
         else if (strcmp (key, "drive-can-detach") == 0)
                 props->drive_can_detach = g_value_get_boolean (value);
+        else if (strcmp (key, "drive-can-spindown") == 0)
+                props->drive_can_spindown = g_value_get_boolean (value);
 
         else if (strcmp (key, "optical-disc-is-blank") == 0)
                 props->optical_disc_is_blank = g_value_get_boolean (value);
@@ -1107,6 +1110,12 @@ gdu_device_drive_get_can_detach (GduDevice *device)
 }
 
 gboolean
+gdu_device_drive_get_can_spindown (GduDevice *device)
+{
+        return device->priv->props->drive_can_spindown;
+}
+
+gboolean
 gdu_device_optical_disc_get_is_blank (GduDevice *device)
 {
         return device->priv->props->optical_disc_is_blank;
diff --git a/src/gdu/gdu-device.h b/src/gdu/gdu-device.h
index 32cefd4..b430243 100644
--- a/src/gdu/gdu-device.h
+++ b/src/gdu/gdu-device.h
@@ -138,6 +138,7 @@ const char *gdu_device_drive_get_media (GduDevice *device);
 gboolean gdu_device_drive_get_is_media_ejectable (GduDevice *device);
 gboolean gdu_device_drive_get_requires_eject (GduDevice *device);
 gboolean gdu_device_drive_get_can_detach (GduDevice *device);
+gboolean gdu_device_drive_get_can_spindown (GduDevice *device);
 
 gboolean gdu_device_optical_disc_get_is_blank (GduDevice *device);
 gboolean gdu_device_optical_disc_get_is_appendable (GduDevice *device);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]