[gnome-color-manager] trivial: support calibration sheets with more than 26 columns (AA and above)



commit 208342ee656f0698fc579fea0071a1c75f5c81a3
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 2 19:24:05 2010 +0000

    trivial: support calibration sheets with more than 26 columns (AA and above)

 src/gcm-calibrate-argyll.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index b4c288e..8ed7f64 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -2183,6 +2183,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	const gchar *message;
 	GString *string = NULL;
 	gchar *found;
+	gchar **split = NULL;
 	gboolean ret = TRUE;
 	GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
 
@@ -2343,8 +2344,12 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	/* reading strip */
 	if (g_str_has_prefix (line, "(Warning) Seem to have read strip pass ")) {
 
+		/* find the strip we read, and the one we wanted */
+		split = g_strsplit (line, " ", -1);
+		g_strdelimit (split[10], "!", '\0');
+
 		/* TRANSLATORS: dialog title, where %s is a letter like 'A' */
-		title_str = g_strdup_printf (_("Read strip %c rather than %c!"), line[39], line[39+14]);
+		title_str = g_strdup_printf (_("Read strip %s rather than %s!"), split[7], split[10]);
 
 		string = g_string_new ("");
 
@@ -2406,6 +2411,7 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
 	egg_warning ("VTE: could not screenscrape: %s", line);
 out:
 	g_free (title_str);
+	g_strfreev (split);
 	if (string != NULL)
 		g_string_free (string, TRUE);
 	return ret;



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