comparison src/protocols/yahoo/yahoo.c @ 4687:283fb289c510

[gaim-migrate @ 4998] This is a new buddy list. Lots of things about it just Don't Work. I probably already know about those things, and you'd just be wasting my time in submitting a bug report about it. I decided that instead of getting it to all work perfectly before committing, that I'd get it in cvs, and slowly fix it with regular commits. That way, it's easier to keep track of things, and other developers can help. Plus, I'm getting pissed off at the buddy list and want it to die. It's kinda boring, and doing nothing but the buddy list for such a long time has just gotten me very bitter. After 0.60 is released later this week, Gaim will resume being fun. This week is going to be very stressful, though, I'm sure. Things you ought to know about this buddy list: - It crashes - It leaks - There's no way to edit the buddy list, or access offline buddies - Most of the menus and buttons and whatnot just plain ol' don't work. - Status icons are only implemented for AIM. That's mostly just because I'm lazy. As such, you may want to be wary of updating this. If you do decide to update this, you may want to learn "cvs update -D yesterday" as well :) All the art there is just placeholder art. You probably won't really have as many problems as it sounds like you will from reading this. This message is extra-negative to stress that I don't want to be bothered with complaints about something not working about it :). I'll repeat: If something doesn't work, I probably already know about it. If you want to actually help with something, I'd be delighted to have it. IM me. -s. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Mar 2003 05:30:31 +0000
parents d19872836812
children e19f91053ad0
comparison
equal deleted inserted replaced
4686:a1de8a9c99ba 4687:283fb289c510
473 g_strfreev(split); 473 g_strfreev(split);
474 continue; 474 continue;
475 } 475 }
476 buddies = g_strsplit(split[1], ",", -1); 476 buddies = g_strsplit(split[1], ",", -1);
477 for (bud = buddies; bud && *bud; bud++) 477 for (bud = buddies; bud && *bud; bud++)
478 if (!find_buddy(gc->account, *bud)) { 478 if (!gaim_find_buddy(gc->account, *bud)) {
479 add_buddy(gc->account, split[0], *bud, *bud); 479 struct buddy *b = gaim_buddy_new(gc->account, *bud, NULL);
480 struct group *g = gaim_group_new(split[0]);
481 gaim_blist_add_buddy(b,g,NULL);
480 export = TRUE; 482 export = TRUE;
481 } 483 }
482 g_strfreev(buddies); 484 g_strfreev(buddies);
483 g_strfreev(split); 485 g_strfreev(split);
484 } 486 }
517 if (*stat == '1') 519 if (*stat == '1')
518 serv_got_typing(gc, from, 0, TYPING); 520 serv_got_typing(gc, from, 0, TYPING);
519 else 521 else
520 serv_got_typing_stopped(gc, from); 522 serv_got_typing_stopped(gc, from);
521 } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { 523 } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) {
522 struct buddy *bud = find_buddy(gc->account, from); 524 struct buddy *bud = gaim_find_buddy(gc->account, from);
523 void *free1=NULL, *free2=NULL; 525 void *free1=NULL, *free2=NULL;
524 if (!bud) 526 if (!bud)
525 debug_printf("%s is playing a game, and doesn't want you to know.\n", from); 527 debug_printf("%s is playing a game, and doesn't want you to know.\n", from);
526 if (*stat == '1') { 528 if (*stat == '1') {
527 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) { 529 if (g_hash_table_lookup_extended (yd->games, from, free1, free2)) {
1007 if (gc->inpa) 1009 if (gc->inpa)
1008 gaim_input_remove(gc->inpa); 1010 gaim_input_remove(gc->inpa);
1009 g_free(yd); 1011 g_free(yd);
1010 } 1012 }
1011 1013
1012 static char **yahoo_list_icon(int uc) 1014 static const char *yahoo_list_icon(struct gaim_account *a, struct buddy *b)
1013 { 1015 {
1014 if ((uc >> 2) == YAHOO_STATUS_IDLE) 1016 return "yahoo";
1015 return status_idle_xpm; 1017 }
1016 else if (uc & UC_UNAVAILABLE) 1018 /*
1017 return status_away_xpm; 1019 if ((uc >> 2) == YAHOO_STATUS_IDLE)
1018 else if (uc & YAHOO_STATUS_GAME) 1020 return status_idle_xpm;
1019 return status_game_xpm; 1021 else if (uc & UC_UNAVAILABLE)
1020 return status_here_xpm; 1022 return status_away_xpm;
1021 } 1023 else if (uc & YAHOO_STATUS_GAME)
1024 return status_game_xpm;
1025 return status_here_xpm;
1026 }*/
1022 1027
1023 static char *yahoo_get_status_string(enum yahoo_status a) 1028 static char *yahoo_get_status_string(enum yahoo_status a)
1024 { 1029 {
1025 switch (a) { 1030 switch (a) {
1026 case YAHOO_STATUS_BRB: 1031 case YAHOO_STATUS_BRB:
1067 static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) 1072 static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who)
1068 { 1073 {
1069 GList *m = NULL; 1074 GList *m = NULL;
1070 struct proto_buddy_menu *pbm; 1075 struct proto_buddy_menu *pbm;
1071 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; 1076 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
1072 struct buddy *b = find_buddy(gc->account, who); /* this should never be null. if it is, 1077 struct buddy *b = gaim_find_buddy(gc->account, who); /* this should never be null. if it is,
1073 segfault and get the bug report. */ 1078 segfault and get the bug report. */
1074 static char buf[1024]; 1079 static char buf[1024];
1075 static char buf2[1024]; 1080 static char buf2[1024];
1076 1081
1077 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) { 1082 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) {
1309 char *group = NULL; 1314 char *group = NULL;
1310 1315
1311 if (!yd->logged_in) 1316 if (!yd->logged_in)
1312 return; 1317 return;
1313 1318
1314 g = find_group_by_buddy(find_buddy(gc->account, who)); 1319 g = gaim_find_buddys_group(gaim_find_buddy(gc->account, who));
1315 if (g) 1320 if (g)
1316 group = g->name; 1321 group = g->name;
1317 else 1322 else
1318 group = "Buddies"; 1323 group = "Buddies";
1319 1324