comparison src/protocols/oscar/oscar.c @ 8143:8633dc570442

[gaim-migrate @ 8851] sf cvs fing sucks. This is the rest of the accessibility stuff from that cool Nathan guy. It makes shift+f10 bring up context menus. Please check over stuff and make sure neither of us broke anything. Also, someone think of a good way to phrase that thing about this that's in the ChangeLog. Thank you, and have a nice day. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 19 Jan 2004 22:40:17 +0000
parents 697221d5d0ff
children 20262ccefdd8
comparison
equal deleted inserted replaced
8142:f2919ca98e78 8143:8633dc570442
4666 /* ABC - Remove from locate list! */ 4666 /* ABC - Remove from locate list! */
4667 return; 4667 return;
4668 } 4668 }
4669 4669
4670 #ifdef NOSSI 4670 #ifdef NOSSI
4671 aim_add_buddy(od->sess, od->conn, name); 4671 aim_buddylist_addbuddy(od->sess, od->conn, name);
4672 #else 4672 #else
4673 if ((od->sess->ssi.received_data) && !(aim_ssi_itemlist_exists(od->sess->ssi.local, name))) { 4673 if ((od->sess->ssi.received_data) && !(aim_ssi_itemlist_exists(od->sess->ssi.local, name))) {
4674 GaimBuddy *buddy = gaim_find_buddy(gc->account, name); 4674 GaimBuddy *buddy = gaim_find_buddy(gc->account, name);
4675 GaimGroup *group = gaim_find_buddys_group(buddy); 4675 GaimGroup *group = gaim_find_buddys_group(buddy);
4676 if (buddy && group) { 4676 if (buddy && group) {
4709 } 4709 }
4710 4710
4711 static void oscar_remove_buddy(GaimConnection *gc, const char *name, const char *group) { 4711 static void oscar_remove_buddy(GaimConnection *gc, const char *name, const char *group) {
4712 OscarData *od = (OscarData *)gc->proto_data; 4712 OscarData *od = (OscarData *)gc->proto_data;
4713 #ifdef NOSSI 4713 #ifdef NOSSI
4714 aim_remove_buddy(od->sess, od->conn, name); 4714 aim_buddylist_removebuddy(od->sess, od->conn, name);
4715 #else 4715 #else
4716 if (od->sess->ssi.received_data) { 4716 if (od->sess->ssi.received_data) {
4717 gaim_debug(GAIM_DEBUG_INFO, "oscar", 4717 gaim_debug(GAIM_DEBUG_INFO, "oscar",
4718 "ssi: deleting buddy %s from group %s\n", name, group); 4718 "ssi: deleting buddy %s from group %s\n", name, group);
4719 aim_ssi_delbuddy(od->sess, name, group); 4719 aim_ssi_delbuddy(od->sess, name, group);
4724 static void oscar_remove_buddies(GaimConnection *gc, GList *buddies, const char *group) { 4724 static void oscar_remove_buddies(GaimConnection *gc, GList *buddies, const char *group) {
4725 OscarData *od = (OscarData *)gc->proto_data; 4725 OscarData *od = (OscarData *)gc->proto_data;
4726 #ifdef NOSSI 4726 #ifdef NOSSI
4727 GList *cur; 4727 GList *cur;
4728 for (cur=buddies; cur; cur=cur->next) 4728 for (cur=buddies; cur; cur=cur->next)
4729 aim_remove_buddy(od->sess, od->conn, cur->data); 4729 aim_buddylist_removebuddy(od->sess, od->conn, cur->data);
4730 #else 4730 #else
4731 if (od->sess->ssi.received_data) { 4731 if (od->sess->ssi.received_data) {
4732 while (buddies) { 4732 while (buddies) {
4733 gaim_debug(GAIM_DEBUG_INFO, "oscar", 4733 gaim_debug(GAIM_DEBUG_INFO, "oscar",
4734 "ssi: deleting buddy %s from group %s\n", (char *)buddies->data, group); 4734 "ssi: deleting buddy %s from group %s\n", (char *)buddies->data, group);
6045 6045
6046 static void oscar_set_permit_deny(GaimConnection *gc) { 6046 static void oscar_set_permit_deny(GaimConnection *gc) {
6047 GaimAccount *account = gaim_connection_get_account(gc); 6047 GaimAccount *account = gaim_connection_get_account(gc);
6048 OscarData *od = (OscarData *)gc->proto_data; 6048 OscarData *od = (OscarData *)gc->proto_data;
6049 #ifdef NOSSI 6049 #ifdef NOSSI
6050 GSList *list, *g = gaim_blist_groups(), *g1; 6050 GSList *list;
6051 char buf[MAXMSGLEN]; 6051 char buf[MAXMSGLEN];
6052 int at; 6052 int at;
6053 6053
6054 switch(account->perm_deny) { 6054 switch(account->perm_deny) {
6055 case 1: 6055 case 1:
6074 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data); 6074 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", (char *)list->data);
6075 list = list->next; 6075 list = list->next;
6076 } 6076 }
6077 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf); 6077 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_DENYADD, buf);
6078 break; 6078 break;
6079 case 5:
6080 g1 = g;
6081 at = 0;
6082 while (g1) {
6083 list = gaim_blist_members((struct group *)g->data);
6084 GSList list1 = list;
6085 while (list1) {
6086 struct buddy *b = list1->data;
6087 if(b->account == account)
6088 at += g_snprintf(buf + at, sizeof(buf) - at, "%s&", b->name);
6089 list1 = list1->next;
6090 }
6091 g_slist_free(list);
6092 g1 = g1->next;
6093 }
6094 g_slist_free(g);
6095 aim_bos_changevisibility(od->sess, od->conn, AIM_VISIBILITYCHANGE_PERMITADD, buf);
6096 break;
6097 default: 6079 default:
6098 break; 6080 break;
6099 } 6081 }
6100 signoff_blocked(gc);
6101 #else 6082 #else
6102 if (od->sess->ssi.received_data) 6083 if (od->sess->ssi.received_data)
6103 aim_ssi_setpermdeny(od->sess, account->perm_deny, 0xffffffff); 6084 aim_ssi_setpermdeny(od->sess, account->perm_deny, 0xffffffff);
6104 #endif 6085 #endif
6105 } 6086 }
6106 6087
6107 static void oscar_add_permit(GaimConnection *gc, const char *who) { 6088 static void oscar_add_permit(GaimConnection *gc, const char *who) {
6108 #ifdef NOSSI 6089 #ifdef NOSSI
6109 if (gc->account->permdeny == 3) 6090 if (gc->account->perm_deny == 3)
6110 oscar_set_permit_deny(gc); 6091 oscar_set_permit_deny(gc);
6111 #else 6092 #else
6112 OscarData *od = (OscarData *)gc->proto_data; 6093 OscarData *od = (OscarData *)gc->proto_data;
6113 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to add a permit\n"); 6094 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to add a permit\n");
6114 if (od->sess->ssi.received_data) 6095 if (od->sess->ssi.received_data)
6116 #endif 6097 #endif
6117 } 6098 }
6118 6099
6119 static void oscar_add_deny(GaimConnection *gc, const char *who) { 6100 static void oscar_add_deny(GaimConnection *gc, const char *who) {
6120 #ifdef NOSSI 6101 #ifdef NOSSI
6121 if (gc->account->permdeny == 4) 6102 if (gc->account->perm_deny == 4)
6122 oscar_set_permit_deny(gc); 6103 oscar_set_permit_deny(gc);
6123 #else 6104 #else
6124 OscarData *od = (OscarData *)gc->proto_data; 6105 OscarData *od = (OscarData *)gc->proto_data;
6125 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to add a deny\n"); 6106 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to add a deny\n");
6126 if (od->sess->ssi.received_data) 6107 if (od->sess->ssi.received_data)
6128 #endif 6109 #endif
6129 } 6110 }
6130 6111
6131 static void oscar_rem_permit(GaimConnection *gc, const char *who) { 6112 static void oscar_rem_permit(GaimConnection *gc, const char *who) {
6132 #ifdef NOSSI 6113 #ifdef NOSSI
6133 if (gc->account->permdeny == 3) 6114 if (gc->account->perm_deny == 3)
6134 oscar_set_permit_deny(gc); 6115 oscar_set_permit_deny(gc);
6135 #else 6116 #else
6136 OscarData *od = (OscarData *)gc->proto_data; 6117 OscarData *od = (OscarData *)gc->proto_data;
6137 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to delete a permit\n"); 6118 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to delete a permit\n");
6138 if (od->sess->ssi.received_data) 6119 if (od->sess->ssi.received_data)
6140 #endif 6121 #endif
6141 } 6122 }
6142 6123
6143 static void oscar_rem_deny(GaimConnection *gc, const char *who) { 6124 static void oscar_rem_deny(GaimConnection *gc, const char *who) {
6144 #ifdef NOSSI 6125 #ifdef NOSSI
6145 if (gc->account->permdeny == 4) 6126 if (gc->account->perm_deny == 4)
6146 oscar_set_permit_deny(gc); 6127 oscar_set_permit_deny(gc);
6147 #else 6128 #else
6148 OscarData *od = (OscarData *)gc->proto_data; 6129 OscarData *od = (OscarData *)gc->proto_data;
6149 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to delete a deny\n"); 6130 gaim_debug(GAIM_DEBUG_INFO, "oscar", "ssi: About to delete a deny\n");
6150 if (od->sess->ssi.received_data) 6131 if (od->sess->ssi.received_data)