aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-07 05:48:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-07 08:00:49 +0800
commit052e89dd423b5ba2f394f55c2fcc48102e7b9bc3 (patch)
tree1e619c123276e604996423df38a2bffafd28b633 /composer
parent6a2b0904893199ceb5b291405721845fd17a08db (diff)
downloadgsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.gz
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.bz2
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.lz
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.xz
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.tar.zst
gsoc2013-evolution-052e89dd423b5ba2f394f55c2fcc48102e7b9bc3.zip
Seal up ESignature and add GObject properties.
Diffstat (limited to 'composer')
-rw-r--r--composer/e-msg-composer.c28
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,