| 722 } |
722 } |
| 723 if (subjects != NULL) { |
723 if (subjects != NULL) { |
| 724 tmp = g_markup_escape_text(*subjects, -1); |
724 tmp = g_markup_escape_text(*subjects, -1); |
| 725 subject_text = g_strdup_printf("%s<b>%s</b>: %s", first ? "<br>" : "", _("Subject"), tmp); |
725 subject_text = g_strdup_printf("%s<b>%s</b>: %s", first ? "<br>" : "", _("Subject"), tmp); |
| 726 g_free(tmp); |
726 g_free(tmp); |
| 727 first = FALSE; |
727 /* this is a dead assignment, but if you add another row you'll |
| |
728 * need it, so I commented it out for now. |
| |
729 */ |
| |
730 /* first = FALSE; */ |
| 728 subjects++; |
731 subjects++; |
| 729 } |
732 } |
| 730 #define SAFE(x) ((x) ? (x) : "") |
733 #define SAFE(x) ((x) ? (x) : "") |
| 731 notification = g_strdup_printf("%s%s%s", SAFE(to_text), SAFE(from_text), SAFE(subject_text)); |
734 notification = g_strdup_printf("%s%s%s", SAFE(to_text), SAFE(from_text), SAFE(subject_text)); |
| 732 #undef SAFE |
735 #undef SAFE |
| 749 } else { |
752 } else { |
| 750 if (count > 0) { |
753 if (count > 0) { |
| 751 notification = g_strdup_printf(ngettext("%s has %d new message.", |
754 notification = g_strdup_printf(ngettext("%s has %d new message.", |
| 752 "%s has %d new messages.", |
755 "%s has %d new messages.", |
| 753 (int)count), |
756 (int)count), |
| 754 *tos, (int)count); |
757 tos != NULL ? *tos : NULL, (int)count); |
| 755 data2 = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, count, FALSE, &new_data); |
758 data2 = pidgin_notify_add_mail(mail_dialog->treemodel, account, notification, urls ? *urls : NULL, count, FALSE, &new_data); |
| 756 if (data2 && new_data) { |
759 if (data2 && new_data) { |
| 757 if (data) |
760 if (data) |
| 758 data->purple_has_handle = FALSE; |
761 data->purple_has_handle = FALSE; |
| 759 data = data2; |
762 data = data2; |