comparison src/protocols/icq/gaim_icq.c @ 4732:c15e0699acae

[gaim-migrate @ 5047] hopefully this doesn't break anything. - Capabilities are back in the tooltips - Jabber does the neat status thing in the buddy list - jabber "broken" buddies are gone! woohoo! - most of the right-click menu items moved back to where they used to live, but Get Info remains at the top, because that's where it should be. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 13 Mar 2003 06:08:56 +0000
parents e19f91053ad0
children 0ed37c803503
comparison
equal deleted inserted replaced
4731:6f0ecc21db46 4732:c15e0699acae
116 guint status; 116 guint status;
117 char buf[256]; 117 char buf[256];
118 118
119 g_snprintf(buf, sizeof buf, "%lu", uin); 119 g_snprintf(buf, sizeof buf, "%lu", uin);
120 status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1); 120 status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1);
121 serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); 121 serv_got_update(gc, buf, 1, 0, 0, 0, status);
122 } 122 }
123 123
124 static void icq_user_offline(icq_Link *link, unsigned long uin) { 124 static void icq_user_offline(icq_Link *link, unsigned long uin) {
125 struct gaim_connection *gc = link->icq_UserData; 125 struct gaim_connection *gc = link->icq_UserData;
126 char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin); 126 char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin);
127 serv_got_update(gc, buf, 0, 0, 0, 0, 0, 0); 127 serv_got_update(gc, buf, 0, 0, 0, 0, 0);
128 } 128 }
129 129
130 static void icq_user_status(icq_Link *link, unsigned long uin, unsigned long st) { 130 static void icq_user_status(icq_Link *link, unsigned long uin, unsigned long st) {
131 struct gaim_connection *gc = link->icq_UserData; 131 struct gaim_connection *gc = link->icq_UserData;
132 guint status; 132 guint status;
133 char buf[256]; 133 char buf[256];
134 134
135 g_snprintf(buf, sizeof buf, "%lu", uin); 135 g_snprintf(buf, sizeof buf, "%lu", uin);
136 status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1); 136 status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1);
137 serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); 137 serv_got_update(gc, buf, 1, 0, 0, 0, status);
138 } 138 }
139 139
140 static gboolean icq_set_timeout_cb(gpointer data) { 140 static gboolean icq_set_timeout_cb(gpointer data) {
141 icq_HandleTimeout(); 141 icq_HandleTimeout();
142 ack_timer = 0; 142 ack_timer = 0;
460 static void icq_get_info(struct gaim_connection *gc, char *who) { 460 static void icq_get_info(struct gaim_connection *gc, char *who) {
461 struct icq_data *id = (struct icq_data *)gc->proto_data; 461 struct icq_data *id = (struct icq_data *)gc->proto_data;
462 icq_SendInfoReq(id->link, atol(who)); 462 icq_SendInfoReq(id->link, atol(who));
463 } 463 }
464 464
465 static void icq_info(struct gaim_connection *gc, char *who) {
466 serv_get_info(gc, who);
467 }
468
469 static GList *icq_buddy_menu(struct gaim_connection *gc, char *who) {
470 GList *m = NULL;
471 struct proto_buddy_menu *pbm;
472
473 pbm = g_new0(struct proto_buddy_menu, 1);
474 pbm->label = _("Get Info");
475 pbm->callback = icq_info;
476 pbm->gc = gc;
477 m = g_list_append(m, pbm);
478
479 return m;
480 }
481
482 static GList *icq_away_states(struct gaim_connection *gc) { 465 static GList *icq_away_states(struct gaim_connection *gc) {
483 GList *m = NULL; 466 GList *m = NULL;
484 467
485 m = g_list_append(m, "Online"); 468 m = g_list_append(m, "Online");
486 m = g_list_append(m, "Away"); 469 m = g_list_append(m, "Away");
497 struct proto_user_opt *puo; 480 struct proto_user_opt *puo;
498 ret->protocol = PROTO_ICQ; 481 ret->protocol = PROTO_ICQ;
499 ret->name = g_strdup("ICQ"); 482 ret->name = g_strdup("ICQ");
500 ret->list_icon = icq_list_icon; 483 ret->list_icon = icq_list_icon;
501 ret->away_states = icq_away_states; 484 ret->away_states = icq_away_states;
502 ret->buddy_menu = icq_buddy_menu; 485 ret->buddy_menu = NULL;
503 ret->login = icq_login; 486 ret->login = icq_login;
504 ret->close = icq_close; 487 ret->close = icq_close;
505 ret->send_im = icq_send_msg; 488 ret->send_im = icq_send_msg;
506 ret->add_buddy = icq_add_buddy; 489 ret->add_buddy = icq_add_buddy;
507 ret->add_buddies = icq_add_buddies; 490 ret->add_buddies = icq_add_buddies;