comparison src/protocols/jabber/buddy.c @ 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 0e4894b3e2a6
children 7c12dab8e513
comparison
equal deleted inserted replaced
7249:a0b66b6fa9ff 7250:dee9f6aebbf3
852 JabberStream *js = gc->proto_data; 852 JabberStream *js = gc->proto_data;
853 853
854 jabber_presence_subscription_set(js, name, "subscribe"); 854 jabber_presence_subscription_set(js, name, "subscribe");
855 } 855 }
856 856
857 static void jabber_buddy_unsubscribe(GaimConnection *gc, const char *name)
858 {
859 JabberStream *js = gc->proto_data;
860
861 jabber_presence_subscription_set(js, name, "unsubscribe");
862 }
863
857 GList *jabber_buddy_menu(GaimConnection *gc, const char *name) 864 GList *jabber_buddy_menu(GaimConnection *gc, const char *name)
858 { 865 {
859 GList *m = NULL; 866 GList *m = NULL;
860 struct proto_buddy_menu *pbm; 867 struct proto_buddy_menu *pbm;
861 JabberStream *js = gc->proto_data; 868 JabberStream *js = gc->proto_data;
880 m = g_list_append(m, pbm); 887 m = g_list_append(m, pbm);
881 } 888 }
882 889
883 if(!(jb->subscription & JABBER_SUB_TO)) { 890 if(!(jb->subscription & JABBER_SUB_TO)) {
884 pbm = g_new0(struct proto_buddy_menu, 1); 891 pbm = g_new0(struct proto_buddy_menu, 1);
885 pbm->label = _("Re-request authorization"); 892 pbm->label = _("(Re-)Request authorization");
886 pbm->callback = jabber_buddy_rerequest_auth; 893 pbm->callback = jabber_buddy_rerequest_auth;
887 pbm->gc = gc; 894 pbm->gc = gc;
888 m = g_list_append(m, pbm); 895 m = g_list_append(m, pbm);
896 } else {
897 pbm = g_new0(struct proto_buddy_menu, 1);
898 pbm->label = _("Unsubscribe");
899 pbm->callback = jabber_buddy_unsubscribe;
900 pbm->gc = gc;
901 m = g_list_append(m, pbm);
889 } 902 }
890 903
891 return m; 904 return m;
892 } 905 }