changeset 7250:dee9f6aebbf3

[gaim-migrate @ 7827] ability to unsubscribe from a buddy's presence w/o removing them from your list (and thus removing your presence notifications to them) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Mon, 13 Oct 2003 18:54:40 +0000
parents a0b66b6fa9ff
children bdf0e5f71124
files src/protocols/jabber/buddy.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c	Mon Oct 13 18:46:05 2003 +0000
+++ b/src/protocols/jabber/buddy.c	Mon Oct 13 18:54:40 2003 +0000
@@ -854,6 +854,13 @@
 	jabber_presence_subscription_set(js, name, "subscribe");
 }
 
+static void jabber_buddy_unsubscribe(GaimConnection *gc, const char *name)
+{
+	JabberStream *js = gc->proto_data;
+
+	jabber_presence_subscription_set(js, name, "unsubscribe");
+}
+
 GList *jabber_buddy_menu(GaimConnection *gc, const char *name)
 {
 	GList *m = NULL;
@@ -882,10 +889,16 @@
 
 	if(!(jb->subscription & JABBER_SUB_TO)) {
 		pbm = g_new0(struct proto_buddy_menu, 1);
-		pbm->label = _("Re-request authorization");
+		pbm->label = _("(Re-)Request authorization");
 		pbm->callback = jabber_buddy_rerequest_auth;
 		pbm->gc = gc;
 		m = g_list_append(m, pbm);
+	} else {
+		pbm = g_new0(struct proto_buddy_menu, 1);
+		pbm->label = _("Unsubscribe");
+		pbm->callback = jabber_buddy_unsubscribe;
+		pbm->gc = gc;
+		m = g_list_append(m, pbm);
 	}
 
 	return m;