summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-17 01:07:06 +0200
committerBastien Nocera <hadess@hadess.net>2013-10-17 01:07:06 +0200
commitb777c63d97dbd73ca939b04b623c844e4d571d87 (patch)
treefb6d0584000d3edaaccc6c5456aec69283378c86 /src
parentb2f72dd69ac683e7fa213d83b410b38fe1ab1b21 (diff)
downloadupower-b777c63d97dbd73ca939b04b623c844e4d571d87.tar.gz
daemon: Make warning-level UpDevice property writable
So we can update the display device warning level.
Diffstat (limited to 'src')
-rw-r--r--src/up-device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/up-device.c b/src/up-device.c
index 4932ca0..746e9b8 100644
--- a/src/up-device.c
+++ b/src/up-device.c
@@ -519,6 +519,9 @@ up_device_set_property (GObject *object, guint prop_id, const GValue *value, GPa
case PROP_TECHNOLOGY:
device->priv->technology = g_value_get_uint (value);
break;
+ case PROP_WARNING_LEVEL:
+ device->priv->warning_level = g_value_get_uint (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
return;
@@ -1317,7 +1320,7 @@ up_device_class_init (UpDeviceClass *klass)
UP_DEVICE_LEVEL_UNKNOWN,
UP_DEVICE_LEVEL_LAST,
UP_DEVICE_LEVEL_UNKNOWN,
- G_PARAM_READABLE));
+ G_PARAM_READWRITE));
/**
* UpDevice:icon: