[gnome-color-manager/colord] Do not ask the user whether to strip the alpha channel during calibration, JFDI
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/colord] Do not ask the user whether to strip the alpha channel during calibration, JFDI
- Date: Fri, 11 Feb 2011 16:25:56 +0000 (UTC)
commit e0d28ab590d7e247d68b3b88c0cc39a32b984838
Author: Richard Hughes <richard hughsie com>
Date: Fri Feb 11 13:43:42 2011 +0000
Do not ask the user whether to strip the alpha channel during calibration, JFDI
src/gcm-calibrate-argyll.c | 41 ++++-------------------------------------
1 files changed, 4 insertions(+), 37 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 2c9b9fc..b9f9ed6 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -2040,17 +2040,13 @@ out:
static gboolean
gcm_calibrate_argyll_check_and_remove_alpha (GcmCalibrateArgyll *calibrate_argyll, GError **error)
{
+ const gchar *working_path;
gboolean ret = TRUE;
- GdkPixbuf *pixbuf = NULL;
- GdkPixbuf *pixbuf_new = NULL;
- gchar *reference_image = NULL;
gchar *basename = NULL;
- const gchar *working_path;
gchar *filename = NULL;
- const gchar *title;
- GString *string = NULL;
- GtkResponseType response;
- GcmCalibrateArgyllPrivate *priv = calibrate_argyll->priv;
+ gchar *reference_image = NULL;
+ GdkPixbuf *pixbuf_new = NULL;
+ GdkPixbuf *pixbuf = NULL;
/* get shared data */
g_object_get (calibrate_argyll,
@@ -2073,33 +2069,6 @@ gcm_calibrate_argyll_check_and_remove_alpha (GcmCalibrateArgyll *calibrate_argyl
if (!gdk_pixbuf_get_has_alpha (pixbuf))
goto out;
- /* TRANSLATORS: the supplied image contains an alpha channel which we have to strip out */
- title = _("Image is not suitable without conversion");
-
- /* TRANSLATORS: dialog message */
- string = g_string_new (_("The supplied image contains an alpha channel which the profiling tools do not understand."));
- g_string_append (string, "\n\n");
-
- /* TRANSLATORS: dialog message */
- g_string_append (string, _("It is normally safe to convert the image, although you should ensure that the generated profile is valid."));
-
- /* push new messages into the UI */
- gcm_calibrate_dialog_show (priv->calibrate_dialog, GCM_CALIBRATE_DIALOG_TAB_GENERIC, title, string->str);
- gcm_calibrate_dialog_set_show_button_ok (priv->calibrate_dialog, TRUE);
- gcm_calibrate_dialog_set_show_expander (priv->calibrate_dialog, FALSE);
- /* TRANSLATORS: button text to convert the RGBA image into RGB */
- gcm_calibrate_dialog_set_button_ok_id (priv->calibrate_dialog, _("Convert"));
- response = gcm_calibrate_dialog_run (priv->calibrate_dialog);
- if (response != GTK_RESPONSE_OK) {
- gcm_calibrate_dialog_hide (priv->calibrate_dialog);
- g_set_error_literal (error,
- GCM_CALIBRATE_ERROR,
- GCM_CALIBRATE_ERROR_USER_ABORT,
- "user did not convert RGBA into RGB");
- ret = FALSE;
- goto out;
- }
-
/* remove the alpha channel */
pixbuf_new = gcm_calibrate_argyll_pixbuf_remove_alpha (pixbuf);
if (pixbuf_new == NULL) {
@@ -2120,8 +2089,6 @@ out:
g_free (filename);
g_free (basename);
g_free (reference_image);
- if (string != NULL)
- g_string_free (string, TRUE);
if (pixbuf != NULL)
g_object_unref (pixbuf);
if (pixbuf_new != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]