diff options
author | Richard Hughes <richard@hughsie.com> | 2013-08-14 09:03:38 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2013-08-14 09:04:06 +0100 |
commit | 1a59f900c22d04b3c562026adb28433c9f52f2a3 (patch) | |
tree | 4b7e0b97737064742653c223ef75862cde883ed9 | |
parent | 2cb334172382268786b50057d463aad4757c82b0 (diff) | |
download | colord-1a59f900c22d04b3c562026adb28433c9f52f2a3.tar.gz |
Allow profiles to be added or removed when the device is not enabled
In the case where the device is not enabled at session startup we want the
session component (i.e. colord-kde/gnome-settings-daemon/xiccd) to be able to
add the auto-EDID profile. This allows the user to enable the device later
without first manually adding the profile in the control center.
-rw-r--r-- | src/cd-device.c | 28 | ||||
-rw-r--r-- | src/org.freedesktop.ColorManager.Device.xml | 4 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/cd-device.c b/src/cd-device.c index b23e38b..fd1ee0f 100644 --- a/src/cd-device.c +++ b/src/cd-device.c @@ -593,15 +593,6 @@ cd_device_remove_profile (CdDevice *device, gboolean ret = FALSE; guint i; - /* device is disabled */ - if (priv->enabled == FALSE) { - g_set_error_literal (error, - CD_DEVICE_ERROR, - CD_DEVICE_ERROR_NOT_ENABLED, - "device is disabled"); - goto out; - } - /* check the profile exists on this device */ for (i = 0; i < priv->profiles->len; i++) { item = g_ptr_array_index (priv->profiles, i); @@ -712,16 +703,6 @@ cd_device_add_profile (CdDevice *device, gboolean ret = TRUE; guint i; - /* device is disabled */ - if (priv->enabled == FALSE) { - ret = FALSE; - g_set_error_literal (error, - CD_DEVICE_ERROR, - CD_DEVICE_ERROR_NOT_ENABLED, - "device is disabled"); - goto out; - } - /* is it available */ profile = cd_profile_array_get_by_object_path (priv->profile_array, profile_object_path); @@ -1008,15 +989,6 @@ cd_device_make_default (CdDevice *device, gboolean ret = FALSE; CdDevicePrivate *priv = device->priv; - /* device is disabled */ - if (priv->enabled == FALSE) { - g_set_error_literal (error, - CD_DEVICE_ERROR, - CD_DEVICE_ERROR_NOT_ENABLED, - "device is disabled"); - goto out; - } - /* find profile */ profile = cd_device_find_profile_by_object_path (priv->profiles, profile_object_path); diff --git a/src/org.freedesktop.ColorManager.Device.xml b/src/org.freedesktop.ColorManager.Device.xml index d06bc0b..1a4c3ac 100644 --- a/src/org.freedesktop.ColorManager.Device.xml +++ b/src/org.freedesktop.ColorManager.Device.xml @@ -188,10 +188,6 @@ If the enabled state is changed then this is reflected for all users and persistent across reboots. </doc:para> - <doc:para> - If a device is not enabled then no profiles can be added or - removed and the default cannot be changed. - </doc:para> </doc:description> </doc:doc> </property> |