changeset 24133:3f4b6162995f

Add some strings before string freeze for some not-done code. Should be done before release, I hope. References #6747.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 28 Sep 2008 08:05:07 +0000
parents eeccedae4de5
children aa8ddc4e12af 333f03472486 62c58a297fd2
files libpurple/protocols/msn/userlist.c
diffstat 1 files changed, 28 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/userlist.c	Sun Sep 28 07:50:00 2008 +0000
+++ b/libpurple/protocols/msn/userlist.c	Sun Sep 28 08:05:07 2008 +0000
@@ -610,6 +610,22 @@
 	}
 }
 
+typedef struct {
+	MsnSession *session;
+	char *uid;
+} MsnUserlistABData;
+
+static void
+userlist_ab_delete_cb(void *data, int choice)
+{
+	MsnUserlistABData *ab = (MsnUserlistABData *)data;
+
+	/* msn_delete_contact(ab->session, ab->uid, (gboolean)choice); */
+
+	g_free(ab->uid);
+	g_free(ab);
+}
+
 void
 msn_userlist_rem_buddy(MsnUserList *userlist, const char *who)
 {
@@ -625,7 +641,18 @@
 
 	/* delete the contact from address book via soap action */
 	if (user != NULL) {
-		msn_delete_contact(userlist->session, user->uid);
+		if (0 /*not ready yet*/ && userlist->session->passport_info.email_enabled) {
+			MsnUserlistABData *ab = g_new0(MsnUserlistABData, 1);
+			ab->session = userlist->session;
+			ab->uid = g_strdup(user->uid); /* Not necessary? */
+			purple_request_yes_no(userlist->session->account,
+				_("Delete Buddy from Address Book?"),
+				_("Do you want to delete this buddy from your address book as well?"),
+				user->passport, 0, userlist->session->account, user->passport,
+				NULL, ab,
+				G_CALLBACK(userlist_ab_delete_cb), G_CALLBACK(userlist_ab_delete_cb));
+		} else
+			msn_delete_contact(userlist->session, user->uid);
 	}
 }