From 0e371a5a4b290fc2da052003267a87ea7fcb8a01 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Thu, 30 Oct 2008 09:49:24 +0000 Subject: [PATCH] * Fixes NB#91089, added an error code and domain pmo-trunk-r6182 --- src/modest-conf.c | 8 +++++--- src/modest-error.h | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/modest-conf.c b/src/modest-conf.c index ca7d8be..835d287 100644 --- a/src/modest-conf.c +++ b/src/modest-conf.c @@ -33,6 +33,7 @@ #include #include "modest-defs.h" #include "modest-conf.h" +#include "modest-error.h" #include "modest-marshal.h" #include @@ -475,11 +476,12 @@ modest_conf_type_to_gconf_type (ModestConfValueType value_type, GError **err) gconf_type = GCONF_VALUE_STRING; break; default: - /* FIXME: use MODEST_ERROR, and error code */ gconf_type = GCONF_VALUE_INVALID; g_printerr ("modest: invalid list value type %d\n", value_type); - *err = g_error_new_literal (0, 0, "invalid list value type"); - } + *err = g_error_new_literal (MODEST_CONF_ERROR, + MODEST_CONF_ERROR_INVALID_VALUE, + "invalid list value type"); + } return gconf_type; } diff --git a/src/modest-error.h b/src/modest-error.h index e929517..a8620cb 100644 --- a/src/modest-error.h +++ b/src/modest-error.h @@ -36,7 +36,8 @@ G_BEGIN_DECLS typedef enum _ModestErrorDomain { - MODEST_MAIL_OPERATION_ERROR + MODEST_MAIL_OPERATION_ERROR, + MODEST_CONF_ERROR, } ModestErrorDomain; typedef enum _ModestErrorCode { @@ -50,6 +51,8 @@ typedef enum _ModestErrorCode { MODEST_MAIL_OPERATION_ERROR_FILE_IO, /* couldn't retrieve a file to construct a mail */ MODEST_MAIL_OPERATION_ERROR_SEND_QUEUE_ADD_ERROR, MODEST_MAIL_OPERATION_ERROR_LOW_MEMORY, + + MODEST_CONF_ERROR_INVALID_VALUE, } ModestErrorCode; G_END_DECLS -- 1.7.9.5