[gnome-color-manager] Detect an sample misread from argyllcms and try to recover
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Detect an sample misread from argyllcms and try to recover
- Date: Fri, 24 Feb 2012 18:04:11 +0000 (UTC)
commit c9d13b3d653d1f941ee07b691b018bf618bc4f65
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 24 15:34:56 2012 +0000
Detect an sample misread from argyllcms and try to recover
src/gcm-calibrate-argyll.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 624aba3..c38aebf 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -2154,6 +2154,30 @@ gcm_calibrate_argyll_process_output_cmd (GcmCalibrateArgyll *calibrate_argyll, c
goto out;
}
+ /* reading sample */
+ if (g_str_has_prefix (line, "Sample read failed due to misread")) {
+ /* TRANSLATORS: dialog title */
+ gcm_calibrate_set_title (GCM_CALIBRATE (calibrate_argyll),
+ _("Reading sample"));
+
+ /* TRANSLATORS: message, no firmware is available */
+ gcm_calibrate_set_message (GCM_CALIBRATE (calibrate_argyll),
+ _("Failed to read the color sample correctly."));
+
+ /* set state */
+ priv->argyllcms_ok = "\n";
+ priv->state = GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_STDIN;
+ gcm_calibrate_interaction_required (GCM_CALIBRATE (calibrate_argyll), _("Retry"));
+
+ /* play sound from the naming spec */
+ ca_context_play (ca_gtk_context_get (), 0,
+ CA_PROP_EVENT_ID, "dialog-warning",
+ /* TRANSLATORS: this is the application name for libcanberra */
+ CA_PROP_APPLICATION_NAME, _("GNOME Color Manager"),
+ CA_PROP_EVENT_DESCRIPTION, "failed to read sample", NULL);
+ goto out;
+ }
+
/* reading strip */
if (g_str_has_prefix (line, "(Warning) Seem to have read strip pass ")) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]