[gnome-color-manager: 1/2] Port gnome-color-manager to GSettings
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager: 1/2] Port gnome-color-manager to GSettings
- Date: Thu, 6 May 2010 15:29:04 +0000 (UTC)
commit c2e1f8067c0ccb15d6dbb6369cfdc634c29fe6a5
Author: Richard Hughes <richard hughsie com>
Date: Tue Apr 20 21:25:52 2010 +0100
Port gnome-color-manager to GSettings
configure.ac | 8 ++-
contrib/gnome-color-manager.spec.in | 5 ++
data/.gitignore | 1 +
data/Makefile.am | 13 ++++
src/Makefile.am | 10 ---
src/gcm-calibrate.c | 19 +++---
src/gcm-clut.c | 60 ++++++++----------
src/gcm-dbus.c | 28 ++++-----
src/gcm-device-xrandr.c | 11 ++--
src/gcm-device.c | 16 ++----
src/gcm-prefs.c | 114 +++++++++++++----------------------
src/gcm-profile-store.c | 9 +--
src/gcm-session.c | 22 ++++---
src/gcm-utils.h | 34 +++++-----
14 files changed, 157 insertions(+), 193 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6004417..1d0d38c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,7 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE(GETTEXT_PACKAGE, "AC_PACKAGE_NAME", [foo])
AM_GLIB_GNU_GETTEXT
+GLIB_GSETTINGS
dnl ---------------------------------------------------------------------------
dnl - Library dependencies
@@ -102,16 +103,17 @@ dnl ---------------------------------------------------------------------------
GLIB_REQUIRED=2.14.0
GTK_REQUIRED=2.14.0
GNOMEDESKTOP_REQUIRED=2.14.0
-GCONF_REQUIRED=0.22
+GCONF_REQUIRED=2.31.1
UNIQUE_REQUIRED=1.0.0
VTE_REQUIRED=0.22.2
DBUS_GLIB_REQUIRED=0.73
CANBERRA_REQUIRED=0.10
+GIO_REQUIRED=2.25.0
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gio-2.0)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gio-2.0 >= $GIO_REQUIRED)
PKG_CHECK_MODULES(XORG, xxf86vm xrandr)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED)
PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-2.0 >= $GNOMEDESKTOP_REQUIRED)
@@ -169,6 +171,8 @@ fi
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2
+AC_SUBST(gsettingsupdateschemacache,
+ `pkg-config --variable gsettingsupdateschemacache gio-2.0`)
dnl ---------------------------------------------------------------------------
dnl - Make paths available for source files
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index 490c75c..e7e9b8b 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -42,6 +42,8 @@ BuildRequires: sane-backends-devel
BuildRequires: libtiff-devel
BuildRequires: libcanberra-devel
BuildRequires: libnotify-devel
+BuildRequires: glib2-devel >= 2.25.1
+BuildRequires: GConf2-devel >= 2.31.1
%description
gnome-color-manager is a session framework that makes it easy to manage, install
@@ -76,6 +78,7 @@ if [ -x /usr/bin/gtk-update-icon-cache ]; then
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
+glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas
%pre
%gconf_schema_prepare gnome-color-manager
@@ -90,6 +93,7 @@ if [ -x /usr/bin/gtk-update-icon-cache ]; then
fi
update-desktop-database %{_datadir}/applications &> /dev/null || :
update-mime-database %{_datadir}/mime &> /dev/null || :
+glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas
%files -f %{name}.lang
%defattr(-,root,root,-)
@@ -115,6 +119,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%{_datadir}/dbus-1/services/org.gnome.ColorManager.service
%{_sbindir}/gcm-install-system-wide
%{_datadir}/polkit-1/actions/org.gnome.color.policy
+%{_datadir}/glib-2.0/schemas/org.gnome.ColorManager.gschema.xml
# this is probably better in a shared package
%dir %{_localstatedir}/lib/color
diff --git a/data/.gitignore b/data/.gitignore
index c5172e4..4602067 100644
--- a/data/.gitignore
+++ b/data/.gitignore
@@ -6,4 +6,5 @@ Makefile.in
*.gladep
*.gladep.bak
org.gnome.ColorManager.service
+org.gnome.ColorManager.gschema.xml
diff --git a/data/Makefile.am b/data/Makefile.am
index 1300c8a..0f93cac 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -28,6 +28,16 @@ service_DATA = $(service_in_files:.service.in=.service)
$(service_DATA): $(service_in_files) Makefile
@sed -e "s|\ servicedir\@|$(bindir)|" $< > $@
+gsettingsschema_DATA = org.gnome.ColorManager.gschema.xml
+gsettingsschemadir = $(datadir)/glib-2.0/schemas
+org.gnome.ColorManager.gschema.xml: gnome-color-manager.schemas
+ gsettings-schema-convert --force --gconf --xml --schema-id $(@:.gschema.xml=) $< -o $@
+if GSETTINGS_SCHEMAS_INSTALL
+# --allow-any-name should be removed once the move from gconf is complete
+install-data-hook:
+ $(GLIB_COMPILE_SCHEMAS) --allow-any-name $(DESTDIR)$(gsettingsschemadir)
+endif
+
pkgdata_DATA = \
gcm-calibrate.ui \
gcm-spawn.ui \
@@ -56,6 +66,9 @@ endif
clean-local :
rm -f *~
+CLEANFILES = \
+ $(gsettingsschema_DATA)
+
DISTCLEANFILES = \
org.gnome.ColorManager.service \
gnome-color-manager.schemas \
diff --git a/src/Makefile.am b/src/Makefile.am
index cc4541e..a064c9b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,6 @@ INCLUDES = \
$(GTK_CFLAGS) \
$(GNOMEDESKTOP_CFLAGS) \
$(UNIQUE_CFLAGS) \
- $(GCONF_CFLAGS) \
$(VTE_CFLAGS) \
$(LCMS_CFLAGS) \
$(XORG_CFLAGS) \
@@ -126,7 +125,6 @@ gcm_dump_edid_LDADD = \
$(GLIB_LIBS) \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(XORG_LIBS) \
@@ -147,7 +145,6 @@ gcm_dump_profile_LDADD = \
$(GLIB_LIBS) \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(XORG_LIBS) \
@@ -183,7 +180,6 @@ gcm_inspect_LDADD = \
$(GLIB_LIBS) \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(XORG_LIBS) \
@@ -204,7 +200,6 @@ gcm_apply_LDADD = \
$(GLIB_LIBS) \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(XORG_LIBS) \
@@ -225,7 +220,6 @@ gcm_import_LDADD = \
$(GLIB_LIBS) \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(XORG_LIBS) \
@@ -247,7 +241,6 @@ gcm_prefs_LDADD = \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
$(UNIQUE_LIBS) \
- $(GCONF_LIBS) \
$(VTE_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
@@ -272,7 +265,6 @@ gcm_picker_LDADD = \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
$(UNIQUE_LIBS) \
- $(GCONF_LIBS) \
$(VTE_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
@@ -299,7 +291,6 @@ gcm_session_LDADD = \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
$(UNIQUE_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(DBUS_GLIB_LIBS) \
@@ -348,7 +339,6 @@ gcm_self_test_LDADD = \
$(X11_LIBS) \
$(GNOMEDESKTOP_LIBS) \
$(UNIQUE_LIBS) \
- $(GCONF_LIBS) \
$(GUDEV_LIBS) \
$(LCMS_LIBS) \
$(DBUS_GLIB_LIBS) \
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index 1162c7e..5376cfc 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
#include <tiff.h>
#include <tiffio.h>
-#include <gconf/gconf-client.h>
#include "gcm-calibrate.h"
#include "gcm-dmi.h"
@@ -75,7 +74,7 @@ struct _GcmCalibratePrivate
gchar *serial;
gchar *device;
gchar *working_path;
- GConfClient *gconf_client;
+ GSettings *settings;
};
enum {
@@ -238,7 +237,7 @@ gcm_calibrate_set_basename (GcmCalibrate *calibrate)
g_string_append_printf (basename, " - %s", serial);
g_string_append_printf (basename, " (%04i-%02i-%02i)", date->year, date->month, date->day);
- /* maybe configure in GConf? */
+ /* maybe configure in GSettings? */
if (0)
g_string_append_printf (basename, " [%s]", timespec);
@@ -495,7 +494,7 @@ gcm_calibrate_get_precision (GcmCalibrate *calibrate, GError **error)
g_set_error_literal (error,
GCM_CALIBRATE_ERROR,
GCM_CALIBRATE_ERROR_USER_ABORT,
- "user did not choose precision type and ask is specified in GConf");
+ "user did not choose precision type and ask is specified in GSettings");
goto out;
}
@@ -572,7 +571,7 @@ gcm_calibrate_display (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
}
/* get default precision */
- precision = gconf_client_get_string (priv->gconf_client, GCM_SETTINGS_CALIBRATION_LENGTH, NULL);
+ precision = g_settings_get_string (priv->settings, GCM_SETTINGS_CALIBRATION_LENGTH);
priv->precision = gcm_calibrate_precision_from_string (precision);
if (priv->precision == GCM_CALIBRATE_PRECISION_UNKNOWN) {
priv->precision = gcm_calibrate_get_precision (calibrate, error);
@@ -886,7 +885,7 @@ gcm_calibrate_printer (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
}
/* get default precision */
- precision = gconf_client_get_string (priv->gconf_client, GCM_SETTINGS_CALIBRATION_LENGTH, NULL);
+ precision = g_settings_get_string (priv->settings, GCM_SETTINGS_CALIBRATION_LENGTH);
priv->precision = gcm_calibrate_precision_from_string (precision);
if (priv->precision == GCM_CALIBRATE_PRECISION_UNKNOWN) {
priv->precision = gcm_calibrate_get_precision (calibrate, error);
@@ -1057,7 +1056,7 @@ gcm_calibrate_device (GcmCalibrate *calibrate, GtkWindow *window, GError **error
g_object_get (priv->calibrate_dialog, "reference-kind", &priv->reference_kind, NULL);
/* get default precision */
- precision = gconf_client_get_string (priv->gconf_client, GCM_SETTINGS_CALIBRATION_LENGTH, NULL);
+ precision = g_settings_get_string (priv->settings, GCM_SETTINGS_CALIBRATION_LENGTH);
priv->precision = gcm_calibrate_precision_from_string (precision);
if (priv->precision == GCM_CALIBRATE_PRECISION_UNKNOWN) {
priv->precision = gcm_calibrate_get_precision (calibrate, error);
@@ -1472,8 +1471,8 @@ gcm_calibrate_init (GcmCalibrate *calibrate)
// FIXME: this has to be per-run specific
calibrate->priv->working_path = g_strdup ("/tmp");
- /* use GConf to get defaults */
- calibrate->priv->gconf_client = gconf_client_get_default ();
+ /* use GSettings to get defaults */
+ calibrate->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
/* coldplug, and watch for changes */
calibrate->priv->colorimeter_kind = gcm_colorimeter_get_kind (calibrate->priv->colorimeter);
@@ -1504,7 +1503,7 @@ gcm_calibrate_finalize (GObject *object)
g_object_unref (priv->colorimeter);
g_object_unref (priv->dmi);
g_object_unref (priv->calibrate_dialog);
- g_object_unref (priv->gconf_client);
+ g_object_unref (priv->settings);
G_OBJECT_CLASS (gcm_calibrate_parent_class)->finalize (object);
}
diff --git a/src/gcm-clut.c b/src/gcm-clut.c
index 113a6e3..b708cfa 100644
--- a/src/gcm-clut.c
+++ b/src/gcm-clut.c
@@ -32,7 +32,6 @@
#include <glib-object.h>
#include <math.h>
#include <gio/gio.h>
-#include <gconf/gconf-client.h>
#include "gcm-clut.h"
#include "gcm-utils.h"
@@ -52,10 +51,10 @@ struct _GcmClutPrivate
{
GPtrArray *array;
guint size;
- gfloat gamma;
- gfloat brightness;
- gfloat contrast;
- GConfClient *gconf_client;
+ gdouble gamma;
+ gdouble brightness;
+ gdouble contrast;
+ GSettings *settings;
};
enum {
@@ -136,14 +135,14 @@ gcm_clut_reset (GcmClut *clut)
* gcm_clut_get_adjusted_value:
**/
static guint
-gcm_clut_get_adjusted_value (guint value, gfloat min, gfloat max, gfloat custom_gamma)
+gcm_clut_get_adjusted_value (guint value, gdouble min, gdouble max, gdouble custom_gamma)
{
guint retval;
/* optimise for the common case */
if (min < 0.01f && max > 0.99f && custom_gamma > 0.99 && custom_gamma < 1.01)
return value;
- retval = 65536.0f * ((powf (((gfloat)value/65536.0f), custom_gamma) * (max - min)) + min);
+ retval = 65536.0f * ((powf (((gdouble)value/65536.0f), custom_gamma) * (max - min)) + min);
return retval;
}
@@ -167,9 +166,9 @@ gcm_clut_get_array (GcmClut *clut)
guint value;
const GcmClutData *tmp;
GcmClutData *data;
- gfloat min;
- gfloat max;
- gfloat custom_gamma;
+ gdouble min;
+ gdouble max;
+ gdouble custom_gamma;
g_return_val_if_fail (GCM_IS_CLUT (clut), FALSE);
g_return_val_if_fail (clut->priv->gamma != 0, FALSE);
@@ -237,13 +236,13 @@ gcm_clut_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec
g_value_set_uint (value, priv->size);
break;
case PROP_GAMMA:
- g_value_set_float (value, priv->gamma);
+ g_value_set_double (value, priv->gamma);
break;
case PROP_BRIGHTNESS:
- g_value_set_float (value, priv->brightness);
+ g_value_set_double (value, priv->brightness);
break;
case PROP_CONTRAST:
- g_value_set_float (value, priv->contrast);
+ g_value_set_double (value, priv->contrast);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -265,13 +264,13 @@ gcm_clut_set_property (GObject *object, guint prop_id, const GValue *value, GPar
priv->size = g_value_get_uint (value);
break;
case PROP_GAMMA:
- priv->gamma = g_value_get_float (value);
+ priv->gamma = g_value_get_double (value);
break;
case PROP_BRIGHTNESS:
- priv->brightness = g_value_get_float (value);
+ priv->brightness = g_value_get_double (value);
break;
case PROP_CONTRAST:
- priv->contrast = g_value_get_float (value);
+ priv->contrast = g_value_get_double (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -302,25 +301,25 @@ gcm_clut_class_init (GcmClutClass *klass)
/**
* GcmClut:gamma:
*/
- pspec = g_param_spec_float ("gamma", NULL, NULL,
- 0.0, G_MAXFLOAT, 1.01,
- G_PARAM_READWRITE);
+ pspec = g_param_spec_double ("gamma", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 1.01,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_GAMMA, pspec);
/**
* GcmClut:brightness:
*/
- pspec = g_param_spec_float ("brightness", NULL, NULL,
- 0.0, G_MAXFLOAT, 1.02,
- G_PARAM_READWRITE);
+ pspec = g_param_spec_double ("brightness", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 1.02,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_BRIGHTNESS, pspec);
/**
* GcmClut:contrast:
*/
- pspec = g_param_spec_float ("contrast", NULL, NULL,
- 0.0, G_MAXFLOAT, 1.03,
- G_PARAM_READWRITE);
+ pspec = g_param_spec_double ("contrast", NULL, NULL,
+ 0.0, G_MAXDOUBLE, 1.03,
+ G_PARAM_READWRITE);
g_object_class_install_property (object_class, PROP_CONTRAST, pspec);
g_type_class_add_private (klass, sizeof (GcmClutPrivate));
@@ -332,15 +331,10 @@ gcm_clut_class_init (GcmClutClass *klass)
static void
gcm_clut_init (GcmClut *clut)
{
- GError *error = NULL;
clut->priv = GCM_CLUT_GET_PRIVATE (clut);
clut->priv->array = g_ptr_array_new_with_free_func (g_free);
- clut->priv->gconf_client = gconf_client_get_default ();
- clut->priv->gamma = gconf_client_get_float (clut->priv->gconf_client, GCM_SETTINGS_DEFAULT_GAMMA, &error);
- if (error != NULL) {
- egg_warning ("failed to get setup parameters: %s", error->message);
- g_error_free (error);
- }
+ clut->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
+ clut->priv->gamma = g_settings_get_double (clut->priv->settings, GCM_SETTINGS_DEFAULT_GAMMA);
if (clut->priv->gamma < 0.01)
clut->priv->gamma = 1.0f;
clut->priv->brightness = 0.0f;
@@ -357,7 +351,7 @@ gcm_clut_finalize (GObject *object)
GcmClutPrivate *priv = clut->priv;
g_ptr_array_unref (priv->array);
- g_object_unref (clut->priv->gconf_client);
+ g_object_unref (clut->priv->settings);
G_OBJECT_CLASS (gcm_clut_parent_class)->finalize (object);
}
diff --git a/src/gcm-dbus.c b/src/gcm-dbus.c
index 85d961c..3ee4476 100644
--- a/src/gcm-dbus.c
+++ b/src/gcm-dbus.c
@@ -23,7 +23,6 @@
#include <glib/gi18n.h>
#include <dbus/dbus-glib.h>
-#include <gconf/gconf-client.h>
#include "egg-debug.h"
@@ -40,7 +39,7 @@ static void gcm_dbus_finalize (GObject *object);
struct GcmDbusPrivate
{
- GConfClient *gconf_client;
+ GSettings *settings;
GcmClient *client;
GcmProfileStore *profile_store;
GTimer *timer;
@@ -511,12 +510,12 @@ gcm_dbus_class_init (GcmDbusClass *klass)
}
/**
- * gcm_dbus_gconf_key_changed_cb:
+ * gcm_dbus_key_changed_cb:
*
- * We might have to do things when the gconf keys change; do them here.
+ * We might have to do things when the keys change; do them here.
**/
static void
-gcm_dbus_gconf_key_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *entry, GcmDbus *dbus)
+gcm_dbus_key_changed_cb (GSettings *settings, const gchar *key, GcmDbus *dbus)
{
/* just emit signal */
g_signal_emit (dbus, signals[SIGNAL_CHANGED], 0);
@@ -543,7 +542,9 @@ gcm_dbus_init (GcmDbus *dbus)
GError *error = NULL;
dbus->priv = GCM_DBUS_GET_PRIVATE (dbus);
- dbus->priv->gconf_client = gconf_client_get_default ();
+ dbus->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
+ g_signal_connect (dbus->priv->settings, "changed", G_CALLBACK (gcm_dbus_key_changed_cb), dbus);
+
dbus->priv->client = gcm_client_new ();
g_signal_connect (dbus->priv->client, "added", G_CALLBACK (gcm_dbus_client_changed_cb), dbus);
g_signal_connect (dbus->priv->client, "removed", G_CALLBACK (gcm_dbus_client_changed_cb), dbus);
@@ -553,16 +554,11 @@ gcm_dbus_init (GcmDbus *dbus)
dbus->priv->profile_store = gcm_profile_store_new ();
dbus->priv->timer = g_timer_new ();
- /* notify on changes */
- gconf_client_notify_add (dbus->priv->gconf_client, GCM_SETTINGS_DIR,
- (GConfClientNotifyFunc) gcm_dbus_gconf_key_changed_cb,
- dbus, NULL, NULL);
-
/* coldplug */
- dbus->priv->rendering_intent_display = gconf_client_get_string (dbus->priv->gconf_client, GCM_SETTINGS_RENDERING_INTENT_DISPLAY, NULL);
- dbus->priv->rendering_intent_softproof = gconf_client_get_string (dbus->priv->gconf_client, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF, NULL);
- dbus->priv->colorspace_rgb = gconf_client_get_string (dbus->priv->gconf_client, GCM_SETTINGS_COLORSPACE_RGB, NULL);
- dbus->priv->colorspace_cmyk = gconf_client_get_string (dbus->priv->gconf_client, GCM_SETTINGS_COLORSPACE_CMYK, NULL);
+ dbus->priv->rendering_intent_display = g_settings_get_string (dbus->priv->settings, GCM_SETTINGS_RENDERING_INTENT_DISPLAY);
+ dbus->priv->rendering_intent_softproof = g_settings_get_string (dbus->priv->settings, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF);
+ dbus->priv->colorspace_rgb = g_settings_get_string (dbus->priv->settings, GCM_SETTINGS_COLORSPACE_RGB);
+ dbus->priv->colorspace_cmyk = g_settings_get_string (dbus->priv->settings, GCM_SETTINGS_COLORSPACE_CMYK);
/* get all devices */
ret = gcm_client_add_connected (dbus->priv->client, &error);
@@ -590,7 +586,7 @@ gcm_dbus_finalize (GObject *object)
g_free (dbus->priv->colorspace_cmyk);
g_object_unref (dbus->priv->client);
g_object_unref (dbus->priv->profile_store);
- g_object_unref (dbus->priv->gconf_client);
+ g_object_unref (dbus->priv->settings);
g_timer_destroy (dbus->priv->timer);
G_OBJECT_CLASS (gcm_dbus_parent_class)->finalize (object);
diff --git a/src/gcm-device-xrandr.c b/src/gcm-device-xrandr.c
index 7fdac19..0c36705 100644
--- a/src/gcm-device-xrandr.c
+++ b/src/gcm-device-xrandr.c
@@ -26,7 +26,6 @@
#include <libgnomeui/gnome-rr.h>
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/xf86vmode.h>
-#include <gconf/gconf-client.h>
#include <gdk/gdkx.h>
#include "gcm-device-xrandr.h"
@@ -54,7 +53,7 @@ struct _GcmDeviceXrandrPrivate
guint gamma_size;
GcmEdid *edid;
GcmDmi *dmi;
- GConfClient *gconf_client;
+ GSettings *settings;
GcmXserver *xserver;
GcmScreen *screen;
gboolean xrandr_fallback;
@@ -496,7 +495,7 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
goto out;
/* only set the CLUT if we're not seting the atom */
- use_global = gconf_client_get_bool (priv->gconf_client, GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION, NULL);
+ use_global = g_settings_get_boolean (priv->settings, GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION);
if (use_global && filename != NULL) {
/* create CLUT */
profile = gcm_profile_default_new ();
@@ -540,7 +539,7 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
leftmost_screen = (x == 0 && y == 0);
/* either remove the atoms or set them */
- use_atom = gconf_client_get_bool (priv->gconf_client, GCM_SETTINGS_SET_ICC_PROFILE_ATOM, NULL);
+ use_atom = g_settings_get_boolean (priv->settings, GCM_SETTINGS_SET_ICC_PROFILE_ATOM);
if (!use_atom || filename == NULL) {
/* remove the output atom if there's nothing to show */
@@ -674,7 +673,7 @@ gcm_device_xrandr_init (GcmDeviceXrandr *device_xrandr)
device_xrandr->priv->gamma_size = 0;
device_xrandr->priv->edid = gcm_edid_new ();
device_xrandr->priv->dmi = gcm_dmi_new ();
- device_xrandr->priv->gconf_client = gconf_client_get_default ();
+ device_xrandr->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
device_xrandr->priv->screen = gcm_screen_new ();
device_xrandr->priv->xserver = gcm_xserver_new ();
}
@@ -691,7 +690,7 @@ gcm_device_xrandr_finalize (GObject *object)
g_free (priv->native_device);
g_object_unref (priv->edid);
g_object_unref (priv->dmi);
- g_object_unref (priv->gconf_client);
+ g_object_unref (priv->settings);
g_object_unref (priv->screen);
g_object_unref (priv->xserver);
diff --git a/src/gcm-device.c b/src/gcm-device.c
index 0c7ccad..2c8d044 100644
--- a/src/gcm-device.c
+++ b/src/gcm-device.c
@@ -29,7 +29,6 @@
#include "config.h"
#include <glib-object.h>
-#include <gconf/gconf-client.h>
#include "gcm-device.h"
#include "gcm-profile.h"
@@ -61,7 +60,7 @@ struct _GcmDevicePrivate
gchar *model;
gchar *profile_filename;
gchar *title;
- GConfClient *gconf_client;
+ GSettings *settings;
GcmColorspace colorspace;
guint changed_id;
glong modified_time;
@@ -577,7 +576,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 = gconf_client_get_float (priv->gconf_client, "/apps/gnome-color-manager/default_gamma", NULL);
+ priv->gamma = g_settings_get_double (priv->settings, "default_gamma");
if (priv->gamma < 0.1f)
priv->gamma = 1.0f;
g_clear_error (&error_local);
@@ -1062,7 +1061,6 @@ gcm_device_class_init (GcmDeviceClass *klass)
static void
gcm_device_init (GcmDevice *device)
{
- GError *error = NULL;
device->priv = GCM_DEVICE_GET_PRIVATE (device);
device->priv->changed_id = 0;
device->priv->id = NULL;
@@ -1074,12 +1072,8 @@ gcm_device_init (GcmDevice *device)
device->priv->model = NULL;
device->priv->profile_filename = NULL;
device->priv->modified_time = 0;
- device->priv->gconf_client = gconf_client_get_default ();
- device->priv->gamma = gconf_client_get_float (device->priv->gconf_client, GCM_SETTINGS_DEFAULT_GAMMA, &error);
- if (error != NULL) {
- egg_warning ("failed to get setup parameters: %s", error->message);
- g_error_free (error);
- }
+ 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->brightness = 0.0f;
@@ -1106,7 +1100,7 @@ gcm_device_finalize (GObject *object)
g_free (priv->manufacturer);
g_free (priv->model);
g_free (priv->profile_filename);
- g_object_unref (priv->gconf_client);
+ g_object_unref (priv->settings);
G_OBJECT_CLASS (gcm_device_parent_class)->finalize (object);
}
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 33bb7a5..18c8814 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -28,7 +28,6 @@
#include <glib/gstdio.h>
#include <gudev/gudev.h>
#include <libgnomeui/gnome-rr.h>
-#include <gconf/gconf-client.h>
#include <locale.h>
#include <canberra-gtk.h>
@@ -59,7 +58,7 @@ static GtkWidget *info_bar_vcgt = NULL;
static GtkWidget *info_bar_profiles = NULL;
static GtkWidget *cie_widget = NULL;
static GtkWidget *trc_widget = NULL;
-static GConfClient *gconf_client = NULL;
+static GSettings *settings = NULL;
enum {
GCM_DEVICES_COLUMN_ID,
@@ -2292,7 +2291,7 @@ gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
const gchar *filename;
GtkTreeModel *model;
GcmProfile *profile = NULL;
- const gchar *gconf_key = GCM_SETTINGS_COLORSPACE_RGB;
+ const gchar *key = GCM_SETTINGS_COLORSPACE_RGB;
/* no selection */
ret = gtk_combo_box_get_active_iter (GTK_COMBO_BOX(widget), &iter);
@@ -2308,11 +2307,11 @@ gcm_prefs_space_combo_changed_cb (GtkWidget *widget, gpointer data)
goto out;
if (data != NULL)
- gconf_key = GCM_SETTINGS_COLORSPACE_CMYK;
+ key = GCM_SETTINGS_COLORSPACE_CMYK;
filename = gcm_profile_get_filename (profile);
egg_debug ("changed working space %s", filename);
- gconf_client_set_string (gconf_client, gconf_key, filename, NULL);
+ g_settings_set_string (settings, key, filename);
out:
if (profile != NULL)
g_object_unref (profile);
@@ -2326,7 +2325,7 @@ static void
gcm_prefs_renderer_combo_changed_cb (GtkWidget *widget, gpointer data)
{
gint active;
- const gchar *gconf_key = GCM_SETTINGS_RENDERING_INTENT_DISPLAY;
+ const gchar *key = GCM_SETTINGS_RENDERING_INTENT_DISPLAY;
const gchar *value;
/* no selection */
@@ -2335,12 +2334,12 @@ gcm_prefs_renderer_combo_changed_cb (GtkWidget *widget, gpointer data)
return;
if (data != NULL)
- gconf_key = GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF;
+ key = GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF;
- /* save to GConf */
+ /* save to GSettings */
value = gcm_intent_to_string (active+1);
egg_debug ("changed rendering intent to %s", value);
- gconf_client_set_string (gconf_client, gconf_key, value, NULL);
+ g_settings_set_string (settings, key, value);
}
/**
@@ -2381,18 +2380,9 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
gchar *intent_display;
gchar *intent_softproof;
- /* do we show the fine tuning box */
- ret = gconf_client_get_bool (gconf_client, GCM_SETTINGS_SHOW_FINE_TUNING, NULL);
- widget = GTK_WIDGET (gtk_builder_get_object (builder, "expander_fine_tuning"));
- gtk_widget_set_visible (widget, ret);
-
/* setup RGB combobox */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_rgb"));
- colorspace_rgb = gconf_client_get_string (gconf_client, GCM_SETTINGS_COLORSPACE_RGB, &error);
- if (colorspace_rgb == NULL) {
- egg_warning ("failed to get configuration value: %s", error->message);
- g_clear_error (&error);
- }
+ colorspace_rgb = g_settings_get_string (settings, GCM_SETTINGS_COLORSPACE_RGB);
gcm_prefs_set_combo_simple_text (widget);
gcm_prefs_setup_space_combobox (widget, GCM_COLORSPACE_RGB, colorspace_rgb);
g_signal_connect (G_OBJECT (widget), "changed",
@@ -2400,11 +2390,7 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
/* setup CMYK combobox */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_cmyk"));
- colorspace_cmyk = gconf_client_get_string (gconf_client, GCM_SETTINGS_COLORSPACE_CMYK, NULL);
- if (colorspace_cmyk == NULL) {
- egg_warning ("failed to get configuration value: %s", error->message);
- g_clear_error (&error);
- }
+ colorspace_cmyk = g_settings_get_string (settings, GCM_SETTINGS_COLORSPACE_CMYK);
gcm_prefs_set_combo_simple_text (widget);
gcm_prefs_setup_space_combobox (widget, GCM_COLORSPACE_CMYK, colorspace_cmyk);
g_signal_connect (G_OBJECT (widget), "changed",
@@ -2413,22 +2399,14 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
/* setup rendering lists */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_rendering_display"));
gcm_prefs_set_combo_simple_text (widget);
- intent_display = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_DISPLAY, NULL);
- if (intent_display == NULL) {
- egg_warning ("failed to get configuration value: %s", error->message);
- g_clear_error (&error);
- }
+ intent_display = g_settings_get_string (settings, GCM_SETTINGS_RENDERING_INTENT_DISPLAY);
gcm_prefs_setup_rendering_combobox (widget, intent_display);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (gcm_prefs_renderer_combo_changed_cb), NULL);
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_rendering_softproof"));
gcm_prefs_set_combo_simple_text (widget);
- intent_softproof = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF, NULL);
- if (intent_softproof == NULL) {
- egg_warning ("failed to get configuration value: %s", error->message);
- g_clear_error (&error);
- }
+ intent_softproof = g_settings_get_string (settings, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF);
gcm_prefs_setup_rendering_combobox (widget, intent_softproof);
g_signal_connect (G_OBJECT (widget), "changed",
G_CALLBACK (gcm_prefs_renderer_combo_changed_cb), (gpointer) "softproof");
@@ -2493,37 +2471,11 @@ gcm_prefs_reset_devices_idle_cb (gpointer user_data)
}
/**
- * gcm_prefs_checkbutton_global_cb:
+ * gcm_prefs_checkbutton_changed_cb:
**/
static void
-gcm_prefs_checkbutton_global_cb (GtkWidget *widget, gpointer user_data)
+gcm_prefs_checkbutton_changed_cb (GtkWidget *widget, gpointer user_data)
{
- gboolean ret;
-
- /* get state */
- ret = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
-
- /* save new preference */
- gconf_client_set_bool (gconf_client, GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION, ret, NULL);
-
- /* set the new setting */
- g_idle_add ((GSourceFunc) gcm_prefs_reset_devices_idle_cb, NULL);
-}
-
-/**
- * gcm_prefs_checkbutton_profile_cb:
- **/
-static void
-gcm_prefs_checkbutton_profile_cb (GtkWidget *widget, gpointer user_data)
-{
- gboolean ret;
-
- /* get state */
- ret = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
-
- /* save new preference */
- gconf_client_set_bool (gconf_client, GCM_SETTINGS_SET_ICC_PROFILE_ATOM, ret, NULL);
-
/* set the new setting */
g_idle_add ((GSourceFunc) gcm_prefs_reset_devices_idle_cb, NULL);
}
@@ -2702,8 +2654,6 @@ main (int argc, char **argv)
guint xid = 0;
GError *error = NULL;
GMainLoop *loop;
- gboolean use_global;
- gboolean use_atom;
GtkTreeSelection *selection;
GtkWidget *info_bar_loading_label;
GtkWidget *info_bar_vcgt_label;
@@ -2723,6 +2673,9 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ /* use GSettings until dconf is ready */
+ g_setenv ("GSETTINGS_BACKEND", "gconf", FALSE);
+
gtk_init (&argc, &argv);
context = g_option_context_new ("gnome-color-manager prefs program");
@@ -3013,17 +2966,32 @@ main (int argc, char **argv)
G_CALLBACK (gcm_prefs_slider_changed_cb), NULL);
/* setup defaults */
- gconf_client = gconf_client_get_default ();
- use_global = gconf_client_get_bool (gconf_client, GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION, NULL);
- use_atom = gconf_client_get_bool (gconf_client, GCM_SETTINGS_SET_ICC_PROFILE_ATOM, NULL);
+ settings = g_settings_new (GCM_SETTINGS_SCHEMA);
+
+ /* connect up global widget */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_display"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), use_global);
+ g_settings_bind (settings,
+ GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
g_signal_connect (widget, "clicked",
- G_CALLBACK (gcm_prefs_checkbutton_global_cb), NULL);
+ G_CALLBACK (gcm_prefs_checkbutton_changed_cb), NULL);
+
+ /* connect up atom widget */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "checkbutton_profile"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), use_atom);
+ g_settings_bind (settings,
+ GCM_SETTINGS_SET_ICC_PROFILE_ATOM,
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
g_signal_connect (widget, "clicked",
- G_CALLBACK (gcm_prefs_checkbutton_profile_cb), NULL);
+ G_CALLBACK (gcm_prefs_checkbutton_changed_cb), NULL);
+
+ /* do we show the fine tuning box */
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "expander_fine_tuning"));
+ g_settings_bind (settings,
+ GCM_SETTINGS_SHOW_FINE_TUNING,
+ widget, "visible",
+ G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
/* do all this after the window has been set up */
g_idle_add (gcm_prefs_startup_phase1_idle_cb, NULL);
@@ -3038,8 +3006,8 @@ out:
g_object_unref (current_device);
if (colorimeter != NULL)
g_object_unref (colorimeter);
- if (gconf_client != NULL)
- g_object_unref (gconf_client);
+ if (settings != NULL)
+ g_object_unref (settings);
if (builder != NULL)
g_object_unref (builder);
if (profile_store != NULL)
diff --git a/src/gcm-profile-store.c b/src/gcm-profile-store.c
index 2972606..a0bd735 100644
--- a/src/gcm-profile-store.c
+++ b/src/gcm-profile-store.c
@@ -31,7 +31,6 @@
#include <glib-object.h>
#include <gio/gio.h>
-#include <gconf/gconf-client.h>
#include "gcm-profile-store.h"
#include "gcm-utils.h"
@@ -56,7 +55,7 @@ struct _GcmProfileStorePrivate
GPtrArray *monitor_array;
GPtrArray *directory_array;
GVolumeMonitor *volume_monitor;
- GConfClient *gconf_client;
+ GSettings *settings;
};
enum {
@@ -405,7 +404,7 @@ gcm_profile_store_add_profiles (GcmProfileStore *profile_store)
gcm_profile_store_add_profiles_for_path (profile_store, "/Library/ColorSync/Profiles/Displays");
/* get OSX and Windows system-wide profiles when using Linux */
- ret = gconf_client_get_bool (priv->gconf_client, GCM_SETTINGS_USE_PROFILES_FROM_VOLUMES, NULL);
+ ret = g_settings_get_boolean (priv->settings, GCM_SETTINGS_USE_PROFILES_FROM_VOLUMES);
if (ret)
gcm_profile_store_add_profiles_from_mounted_volumes (profile_store);
@@ -485,7 +484,7 @@ gcm_profile_store_init (GcmProfileStore *profile_store)
profile_store->priv->profile_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
profile_store->priv->monitor_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref);
profile_store->priv->directory_array = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
- profile_store->priv->gconf_client = gconf_client_get_default ();
+ profile_store->priv->settings = g_settings_new (GCM_SETTINGS_SCHEMA);
/* watch for volumes to be connected */
profile_store->priv->volume_monitor = g_volume_monitor_get ();
@@ -511,7 +510,7 @@ gcm_profile_store_finalize (GObject *object)
g_ptr_array_unref (priv->monitor_array);
g_ptr_array_unref (priv->directory_array);
g_object_unref (priv->volume_monitor);
- g_object_unref (priv->gconf_client);
+ g_object_unref (priv->settings);
G_OBJECT_CLASS (gcm_profile_store_parent_class)->finalize (object);
}
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 14cb119..9c7e459 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -25,7 +25,6 @@
#include <dbus/dbus-glib.h>
#include <gtk/gtk.h>
#include <locale.h>
-#include <gconf/gconf-client.h>
#include <libnotify/notify.h>
#include "egg-debug.h"
@@ -36,7 +35,7 @@
#include "org.gnome.ColorManager.h"
static GMainLoop *loop = NULL;
-static GConfClient *gconf_client = NULL;
+static GSettings *settings = NULL;
#define GCM_DBUS_SERVICE "org.gnome.ColorManager"
#define GCM_DBUS_INTERFACE "org.gnome.ColorManager"
@@ -122,9 +121,9 @@ gcm_session_notify_cb (NotifyNotification *notification, gchar *action, gpointer
GError *error = NULL;
if (g_strcmp0 (action, "display") == 0) {
- gconf_client_set_int (gconf_client, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, 0, NULL);
+ g_settings_set_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, 0);
} else if (g_strcmp0 (action, "printer") == 0) {
- gconf_client_set_int (gconf_client, GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD, 0, NULL);
+ g_settings_set_int (settings, GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD, 0);
} else if (g_strcmp0 (action, "recalibrate") == 0) {
ret = g_spawn_command_line_async ("gcm-prefs", &error);
if (!ret) {
@@ -186,15 +185,15 @@ gcm_session_notify_device (GcmDevice *device)
kind = gcm_device_get_kind (device);
if (kind == GCM_DEVICE_KIND_DISPLAY) {
- /* get from GConf */
- threshold = gconf_client_get_int (gconf_client, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, NULL);
+ /* get from GSettings */
+ threshold = g_settings_get_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD);
/* TRANSLATORS: this is when the display has not been recalibrated in a while */
message = g_strdup_printf (_("The display '%s' should be recalibrated soon."), gcm_device_get_title (device));
} else {
- /* get from GConf */
- threshold = gconf_client_get_int (gconf_client, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD, NULL);
+ /* get from GSettings */
+ threshold = g_settings_get_int (settings, GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD);
/* TRANSLATORS: this is when the printer has not been recalibrated in a while */
message = g_strdup_printf (_("The printer '%s' should be recalibrated soon."), gcm_device_get_title (device));
@@ -270,6 +269,9 @@ main (int argc, char *argv[])
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+ /* use GSettings until dconf is ready */
+ g_setenv ("GSETTINGS_BACKEND", "gconf", FALSE);
+
if (! g_thread_supported ())
g_thread_init (NULL);
dbus_g_thread_init ();
@@ -289,7 +291,7 @@ main (int argc, char *argv[])
gtk_init (&argc, &argv);
/* get the settings */
- gconf_client = gconf_client_get_default ();
+ settings = g_settings_new (GCM_SETTINGS_SCHEMA);
/* monitor devices as they are added */
client = gcm_client_new ();
@@ -323,7 +325,7 @@ main (int argc, char *argv[])
/* wait */
g_main_loop_run (loop);
out:
- g_object_unref (gconf_client);
+ g_object_unref (settings);
g_object_unref (client);
g_main_loop_unref (loop);
g_object_unref (dbus);
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index f40a0ca..5708749 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -29,23 +29,23 @@
#include "gcm-profile.h"
#include "gcm-enum.h"
-#define GCM_STOCK_ICON "gnome-color-manager"
-#define GCM_PROFILE_PATH "/.color/icc"
+#define GCM_STOCK_ICON "gnome-color-manager"
+#define GCM_PROFILE_PATH "/.color/icc"
-#define GCM_SETTINGS_DIR "/apps/gnome-color-manager"
-#define GCM_SETTINGS_DEFAULT_GAMMA "/apps/gnome-color-manager/default_gamma"
-#define GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION "/apps/gnome-color-manager/global_display_correction"
-#define GCM_SETTINGS_SET_ICC_PROFILE_ATOM "/apps/gnome-color-manager/set_icc_profile_atom"
-#define GCM_SETTINGS_RENDERING_INTENT_DISPLAY "/apps/gnome-color-manager/rendering_intent_display"
-#define GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF "/apps/gnome-color-manager/rendering_intent_softproof"
-#define GCM_SETTINGS_COLORSPACE_RGB "/apps/gnome-color-manager/colorspace_rgb"
-#define GCM_SETTINGS_COLORSPACE_CMYK "/apps/gnome-color-manager/colorspace_cmyk"
-#define GCM_SETTINGS_USE_PROFILES_FROM_VOLUMES "/apps/gnome-color-manager/use_profiles_from_volumes"
-#define GCM_SETTINGS_CALIBRATION_LENGTH "/apps/gnome-color-manager/calibration_length"
-#define GCM_SETTINGS_SHOW_FINE_TUNING "/apps/gnome-color-manager/show_fine_tuning"
+#define GCM_SETTINGS_SCHEMA "org.gnome.ColorManager"
+#define GCM_SETTINGS_DEFAULT_GAMMA "default_gamma"
+#define GCM_SETTINGS_GLOBAL_DISPLAY_CORRECTION "global_display_correction"
+#define GCM_SETTINGS_SET_ICC_PROFILE_ATOM "set_icc_profile_atom"
+#define GCM_SETTINGS_RENDERING_INTENT_DISPLAY "rendering_intent_display"
+#define GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF "rendering_intent_softproof"
+#define GCM_SETTINGS_COLORSPACE_RGB "colorspace_rgb"
+#define GCM_SETTINGS_COLORSPACE_CMYK "colorspace_cmyk"
+#define GCM_SETTINGS_USE_PROFILES_FROM_VOLUMES "use_profiles_from_volumes"
+#define GCM_SETTINGS_CALIBRATION_LENGTH "calibration_length"
+#define GCM_SETTINGS_SHOW_FINE_TUNING "show_fine_tuning"
-#define GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD "/apps/gnome-color-manager/recalibrate_printer_threshold"
-#define GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD "/apps/gnome-color-manager/recalibrate_display_threshold"
+#define GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD "recalibrate_printer_threshold"
+#define GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD "recalibrate_display_threshold"
/* DISTROS: you will have to patch if you have changed the name of these packages */
#define GCM_PREFS_PACKAGE_NAME_SHARED_COLOR_TARGETS "shared-color-targets"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]