diff options
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index d7d9c034c0..926553fdff 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1017,13 +1017,16 @@ e_msg_composer_get_sig_file_content (const gchar *sigfile, gboolean in_html) } static gchar * -encode_signature_name (const gchar *name) +encode_signature_uid (ESignature *signature) { + const gchar *uid; const gchar *s; gchar *ename, *e; gint len = 0; - s = name; + uid = e_signature_get_uid (signature); + + s = uid; while (*s) { len ++; if (*s == '"' || *s == '.' || *s == '=') @@ -1033,7 +1036,7 @@ encode_signature_name (const gchar *name) ename = g_new (gchar, len + 1); - s = name; + s = uid; e = ename; while (*s) { if (*s == '"') { @@ -1155,17 +1158,19 @@ get_signature_html (EMsgComposer *composer) add_delim = add_signature_delim (); - if (!signature->autogen) { - if (!signature->filename) + if (!e_signature_get_autogenerated (signature)) { + const gchar *filename; + + filename = e_signature_get_filename (signature); + if (filename == NULL) return NULL; - format_html = signature->html; + format_html = e_signature_get_is_html (signature); - if (signature->script) { - text = mail_config_signature_run_script (signature->filename); - } else { - text = e_msg_composer_get_sig_file_content (signature->filename, format_html); - } + if (e_signature_get_is_script (signature)) + text = mail_config_signature_run_script (filename); + else + text = e_msg_composer_get_sig_file_content (filename, format_html); } else { EAccount *account; EAccountIdentity *id; @@ -1203,7 +1208,7 @@ get_signature_html (EMsgComposer *composer) gchar *encoded_uid = NULL; if (signature) - encoded_uid = encode_signature_name (signature->uid); + encoded_uid = encode_signature_uid (signature); /* The signature dash convention ("-- \n") is specified in the * "Son of RFC 1036": http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html, |