diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-07 05:48:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-07 06:42:42 +0800 |
commit | 740af34bdf59229f5c63b30b5cca6264672f6707 (patch) | |
tree | 153c02805da8ade80f8e0934fcdd529f20d8d4be /composer | |
parent | ba5c9e6f8046f76ffda4a1871d1287f9834d1211 (diff) | |
download | gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.gz gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.tar.zst gsoc2013-evolution-740af34bdf59229f5c63b30b5cca6264672f6707.zip |
Seal up ESignature and add GObject properties.
Diffstat (limited to 'composer')
-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, |