From d9d3ab7c86ed86701f468ff8d1e1fac33b850431 Mon Sep 17 00:00:00 2001 From: Arne Zellentin Date: Mon, 19 Jun 2006 09:56:58 +0000 Subject: [PATCH] * added REALNAME to identities * some reformat pmo-trunk-r276 --- src/modest-identity-keys.h | 1 + src/modest-identity-mgr.c | 22 +++++++++++++++------- src/modest-identity-mgr.h | 15 ++++++++------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/modest-identity-keys.h b/src/modest-identity-keys.h index 27db9c5..213134d 100644 --- a/src/modest-identity-keys.h +++ b/src/modest-identity-keys.h @@ -11,6 +11,7 @@ /* user identity keys */ #define MODEST_IDENTITY_DISPLAY_NAME "display_name" /* string */ +#define MODEST_IDENTITY_REALNAME "realname" /* string */ #define MODEST_IDENTITY_EMAIL "email" /* string */ #define MODEST_IDENTITY_EMAIL_ALTERNATIVES "email_alternatives" /* string */ #define MODEST_IDENTITY_REPLYTO "replyto" /* string */ diff --git a/src/modest-identity-mgr.c b/src/modest-identity-mgr.c index 998802e..8023900 100644 --- a/src/modest-identity-mgr.c +++ b/src/modest-identity-mgr.c @@ -155,12 +155,13 @@ null_means_empty (const gchar * str) gboolean modest_identity_mgr_add_identity (ModestIdentityMgr * self, - const gchar * name, - const gchar * email, - const gchar * replyto, - const gchar * signature, + const gchar * name, + const gchar * realname, + const gchar * email, + const gchar * replyto, + const gchar * signature, const gboolean use_signature, - const gchar * id_via, + const gchar * id_via, const gboolean use_id_via) { ModestIdentityMgrPrivate *priv; @@ -180,6 +181,12 @@ modest_identity_mgr_add_identity (ModestIdentityMgr * self, //return FALSE; } + /* realname */ + key = g_strconcat (id_key, "/", MODEST_IDENTITY_REALNAME, NULL); + modest_conf_set_string (priv->modest_conf, key, + null_means_empty (realname), NULL); + g_free (key); + /* email */ key = g_strconcat (id_key, "/", MODEST_IDENTITY_EMAIL, NULL); modest_conf_set_string (priv->modest_conf, key, @@ -203,16 +210,17 @@ modest_identity_mgr_add_identity (ModestIdentityMgr * self, modest_conf_set_bool (priv->modest_conf, key, use_signature, NULL); g_free (key); - /* signature */ + /* id_via */ key = g_strconcat (id_key, "/", MODEST_IDENTITY_ID_VIA, NULL); modest_conf_set_string (priv->modest_conf, key, null_means_empty (id_via), NULL); g_free (key); - /* use_signature */ + /* use_id_via */ key = g_strconcat (id_key, "/", MODEST_IDENTITY_USE_ID_VIA, NULL); modest_conf_set_bool (priv->modest_conf, key, use_id_via, NULL); g_free (key); + g_free (id_key); return TRUE; /* FIXME: better error checking */ diff --git a/src/modest-identity-mgr.h b/src/modest-identity-mgr.h index 6d58360..bf8111c 100644 --- a/src/modest-identity-mgr.h +++ b/src/modest-identity-mgr.h @@ -68,13 +68,14 @@ GObject * modest_identity_mgr_new (ModestConf * modest_conf); * Returns: TRUE if succeeded, FALSE otherwise, */ gboolean modest_identity_mgr_add_identity (ModestIdentityMgr * self, - const gchar * name, - const gchar * email, - const gchar * replyto, - const gchar * signature, - const gboolean use_signature, - const gchar * id_via, - const gboolean use_id_via); + const gchar * name, + const gchar * realname, + const gchar * email, + const gchar * replyto, + const gchar * signature, + const gboolean use_signature, + const gchar * id_via, + const gboolean use_id_via); /** -- 1.7.9.5