Mercurial > pidgin
comparison src/protocols/oscar/oscar.c @ 12919:248b8b39c671
[gaim-migrate @ 15272]
Replace GaimBlistNodeAction with the more generic GaimMenuAction, this is in
preparation for letting the chat room user list have extensible menus like the
blist entries do. (I know it's not exactly the prettiest, and the callback
isn't exactly type-safe, when we eventually gobjectify everything we can get
some safety back by using (GObject, gpointer) but that's for later.)
I'm planning to look into merging GaimPluginActions into GaimMenuActions as
well.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 17 Jan 2006 23:22:19 +0000 |
parents | a05fbd9dcc31 |
children | 82e918444965 |
comparison
equal
deleted
inserted
replaced
12918:a05fbd9dcc31 | 12919:248b8b39c671 |
---|---|
8092 | 8092 |
8093 GaimConnection *gc = gaim_account_get_connection(buddy->account); | 8093 GaimConnection *gc = gaim_account_get_connection(buddy->account); |
8094 OscarData *od = gc->proto_data; | 8094 OscarData *od = gc->proto_data; |
8095 | 8095 |
8096 GList *m = NULL; | 8096 GList *m = NULL; |
8097 GaimBlistNodeAction *act; | 8097 GaimMenuAction *act; |
8098 | 8098 |
8099 act = gaim_blist_node_action_new(_("Edit Buddy Comment"), | 8099 act = gaim_menu_action_new(_("Edit Buddy Comment"), |
8100 oscar_buddycb_edit_comment, NULL, NULL); | 8100 GAIM_CALLBACK(oscar_buddycb_edit_comment), |
8101 NULL, NULL); | |
8101 m = g_list_append(m, act); | 8102 m = g_list_append(m, act); |
8102 | 8103 |
8103 if (od->icq) { | 8104 if (od->icq) { |
8104 #if 0 | 8105 #if 0 |
8105 act = gaim_blist_node_action_new(_("Get Status Msg"), | 8106 act = gaim_menu_action_new(_("Get Status Msg"), |
8106 oscar_get_icqstatusmsg, NULL, NULL); | 8107 GAIM_CALLBACK(oscar_get_icqstatusmsg), |
8108 NULL, NULL); | |
8107 m = g_list_append(m, act); | 8109 m = g_list_append(m, act); |
8108 #endif | 8110 #endif |
8109 } else { | 8111 } else { |
8110 aim_userinfo_t *userinfo; | 8112 aim_userinfo_t *userinfo; |
8111 userinfo = aim_locate_finduserinfo(od->sess, buddy->name); | 8113 userinfo = aim_locate_finduserinfo(od->sess, buddy->name); |
8112 | 8114 |
8113 if (userinfo && aim_sncmp(gaim_account_get_username(buddy->account), buddy->name) && | 8115 if (userinfo && aim_sncmp(gaim_account_get_username(buddy->account), buddy->name) && |
8114 GAIM_BUDDY_IS_ONLINE(buddy)) { | 8116 GAIM_BUDDY_IS_ONLINE(buddy)) { |
8115 | 8117 |
8116 if (userinfo->capabilities & AIM_CAPS_DIRECTIM) { | 8118 if (userinfo->capabilities & AIM_CAPS_DIRECTIM) { |
8117 act = gaim_blist_node_action_new(_("Direct IM"), | 8119 act = gaim_menu_action_new(_("Direct IM"), |
8118 oscar_ask_direct_im, NULL, NULL); | 8120 GAIM_CALLBACK(oscar_ask_direct_im), |
8121 NULL, NULL); | |
8119 m = g_list_append(m, act); | 8122 m = g_list_append(m, act); |
8120 } | 8123 } |
8121 #if 0 | 8124 #if 0 |
8122 if (userinfo->capabilities & AIM_CAPS_GETFILE) { | 8125 if (userinfo->capabilities & AIM_CAPS_GETFILE) { |
8123 act = gaim_blist_node_action_new(_("Get File"), | 8126 act = gaim_menu_action_new(_("Get File"), |
8124 oscar_ask_getfile, NULL, NULL); | 8127 GAIM_CALLBACK(oscar_ask_getfile), |
8128 NULL, NULL); | |
8125 m = g_list_append(m, act); | 8129 m = g_list_append(m, act); |
8126 } | 8130 } |
8127 #endif | 8131 #endif |
8128 } | 8132 } |
8129 } | 8133 } |
8130 | 8134 |
8131 if (od->sess->ssi.received_data) { | 8135 if (od->sess->ssi.received_data) { |
8132 char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, buddy->name); | 8136 char *gname = aim_ssi_itemlist_findparentname(od->sess->ssi.local, buddy->name); |
8133 if (gname && aim_ssi_waitingforauth(od->sess->ssi.local, gname, buddy->name)) { | 8137 if (gname && aim_ssi_waitingforauth(od->sess->ssi.local, gname, buddy->name)) { |
8134 act = gaim_blist_node_action_new(_("Re-request Authorization"), | 8138 act = gaim_menu_action_new(_("Re-request Authorization"), |
8135 gaim_auth_sendrequest_menu, NULL, NULL); | 8139 GAIM_CALLBACK(gaim_auth_sendrequest_menu), |
8140 NULL, NULL); | |
8136 m = g_list_append(m, act); | 8141 m = g_list_append(m, act); |
8137 } | 8142 } |
8138 } | 8143 } |
8139 | 8144 |
8140 return m; | 8145 return m; |