Re: colormgr usage and possible bug



Am 24.11.2011 10:30, schrieb Richard Hughes:
Could you give git master a try please? Thanks and be sure to point
out any more bugs you find. :)

Ok, I'm getting further :) Found three more small bugs, which I was able to fix by looking at your commits and making equivalent changes. Patch attached. After patch:


$ colormgr create-profile 'xrandr-NEC Corporation-LCD2690WUXi-88102082ZB-default' normal
Created profile:
Object Path: /org/freedesktop/ColorManager/profiles/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB_default
Owner:          fhoech
Scope:          normal
Gamma Table:    No
Filename:       (null)
Profile ID:     xrandr-NEC Corporation-LCD2690WUXi-88102082ZB-default

$ colormgr profile-set-filename '/org/freedesktop/ColorManager/profiles/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB_default' /home/fhoech/Documents/LCD2690WUXi_2011-08-06.icc

$ colormgr device-add-profile '/org/freedesktop/ColorManager/devices/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB' '/org/freedesktop/ColorManager/profiles/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB_default'

$ colormgr device-make-profile-default '/org/freedesktop/ColorManager/devices/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB' '/org/freedesktop/ColorManager/profiles/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB_default'

$ colormgr device-get-default-profile '/org/freedesktop/ColorManager/devices/xrandr_NEC_Corporation_LCD2690WUXi_88102082ZB' Object Path: /org/freedesktop/ColorManager/profiles/icc_d397bcc01ddcdb3459644bab88f224eb_fhoech
Owner:          fhoech
Typ:            display-device
Colorspace:     rgb
Scope:          normal
Gamma Table:    Yes
Filename:       /home/fhoech/Documents/LCD2690WUXi_2011-08-06.icc
Profile ID:     xrandr-NEC Corporation-LCD2690WUXi-88102082ZB-default
Metadata:       EDID_mnft_id=41784
Metadata:       EDID_serial=88102082ZB
Metadata:       EDID_date=2008-T34
Metadata:       EDID_greeny=0.658203125
Metadata:       EDID_greenx=0.2099609375
Metadata:       prefix=EDID_
Metadata:       Argyll.profcheck.avg.dE76=0.5
Metadata:       EDID_bluey=0.0654296875
Metadata:       EDID_bluex=0.146484375
Metadata:       EDID_redy=0.32421875
Metadata:       EDID_redx=0.658203125
Metadata:       EDID_model=LCD2690WUXi
Metadata:       EDID_model_id=26315
Metadata:       EDID_mnft=NEC
Metadata:       EDID_whitey=0.3291015625
Metadata:       EDID_whitex=0.3134765625
Metadata:       EDID_manufacturer=NEC Corporation
Metadata:       EDID_gamma=2.2


Working fine so far.

--
Florian Höch
diff --git a/client/cd-util.c b/client/cd-util.c
index ce86735..45103b0 100644
--- a/client/cd-util.c
+++ b/client/cd-util.c
@@ -1039,7 +1039,7 @@ cd_util_create_profile (CdUtilPrivate *priv, gchar **values, GError **error)
 	gboolean ret = TRUE;
 	guint mask;
 
-	if (g_strv_length (values) < 3) {
+	if (g_strv_length (values) < 2) {
 		ret = FALSE;
 		g_set_error_literal (error,
 				     1, 0,
@@ -1335,6 +1335,9 @@ cd_util_profile_set_filename (CdUtilPrivate *priv, gchar **values, GError **erro
 	}
 
 	profile = cd_profile_new_with_object_path (values[0]);
+	ret = cd_profile_connect_sync (profile, NULL, error);
+	if (!ret)
+		goto out;
 	ret = cd_profile_set_filename_sync (profile, values[1],
 					    NULL, error);
 	if (!ret)
@@ -1433,6 +1436,9 @@ cd_util_device_get_default_profile (CdUtilPrivate *priv,
 			     values[0]);
 		goto out;
 	}
+	ret = cd_profile_connect_sync (profile, NULL, error);
+	if (!ret)
+		goto out;
 	cd_util_show_profile (profile);
 out:
 	if (device != NULL)


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