changeset 21767:7ac87187bbec

Don't show a 'you ain't got no new mail' notification.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 04 Dec 2007 22:20:18 +0000
parents 8c1bcaaaac34
children 6fe5e9e85979
files libpurple/protocols/msn/notification.c libpurple/protocols/msn/oim.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Tue Dec 04 09:32:22 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Tue Dec 04 22:20:18 2007 +0000
@@ -1777,7 +1777,7 @@
 			passport = msn_user_get_passport(session->user);
 			url = session->passport_info.file;
 
-			purple_notify_emails(gc, atoi(unread), FALSE, NULL, NULL,
+			purple_notify_emails(gc, count, FALSE, NULL, NULL,
 							   &passport, &url, NULL, NULL);
 		}
 	}
@@ -1850,7 +1850,7 @@
 			passport = msn_user_get_passport(session->user);
 			url = session->passport_info.file;
 
-			purple_notify_emails(gc, atoi(unread), FALSE, NULL, NULL,
+			purple_notify_emails(gc, count, FALSE, NULL, NULL,
 							   &passport, &url, NULL, NULL);
 		}
 	}
--- a/libpurple/protocols/msn/oim.c	Tue Dec 04 09:32:22 2007 +0000
+++ b/libpurple/protocols/msn/oim.c	Tue Dec 04 22:20:18 2007 +0000
@@ -488,10 +488,12 @@
 		char *unread = xmlnode_get_data(iu_node);
 		const char *passport = msn_user_get_passport(session->user);
 		const char *url = session->passport_info.file;
+		int count = atoi(unread);
 
 		/* XXX/khc: pretty sure this is wrong */
-		purple_notify_emails(session->account->gc, atoi(unread), FALSE, NULL,
-			NULL, &passport, &url, NULL, NULL);
+		if (count > 0)
+			purple_notify_emails(session->account->gc, count, FALSE, NULL,
+				NULL, &passport, &url, NULL, NULL);
 		g_free(unread);
 	}