[gnome-color-manager] trivial: ensure we get the basename when we use old calibration data
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: ensure we get the basename when we use old calibration data
- Date: Fri, 26 Feb 2010 09:10:47 +0000 (UTC)
commit bf607bc923f533ebdb106930af8951a86904464b
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 26 09:10:17 2010 +0000
trivial: ensure we get the basename when we use old calibration data
src/gcm-calibrate-argyll.c | 4 ++--
src/gcm-calibrate.c | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 2ea58a7..4511e6e 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -1611,7 +1611,7 @@ gcm_calibrate_argyll_set_device_from_ti2 (GcmCalibrate *calibrate, const gchar *
if (device == NULL) {
g_set_error (error,
GCM_CALIBRATE_ERROR,
- GCM_CALIBRATE_ERROR_USER_ABORT,
+ GCM_CALIBRATE_ERROR_NO_DATA,
"cannot find TARGET_INSTRUMENT in %s", filename);
ret = FALSE;
goto out;
@@ -1755,7 +1755,7 @@ gcm_calibrate_argyll_printer (GcmCalibrate *calibrate, GtkWindow *window, GError
gcm_calibrate_dialog_hide (priv->calibrate_dialog);
g_set_error (error,
GCM_CALIBRATE_ERROR,
- GCM_CALIBRATE_ERROR_USER_ABORT,
+ GCM_CALIBRATE_ERROR_NO_DATA,
"cannot find %s", filename);
goto out;
}
diff --git a/src/gcm-calibrate.c b/src/gcm-calibrate.c
index a7a5130..70c3bf3 100644
--- a/src/gcm-calibrate.c
+++ b/src/gcm-calibrate.c
@@ -755,6 +755,7 @@ gcm_calibrate_printer (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
gboolean ret = FALSE;
const gchar *title;
const gchar *message;
+ gchar *ptr;
GtkWindow *window_tmp;
GtkResponseType response;
GcmCalibrateClass *klass = GCM_CALIBRATE_GET_CLASS (calibrate);
@@ -806,6 +807,15 @@ gcm_calibrate_printer (GcmCalibrate *calibrate, GtkWindow *window, GError **erro
ret = FALSE;
goto out;
}
+
+ /* reprogram the basename */
+ g_free (priv->basename);
+ priv->basename = g_path_get_basename (priv->working_path);
+
+ /* remove the timespec */
+ ptr = g_strrstr (priv->basename, " - ");
+ if (ptr != NULL)
+ ptr[0] = '\0';
}
/* coldplug source */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]