From 0864a524c9fd1184874d550216beb49f6a0bef55 Mon Sep 17 00:00:00 2001 From: dequis Date: Fri, 8 May 2015 01:16:37 -0300 Subject: imcb_notify_email: change parameters to take a format string Saves some messing with g_strdup_printf for the callers, and flags/sent_at weren't used anyway. Also check if the mail_notifications setting is enabled --- protocols/msn/ns.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'protocols/msn/ns.c') diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 130f1c91..766c31e1 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -393,11 +393,9 @@ int msn_ns_message(struct msn_data *md, char *msg, int msglen, char **cmd, int n char *folders = get_rfc822_header(body, "Folders-Unread:", blen); if (inbox && folders) { - char *msg = g_strdup_printf( + imcb_notify_email(ic, "INBOX contains %s new messages, plus %s messages in other folders.", inbox, folders); - imcb_notify_email(ic, set_getstr(&ic->acc->set, "notify_handle"), msg, 0, 0); - g_free(msg); } g_free(inbox); @@ -409,10 +407,7 @@ int msn_ns_message(struct msn_data *md, char *msg, int msglen, char **cmd, int n char *fromname = get_rfc822_header(body, "From:", blen); if (from && fromname) { - char *msg = g_strdup_printf("Received an e-mail message from %s <%s>.", - fromname, from); - imcb_notify_email(ic, set_getstr(&ic->acc->set, "notify_handle"), msg, 0, 0); - g_free(msg); + imcb_notify_email(ic, "Received an e-mail message from %s <%s>.", fromname, from); } g_free(from); -- cgit v1.2.3