[gnome-color-manager] Remove all traces of GConf now that we can rely on dconf



commit d309ca2ebdcddbd7c4b5d91b3c0855ef4d49f735
Author: Richard Hughes <richard hughsie com>
Date:   Thu May 20 14:11:09 2010 +0100

    Remove all traces of GConf now that we can rely on dconf

 configure.ac                             |    9 +-
 contrib/gnome-color-manager.spec.in      |    1 +
 data/.gitignore                          |    2 +-
 data/Makefile.am                         |   35 +-----
 data/gnome-color-manager.schemas.in      |  181 ------------------------------
 data/org.gnome.color-manager.gschema.xml |   64 +++++++++++
 po/POTFILES.in                           |    2 +-
 src/gcm-prefs.c                          |    3 -
 src/gcm-session.c                        |    3 -
 src/gcm-utils.h                          |   26 ++--
 10 files changed, 85 insertions(+), 241 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2529d07..bfa23f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,7 +103,6 @@ dnl ---------------------------------------------------------------------------
 GLIB_REQUIRED=2.14.0
 GTK_REQUIRED=2.14.0
 GNOMEDESKTOP_REQUIRED=2.14.0
-GCONF_REQUIRED=2.31.1
 UNIQUE_REQUIRED=1.0.0
 VTE_REQUIRED=0.25.1
 DBUS_GLIB_REQUIRED=0.73
@@ -117,7 +116,6 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gio-2
 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)
-PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED)
 PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
 PKG_CHECK_MODULES(VTE, vte >= $VTE_REQUIRED)
 PKG_CHECK_MODULES(GUDEV, gudev-1.0)
@@ -178,10 +176,8 @@ if test "x$HAVE_CUPS" != "xyes"; then
 	AC_MSG_ERROR([cups-devel is required for gnome-color-manager])
 fi
 
-AC_PATH_PROG(GCONFTOOL, gconftool-2)
-AM_GCONF_SOURCE_2
-AC_SUBST(gsettingsupdateschemacache,
-	`pkg-config --variable gsettingsupdateschemacache gio-2.0`)
+#AC_SUBST(gsettingsupdateschemacache,
+#	`pkg-config --variable gsettingsupdateschemacache gio-2.0`)
 
 dnl ---------------------------------------------------------------------------
 dnl - Make paths available for source files
@@ -273,6 +269,5 @@ echo "
         PackageKit integration:    ${enable_packagekit}
         SANE support:              ${enable_sane}
         building unit tests:       ${enable_tests}
-        gconf-schema dir:          $GCONF_SCHEMA_FILE_DIR
 "
 
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index 2a57d5a..1b6c898 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -15,6 +15,7 @@ Requires:  gnome-icon-theme
 Requires:  shared-mime-info
 Requires:  shared-color-profiles
 Requires:  yelp
+Requires:  dconf
 Requires(post):   scrollkeeper
 Requires(pre):    GConf2
 Requires(post):   GConf2
diff --git a/data/.gitignore b/data/.gitignore
index 4602067..d183873 100644
--- a/data/.gitignore
+++ b/data/.gitignore
@@ -5,6 +5,6 @@ Makefile.in
 *.glade.bak
 *.gladep
 *.gladep.bak
+*.valid
 org.gnome.ColorManager.service
-org.gnome.ColorManager.gschema.xml
 
diff --git a/data/Makefile.am b/data/Makefile.am
index d4ffc60..e2b3ac3 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -4,11 +4,6 @@ SUBDIRS = 						\
 	figures						\
 	icons
 
- INTLTOOL_SCHEMAS_RULE@
-schemadir = $(sysconfdir)/gconf/schemas
-schema_in_files = gnome-color-manager.schemas.in
-schema_DATA = $(schema_in_files:.schemas.in=.schemas)
-
 @INTLTOOL_DESKTOP_RULE@
 desktopdir = $(datadir)/applications
 desktop_in_files =					\
@@ -28,16 +23,8 @@ service_DATA     = $(service_in_files:.service.in=.service)
 $(service_DATA): $(service_in_files) Makefile
 	@sed -e "s|\ servicedir\@|$(bindir)|" $< > $@
 
-# GSETTINGS_RULES@
-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
+ GSETTINGS_RULES@
+gsettings_SCHEMAS = org.gnome.color-manager.gschema.xml
 
 pkgdata_DATA =						\
 	gcm-calibrate.ui				\
@@ -46,33 +33,17 @@ pkgdata_DATA =						\
 	gcm-prefs.ui
 
 EXTRA_DIST =						\
-	$(schema_in_files)				\
+	$(gsettings_SCHEMAS)				\
 	$(service_in_files)				\
 	$(autostart_in_files)				\
 	$(desktop_in_files)				\
 	$(pkgdata_DATA)
 
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
-	$(GCONFTOOL) --makefile-install-rule $(schema_DATA)
-endif
-
-if GCONF_SCHEMAS_INSTALL
-uninstall-local:
-	-GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
-	$(GCONFTOOL) --makefile-uninstall-rule $(schema_DATA)
-endif
-
 clean-local :
 	rm -f *~
 
-CLEANFILES =						\
-	$(gsettingsschema_DATA)
-
 DISTCLEANFILES =					\
 	org.gnome.ColorManager.service			\
-	gnome-color-manager.schemas			\
 	gcm-apply.desktop				\
 	gcm-prefs.desktop				\
 	gcm-import.desktop
diff --git a/data/org.gnome.color-manager.gschema.xml b/data/org.gnome.color-manager.gschema.xml
new file mode 100644
index 0000000..cd0246e
--- /dev/null
+++ b/data/org.gnome.color-manager.gschema.xml
@@ -0,0 +1,64 @@
+<schemalist>
+  <schema id="org.gnome.color-manager" path="/apps/gnome-color-manager/">
+    <key name="default-gamma" type="d">
+      <default>1.0</default>
+      <summary>The default gamma to use for monitors with no previous value set</summary>
+      <description>Gamma is adjusted to affect the color of the attached monitor. Traditionally Linux has used a gamma value of 1.0, but this makes monitors look washed out compared Windows XP or OS X. Apple traditionally used a value of 1.8 for a long time, but now use the same value as Microsoft. Microsoft has always used a value of 2.2.</description>
+    </key>
+    <key name="global-display-correction" type="b">
+      <default>true</default>
+      <summary>Whether the display should be globally corrected or left to applications</summary>
+      <description>If set to TRUE then the video LUT is set with the display profile</description>
+    </key>
+    <key name="use-profiles-from-volumes" type="b">
+      <default>true</default>
+      <summary>Whether ICC profiles should be loaded from external disks</summary>
+      <description>If set to TRUE then external disks are searched for device ICC profiles at startup, for instance looking in the OSX library folder or Windows XP system folders. This may increase startup time if disks need to be spun up to be searched.</description>
+    </key>
+    <key name="set-icc-profile-atom" type="b">
+      <default>true</default>
+      <summary>Set the _ICC_PROFILE hint for applications</summary>
+      <description>If set to TRUE then the __ICC_PROFILE hint will be set, which applications use to convert true color to screen color.</description>
+    </key>
+    <key name="show-fine-tuning" type="b">
+      <default>false</default>
+      <summary>Show the fine tuning controls for display devices</summary>
+      <description>If set to TRUE then the fine tuning controls are visible. This allows the user to change the display profile outside of what the ICC profile suggests and is only recommended for advanced users.</description>
+    </key>
+    <key name="rendering-intent-display" type="s">
+      <default>'perceptual'</default>
+      <summary>The rendering intent to use for the display, e.g. 'perceptual'</summary>
+      <description>The rendering intent to use for the display, e.g. 'perceptual'.</description>
+    </key>
+    <key name="rendering-intent-softproof" type="s">
+      <default>'perceptual'</default>
+      <summary>The rendering intent to use for softproofs, e.g. 'perceptual'</summary>
+      <description>The rendering intent to use for softproofs, e.g. 'perceptual'.</description>
+    </key>
+    <key name="colorspace-rgb" type="s">
+      <default>'/usr/share/color/icc/Argyll/sRGB.icm'</default>
+      <summary>The default RGB profile</summary>
+      <description>The RGB profile filename to be used by applications by default.</description>
+    </key>
+    <key name="colorspace-cmyk" type="s">
+      <default>'/usr/share/color/icc/Fogra27L.icc'</default>
+      <summary>The default CMYK profile</summary>
+      <description>The CMYK profile filename to be used by applications by default.</description>
+    </key>
+    <key name="calibration-length" type="s">
+      <default>'ask'</default>
+      <summary>The default calibration length</summary>
+      <description>The length of calibration, as this is proportional to the accuracy. The option 'short' creates a quick profile, 'normal' a regular one, and 'long' takes a really long time, but is more precise and creates a better profile. Use 'ask' if you want the user to choose.</description>
+    </key>
+    <key name="recalibrate-display-threshold" type="i">
+      <default>15552000</default>
+      <summary>The duration between sending notifications to recalibrate a display</summary>
+      <description>This is the number of seconds in between notifying the user to recalibrate each display device. Set to 0 to disable the notification.</description>
+    </key>
+    <key name="recalibrate-printer-threshold" type="i">
+      <default>15552000</default>
+      <summary>The duration between sending notifications to recalibrate a printer</summary>
+      <description>This is the number of seconds in between notifying the user to recalibrate each printer device. Set to 0 to disable the notification.</description>
+    </key>
+  </schema>
+</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 44d141f..bd74964 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
 data/gcm-apply.desktop.in
 data/gcm-import.desktop.in
 data/gcm-prefs.desktop.in
-data/gnome-color-manager.schemas.in
+data/org.gnome.color-manager.gschema.xml
 policy/org.gnome.color.policy.in
 src/egg-debug.c
 src/gcm-calibrate-argyll.c
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 4dd2ac6..ea4386d 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -2664,9 +2664,6 @@ 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");
diff --git a/src/gcm-session.c b/src/gcm-session.c
index 9c7e459..df2fceb 100644
--- a/src/gcm-session.c
+++ b/src/gcm-session.c
@@ -269,9 +269,6 @@ 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 ();
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 5708749..edf9cd6 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -33,19 +33,19 @@
 #define GCM_PROFILE_PATH				"/.color/icc"
 
 #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_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	"recalibrate_printer_threshold"
-#define GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD	"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]