[gnome-color-manager: 67/80] trivial: Remove GSettings from GcmDevice
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager: 67/80] trivial: Remove GSettings from GcmDevice
- Date: Mon, 19 Jul 2010 11:38:05 +0000 (UTC)
commit 4ec39cc93b7158cecc71f19f9cc448f913538f08
Author: Richard Hughes <richard hughsie com>
Date: Sun Jul 18 13:14:42 2010 +0100
trivial: Remove GSettings from GcmDevice
src/gcm-device.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/src/gcm-device.c b/src/gcm-device.c
index 2ee18ea..479b3cb 100644
--- a/src/gcm-device.c
+++ b/src/gcm-device.c
@@ -60,7 +60,6 @@ struct _GcmDevicePrivate
gchar *model;
GPtrArray *profiles;
gchar *title;
- GSettings *settings;
GcmColorspace colorspace;
guint changed_id;
glong modified_time;
@@ -667,9 +666,7 @@ gcm_device_load (GcmDevice *device, GError **error)
priv->manufacturer = g_key_file_get_string (file, priv->id, "manufacturer", NULL);
priv->gamma = g_key_file_get_double (file, priv->id, "gamma", &error_local);
if (error_local != NULL) {
- priv->gamma = g_settings_get_double (priv->settings, GCM_SETTINGS_DEFAULT_GAMMA);
- if (priv->gamma < 0.1f)
- priv->gamma = 1.0f;
+ priv->gamma = 1;
g_clear_error (&error_local);
}
priv->brightness = g_key_file_get_double (file, priv->id, "brightness", &error_local);
@@ -1193,10 +1190,7 @@ gcm_device_init (GcmDevice *device)
device->priv->model = NULL;
device->priv->profiles = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
device->priv->modified_time = 0;
- device->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
- device->priv->gamma = g_settings_get_double (device->priv->settings, GCM_SETTINGS_DEFAULT_GAMMA);
- if (device->priv->gamma < 0.01)
- device->priv->gamma = 1.0f;
+ device->priv->gamma = 1.0;
device->priv->brightness = 0.0f;
device->priv->contrast = 100.f;
device->priv->colorspace = GCM_COLORSPACE_UNKNOWN;
@@ -1221,7 +1215,6 @@ gcm_device_finalize (GObject *object)
g_free (priv->manufacturer);
g_free (priv->model);
g_ptr_array_unref (priv->profiles);
- g_object_unref (priv->settings);
G_OBJECT_CLASS (gcm_device_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]