From: Nathan W. <fac...@us...> - 2003-10-13 18:54:47
|
Update of /cvsroot/gaim/gaim/src/protocols/jabber In directory sc8-pr-cvs1:/tmp/cvs-serv9923 Modified Files: buddy.c Log Message: ability to unsubscribe from a buddy's presence w/o removing them from your list (and thus removing your presence notifications to them) Index: buddy.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/jabber/buddy.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -p -r1.6 -r1.7 --- buddy.c 4 Oct 2003 21:19:29 -0000 1.6 +++ buddy.c 13 Oct 2003 18:54:40 -0000 1.7 @@ -854,6 +854,13 @@ static void jabber_buddy_rerequest_auth( 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,8 +889,14 @@ GList *jabber_buddy_menu(GaimConnection 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); } |