[gnome-color-manager] Support version 0.2 of the OpenIccDirectoryProposal by searching machine-specific writable locations



commit b5f416d1582580f372fea299085eebb0d31710aa
Author: Richard Hughes <richard hughsie com>
Date:   Tue Jun 1 11:53:06 2010 +0100

    Support version 0.2 of the OpenIccDirectoryProposal by searching machine-specific writable locations

 contrib/gnome-color-manager.spec.in |    4 +---
 src/gcm-device-xrandr.c             |    2 +-
 src/gcm-install-system-wide.c       |    2 +-
 src/gcm-profile-store.c             |    6 ++++++
 4 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index 35f9679..c7af52d 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -11,6 +11,7 @@ Group:     Applications/System
 URL:       http://projects.gnome.org/gnome-color-manager/
 Source0:   http://download.gnome.org/sources/gnome-color-manager/2.31/%{name}-%{version}.tar.gz
 
+Requires:  color-filesystem >= 1-7
 Requires:  gnome-icon-theme
 Requires:  shared-mime-info
 Requires:  shared-color-profiles
@@ -114,9 +115,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
 %{_datadir}/GConf/gsettings/org.gnome.color-manager.gschema.migrate
 %{_datadir}/dbus-1/interfaces/org.gnome.ColorManager.xml
 
-# this is probably better in a shared package
-%dir %{_localstatedir}/lib/color
-
 %changelog
 * #LONGDATE# Richard Hughes <richard hughsie com> #VERSION#-0.#BUILD##ALPHATAG#
 - Update from GIT
diff --git a/src/gcm-device-xrandr.c b/src/gcm-device-xrandr.c
index df298c8..485fdce 100644
--- a/src/gcm-device-xrandr.c
+++ b/src/gcm-device-xrandr.c
@@ -497,7 +497,7 @@ gcm_device_xrandr_apply (GcmDevice *device, GError **error)
 	if (profile != NULL)
 		g_object_ref (profile);
 	if (!saved && profile == NULL) {
-		filename_systemwide = g_strdup_printf ("%s/%s.icc", GCM_SYSTEM_PROFILES_DIR, id);
+		filename_systemwide = g_strdup_printf ("%s/icc/%s.icc", GCM_SYSTEM_PROFILES_DIR, id);
 		ret = g_file_test (filename_systemwide, G_FILE_TEST_EXISTS);
 		if (ret) {
 			egg_debug ("using systemwide %s as profile", filename_systemwide);
diff --git a/src/gcm-install-system-wide.c b/src/gcm-install-system-wide.c
index 50e1f07..30051e8 100644
--- a/src/gcm-install-system-wide.c
+++ b/src/gcm-install-system-wide.c
@@ -239,7 +239,7 @@ main (gint argc, gchar *argv[])
 	filename_dest = g_strconcat (id, ".icc", NULL);
 
 	/* absolute source filenames only */
-	dest = g_build_filename (GCM_SYSTEM_PROFILES_DIR, filename_dest, NULL);
+	dest = g_build_filename (GCM_SYSTEM_PROFILES_DIR, "icc", filename_dest, NULL);
 	ret = g_path_is_absolute (dest);
 	if (!ret) {
 		/* TRANSLATORS: only able to install profiles with an absolute path */
diff --git a/src/gcm-profile-store.c b/src/gcm-profile-store.c
index 7d45b52..8e577c0 100644
--- a/src/gcm-profile-store.c
+++ b/src/gcm-profile-store.c
@@ -533,6 +533,12 @@ gcm_profile_store_search_default (GcmProfileStore *profile_store)
 	if (ret)
 		success = TRUE;
 	g_free (path);
+
+	/* get machine specific profiles */
+	ret = gcm_profile_store_search_by_path (profile_store, "/var/lib/color/icc");
+	if (ret)
+		success = TRUE;
+
 	return success;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]