comparison src/protocols/oscar/oscar.c @ 5167:d9073c83a8a0

[gaim-migrate @ 5531] Changed "view history" to "view log" in the conversation windows. This makes it consistent with the right click menu in the buddy list. I chose "log" over "history" because I feel it describes the action more accurately. I also added sweet little status text thingies for oscar people. Most importantly it shows "Not Authorized" for ICQ peeps, but it also shows "Away" and "Not Available" and "Free For Chat" and what not. It's cool. Robot101 suggested it, and it's a leap frog from faceprint's code. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 18 Apr 2003 19:20:45 +0000
parents 354518ac4e11
children f2cd55078be3
comparison
equal deleted inserted replaced
5166:cab5cd204956 5167:d9073c83a8a0
5201 if (yay) 5201 if (yay)
5202 yay[strlen(yay)-1] = '\0'; 5202 yay[strlen(yay)-1] = '\0';
5203 return yay; 5203 return yay;
5204 } 5204 }
5205 5205
5206 static char *oscar_status_text(struct buddy *b) {
5207 struct gaim_connection *gc = b->account->gc;
5208 struct oscar_data *od = gc->proto_data;
5209 gchar *ret = NULL;
5210
5211 if ((b->uc & UC_UNAVAILABLE) || (((b->uc & 0xffff0000) >> 16) & AIM_ICQ_STATE_CHAT)) {
5212 if (isdigit(b->name[0]))
5213 ret = gaim_icq_status((b->uc & 0xffff0000) >> 16);
5214 else
5215 ret = g_strdup(_("Away"));
5216 } else if (!GAIM_BUDDY_IS_ONLINE(b)) {
5217 char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, b->name);
5218 if (aim_ssi_waitingforauth(od->sess->ssi.local, gname, b->name))
5219 ret = g_strdup(_("Not Authorized"));
5220 else
5221 ret = g_strdup(_("Offline"));
5222 }
5223
5224 return ret;
5225 }
5226
5206 /* 5227 /*
5207 * We have just established a socket with the other dude, so set up some handlers. 5228 * We have just established a socket with the other dude, so set up some handlers.
5208 */ 5229 */
5209 static int gaim_odc_initiate(aim_session_t *sess, aim_frame_t *fr, ...) { 5230 static int gaim_odc_initiate(aim_session_t *sess, aim_frame_t *fr, ...) {
5210 struct gaim_connection *gc = sess->aux_data; 5231 struct gaim_connection *gc = sess->aux_data;
5807 ret->options = OPT_PROTO_MAIL_CHECK | OPT_PROTO_BUDDY_ICON | OPT_PROTO_IM_IMAGE; 5828 ret->options = OPT_PROTO_MAIL_CHECK | OPT_PROTO_BUDDY_ICON | OPT_PROTO_IM_IMAGE;
5808 ret->name = g_strdup("AIM/ICQ"); 5829 ret->name = g_strdup("AIM/ICQ");
5809 ret->list_icon = oscar_list_icon; 5830 ret->list_icon = oscar_list_icon;
5810 ret->list_emblems = oscar_list_emblems; 5831 ret->list_emblems = oscar_list_emblems;
5811 ret->tooltip_text = oscar_tooltip_text; 5832 ret->tooltip_text = oscar_tooltip_text;
5833 ret->status_text = oscar_status_text;
5812 ret->away_states = oscar_away_states; 5834 ret->away_states = oscar_away_states;
5813 ret->actions = oscar_actions; 5835 ret->actions = oscar_actions;
5814 ret->buddy_menu = oscar_buddy_menu; 5836 ret->buddy_menu = oscar_buddy_menu;
5815 ret->login = oscar_login; 5837 ret->login = oscar_login;
5816 ret->close = oscar_close; 5838 ret->close = oscar_close;