[gnome-color-manager] trivial: do gcm_device_apply() on all device types, as it's ignored if there is no klass support
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: do gcm_device_apply() on all device types, as it's ignored if there is no klass support
- Date: Wed, 10 Feb 2010 10:10:10 +0000 (UTC)
commit 5336b4239c72cba2f3714a9d9a6b52920879b966
Author: Richard Hughes <richard hughsie com>
Date: Tue Feb 9 20:27:32 2010 +0000
trivial: do gcm_device_apply() on all device types, as it's ignored if there is no klass support
src/gcm-apply.c | 6 +-----
src/gcm-prefs.c | 30 ++++++++++--------------------
2 files changed, 11 insertions(+), 25 deletions(-)
---
diff --git a/src/gcm-apply.c b/src/gcm-apply.c
index 94863ee..e3e42e7 100644
--- a/src/gcm-apply.c
+++ b/src/gcm-apply.c
@@ -79,12 +79,8 @@ main (int argc, char **argv)
"type", &type,
NULL);
- /* not a xrandr panel */
- if (type != GCM_DEVICE_TYPE_ENUM_DISPLAY)
- continue;
-
/* set gamma for device */
- egg_debug ("setting %s gamma", gcm_device_get_id (device));
+ egg_debug ("setting profiles on device: %s", gcm_device_get_id (device));
ret = gcm_device_apply (device, &error);
if (!ret) {
retval = 1;
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 66b330d..df3c47b 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -387,7 +387,7 @@ out:
error = NULL;
ret_tmp = gcm_device_apply (current_device, &error);
if (!ret_tmp) {
- egg_warning ("failed to set output gamma: %s", error->message);
+ egg_warning ("failed to apply profile: %s", error->message);
g_error_free (error);
}
@@ -2133,7 +2133,7 @@ gcm_prefs_add_device_xrandr (GcmDevice *device)
/* set the gamma on the device */
ret = gcm_device_apply (device, &error);
if (!ret) {
- egg_warning ("failed to set output gamma: %s", error->message);
+ egg_warning ("failed to apply profile: %s", error->message);
g_error_free (error);
}
@@ -2267,14 +2267,12 @@ gcm_prefs_profile_combo_changed_cb (GtkWidget *widget, gpointer data)
goto out;
}
- /* set the gamma for display types */
- if (type == GCM_DEVICE_TYPE_ENUM_DISPLAY) {
- ret = gcm_device_apply (current_device, &error);
- if (!ret) {
- egg_warning ("failed to set output gamma: %s", error->message);
- g_error_free (error);
- goto out;
- }
+ /* set the profile */
+ ret = gcm_device_apply (current_device, &error);
+ if (!ret) {
+ egg_warning ("failed to apply profile: %s", error->message);
+ g_error_free (error);
+ goto out;
}
}
out:
@@ -2324,7 +2322,7 @@ gcm_prefs_slider_changed_cb (GtkRange *range, gpointer *user_data)
/* actually set the new profile */
ret = gcm_device_apply (current_device, &error);
if (!ret) {
- egg_warning ("failed to set output gamma: %s", error->message);
+ egg_warning ("failed to apply profile: %s", error->message);
g_error_free (error);
goto out;
}
@@ -2797,7 +2795,6 @@ gcm_prefs_reset_devices_idle_cb (gpointer user_data)
{
GPtrArray *array = NULL;
GcmDevice *device;
- GcmDeviceTypeEnum type;
GError *error = NULL;
gboolean ret;
guint i;
@@ -2806,18 +2803,11 @@ gcm_prefs_reset_devices_idle_cb (gpointer user_data)
array = gcm_client_get_devices (gcm_client);
for (i=0; i<array->len; i++) {
device = g_ptr_array_index (array, i);
- g_object_get (device,
- "type", &type,
- NULL);
-
- /* not a xrandr panel */
- if (type != GCM_DEVICE_TYPE_ENUM_DISPLAY)
- continue;
/* set gamma for device */
ret = gcm_device_apply (device, &error);
if (!ret) {
- egg_warning ("failed to set gamma: %s", error->message);
+ egg_warning ("failed to set profile: %s", error->message);
g_error_free (error);
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]