* added REALNAME to identities
authorArne Zellentin <arne@kernelconcepts.de>
Mon, 19 Jun 2006 09:56:58 +0000 (09:56 +0000)
committerArne Zellentin <arne@kernelconcepts.de>
Mon, 19 Jun 2006 09:56:58 +0000 (09:56 +0000)
* some reformat

pmo-trunk-r276

src/modest-identity-keys.h
src/modest-identity-mgr.c
src/modest-identity-mgr.h

index 27db9c5..213134d 100644 (file)
@@ -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 */
index 998802e..8023900 100644 (file)
@@ -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 */
index 6d58360..bf8111c 100644 (file)
@@ -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);
 
 
 /**