comparison src/protocols/yahoo/yahoo.c @ 4729:751c37a940dd

[gaim-migrate @ 5042] compile cleanups, and let those silly gtk2.0 people compile again. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 12 Mar 2003 21:43:39 +0000
parents b9e7ccf21f9c
children 9d3b7b106def
comparison
equal deleted inserted replaced
4728:cf718383cd60 4729:751c37a940dd
1067 1067
1068 static const char *yahoo_status_text(struct buddy *b) 1068 static const char *yahoo_status_text(struct buddy *b)
1069 { 1069 {
1070 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data; 1070 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data;
1071 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) { 1071 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) {
1072 if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM) 1072 if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM)
1073 return yahoo_get_status_string(b->uc >> 2); 1073 return yahoo_get_status_string(b->uc >> 2);
1074 else 1074 else
1075 return g_hash_table_lookup(yd->hash, b->name); 1075 return g_hash_table_lookup(yd->hash, b->name);
1076 } 1076 }
1077 return NULL;
1077 } 1078 }
1078 1079
1079 static char *yahoo_tooltip_text(struct buddy *b) 1080 static char *yahoo_tooltip_text(struct buddy *b)
1080 { 1081 {
1081 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data; 1082 struct yahoo_data *yd = (struct yahoo_data*)b->account->gc->proto_data;
1082 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) { 1083 if (b->uc & UC_UNAVAILABLE && b->uc >> 2 != YAHOO_STATUS_IDLE) {
1083 if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM) 1084 if ((b->uc >> 2) != YAHOO_STATUS_CUSTOM)
1084 return g_strdup(yahoo_get_status_string(b->uc >> 2)); 1085 return g_strdup(yahoo_get_status_string(b->uc >> 2));
1085 else 1086 else
1086 return g_strdup(g_hash_table_lookup(yd->hash, b->name)); 1087 return g_strdup(g_hash_table_lookup(yd->hash, b->name));
1087 } 1088 }
1088 } 1089 return NULL;
1089 1090 }
1091
1090 static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who) 1092 static GList *yahoo_buddy_menu(struct gaim_connection *gc, char *who)
1091 { 1093 {
1092 GList *m = NULL; 1094 GList *m = NULL;
1093 struct proto_buddy_menu *pbm; 1095 struct proto_buddy_menu *pbm;
1094 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data; 1096 struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
1095 struct buddy *b = gaim_find_buddy(gc->account, who); /* this should never be null. if it is, 1097 struct buddy *b = gaim_find_buddy(gc->account, who); /* this should never be null. if it is,
1096 segfault and get the bug report. */ 1098 segfault and get the bug report. */
1097 static char buf[1024];
1098 static char buf2[1024]; 1099 static char buf2[1024];
1099 1100
1100 if (b->uc | YAHOO_STATUS_GAME) { 1101 if (b->uc | YAHOO_STATUS_GAME) {
1101 char *game = g_hash_table_lookup(yd->games, b->name); 1102 char *game = g_hash_table_lookup(yd->games, b->name);
1102 char *room; 1103 char *room;