Changeset 0864a52 for protocols/yahoo


Ignore:
Timestamp:
2015-05-28T05:26:30Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
b38f655
Parents:
faeb521
git-author:
dequis <dx@…> (08-05-15 04:16:37)
git-committer:
dequis <dx@…> (28-05-15 05:26:30)
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    rfaeb521 r0864a52  
    959959{
    960960        struct im_connection *ic = byahoo_get_ic_by_id(id);
    961         char *msg;
    962 
    963         if (set_getbool(&ic->acc->set, "mail_notifications")) {
    964                 if (from && subj) {
    965                         msg = g_strdup_printf("Received e-mail message from %s with subject `%s'", from, subj);
    966                 } else if (cnt > 0) {
    967                         msg = g_strdup_printf("Received %d new e-mails", cnt);
    968                 }
    969 
    970                 imcb_notify_email(ic, set_getstr(&ic->acc->set, "notify_handle"), msg, 0, 0);
    971                 g_free(msg);
     961
     962        if (from && subj) {
     963                imcb_notify_email(ic, "Received e-mail message from %s with subject `%s'", from, subj);
     964        } else if (cnt > 0) {
     965                imcb_notify_email(ic, "Received %d new e-mails", cnt);
    972966        }
    973967}
Note: See TracChangeset for help on using the changeset viewer.