diff options
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-msg-composer.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index c2d8899b81..55bfc84492 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1013,13 +1013,16 @@ skip_content: /* Signatures */ 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 == '=') @@ -1029,7 +1032,7 @@ encode_signature_name (const gchar *name) ename = g_new (gchar, len + 1); - s = name; + s = uid; e = ename; while (*s) { if (*s == '"') { @@ -1121,18 +1124,19 @@ get_signature_html (EMsgComposer *composer) if (!signature) return NULL; - 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 = e_run_signature_script ( - signature->filename); + if (e_signature_get_is_script (signature)) + text = e_run_signature_script (filename); else - text = e_read_signature_file ( - signature, TRUE, NULL); + text = e_read_signature_file (signature, TRUE, NULL); } else { EAccount *account; EAccountIdentity *id; @@ -1169,7 +1173,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, |