X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-ui-actions.c;h=8076dd9f04cc8ad46a7e72ff655a5181c72c2624;hp=3f1ce95090b570ecb151bd15c98421b2f525a7c3;hb=bd4de972656d134acae12fb14817df1f8ae44589;hpb=b43ff6a1a4137b83ca8975ab18417f6f28abd48f diff --git a/src/modest-ui-actions.c b/src/modest-ui-actions.c index 3f1ce95..8076dd9 100644 --- a/src/modest-ui-actions.c +++ b/src/modest-ui-actions.c @@ -793,6 +793,7 @@ modest_ui_actions_compose_msg(ModestWindow *win, TnyAccount *account = NULL; TnyFolder *folder = NULL; gchar *from_str = NULL, *signature = NULL, *body = NULL; + gchar *recipient = NULL; gboolean use_signature = FALSE; ModestWindow *msg_win = NULL; ModestAccountMgr *mgr = modest_runtime_get_account_mgr(); @@ -831,7 +832,9 @@ modest_ui_actions_compose_msg(ModestWindow *win, goto cleanup; } - signature = modest_account_mgr_get_signature (mgr, account_name, &use_signature); + recipient = modest_text_utils_get_email_address (from_str); + signature = modest_account_mgr_get_signature_from_recipient (mgr, recipient, &use_signature); + g_free (recipient); if (body_str != NULL) { body = use_signature ? g_strconcat(body_str, "\n--\n", signature, NULL) : g_strdup(body_str); } else { @@ -1712,6 +1715,7 @@ reply_forward_cb (ModestMailOperation *mail_op, ModestWindowMgr *mgr = NULL; gchar *signature = NULL; gboolean use_signature; + gchar *recipient; /* If there was any error. The mail operation could be NULL, this means that we already have the message downloaded and @@ -1722,9 +1726,11 @@ reply_forward_cb (ModestMailOperation *mail_op, from = modest_account_mgr_get_from_string (modest_runtime_get_account_mgr(), rf_helper->account_name, rf_helper->mailbox); - signature = modest_account_mgr_get_signature (modest_runtime_get_account_mgr(), - rf_helper->account_name, - &use_signature); + recipient = modest_text_utils_get_email_address (from); + signature = modest_account_mgr_get_signature_from_recipient (modest_runtime_get_account_mgr(), + recipient, + &use_signature); + g_free (recipient); /* Create reply mail */ switch (rf_helper->action) {