Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.c @ 16439:08db93bbd798
Added account, who, and conversation parameters to the request API calls, and updated all code to match. I can't compile the Perl module, so I'd appreciate it if someone who knows it would verify that this doesn't break Perl.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 26 Apr 2007 12:25:49 +0000 |
parents | e058328dc954 |
children | 5e47b3427b28 |
comparison
equal
deleted
inserted
replaced
16435:a46a0362dc34 | 16439:08db93bbd798 |
---|---|
983 static void | 983 static void |
984 yahoo_buddy_add_deny_reason_cb(struct yahoo_add_request *add_req) { | 984 yahoo_buddy_add_deny_reason_cb(struct yahoo_add_request *add_req) { |
985 purple_request_input(add_req->gc, NULL, _("Authorization denied message:"), | 985 purple_request_input(add_req->gc, NULL, _("Authorization denied message:"), |
986 NULL, _("No reason given."), TRUE, FALSE, NULL, | 986 NULL, _("No reason given."), TRUE, FALSE, NULL, |
987 _("OK"), G_CALLBACK(yahoo_buddy_add_deny_cb), | 987 _("OK"), G_CALLBACK(yahoo_buddy_add_deny_cb), |
988 _("Cancel"), G_CALLBACK(yahoo_buddy_add_deny_noreason_cb), add_req); | 988 _("Cancel"), G_CALLBACK(yahoo_buddy_add_deny_noreason_cb), |
989 purple_connection_get_account(add_req->gc), add_req->who, NULL, | |
990 add_req); | |
989 } | 991 } |
990 | 992 |
991 static void yahoo_buddy_added_us(PurpleConnection *gc, struct yahoo_packet *pkt) { | 993 static void yahoo_buddy_added_us(PurpleConnection *gc, struct yahoo_packet *pkt) { |
992 struct yahoo_add_request *add_req; | 994 struct yahoo_add_request *add_req; |
993 char *msg = NULL; | 995 char *msg = NULL; |
1888 case 12: | 1890 case 12: |
1889 b = purple_find_buddy(gc->account, who); | 1891 b = purple_find_buddy(gc->account, who); |
1890 g_snprintf(buf, sizeof(buf), _("You have tried to ignore %s, but the " | 1892 g_snprintf(buf, sizeof(buf), _("You have tried to ignore %s, but the " |
1891 "user is on your buddy list. Clicking \"Yes\" " | 1893 "user is on your buddy list. Clicking \"Yes\" " |
1892 "will remove and ignore the buddy."), who); | 1894 "will remove and ignore the buddy."), who); |
1893 purple_request_yes_no(gc, NULL, _("Ignore buddy?"), buf, 0, b, | 1895 purple_request_yes_no(gc, NULL, _("Ignore buddy?"), buf, 0, |
1896 gc->account, who, NULL, | |
1897 b, | |
1894 G_CALLBACK(ignore_buddy), | 1898 G_CALLBACK(ignore_buddy), |
1895 G_CALLBACK(keep_buddy)); | 1899 G_CALLBACK(keep_buddy)); |
1896 break; | 1900 break; |
1897 case 2: | 1901 case 2: |
1898 case 3: | 1902 case 3: |
3220 } | 3224 } |
3221 | 3225 |
3222 static void yahoo_show_act_id(PurplePluginAction *action) | 3226 static void yahoo_show_act_id(PurplePluginAction *action) |
3223 { | 3227 { |
3224 PurpleConnection *gc = (PurpleConnection *) action->context; | 3228 PurpleConnection *gc = (PurpleConnection *) action->context; |
3229 /* XXX Typo: This should be _("Activate which ID?") - fix after string freeze is over */ | |
3225 purple_request_input(gc, NULL, _("Active which ID?"), NULL, | 3230 purple_request_input(gc, NULL, _("Active which ID?"), NULL, |
3226 purple_connection_get_display_name(gc), FALSE, FALSE, NULL, | 3231 purple_connection_get_display_name(gc), FALSE, FALSE, NULL, |
3227 _("OK"), G_CALLBACK(yahoo_act_id), | 3232 _("OK"), G_CALLBACK(yahoo_act_id), |
3228 _("Cancel"), NULL, gc); | 3233 _("Cancel"), NULL, |
3234 purple_connection_get_account(gc), NULL, NULL, | |
3235 gc); | |
3229 } | 3236 } |
3230 | 3237 |
3231 static void yahoo_show_chat_goto(PurplePluginAction *action) | 3238 static void yahoo_show_chat_goto(PurplePluginAction *action) |
3232 { | 3239 { |
3233 PurpleConnection *gc = (PurpleConnection *) action->context; | 3240 PurpleConnection *gc = (PurpleConnection *) action->context; |
3234 purple_request_input(gc, NULL, _("Join who in chat?"), NULL, | 3241 purple_request_input(gc, NULL, _("Join who in chat?"), NULL, |
3235 "", FALSE, FALSE, NULL, | 3242 "", FALSE, FALSE, NULL, |
3236 _("OK"), G_CALLBACK(yahoo_chat_goto), | 3243 _("OK"), G_CALLBACK(yahoo_chat_goto), |
3237 _("Cancel"), NULL, gc); | 3244 _("Cancel"), NULL, |
3245 purple_connection_get_account(gc), NULL, NULL, | |
3246 gc); | |
3238 } | 3247 } |
3239 | 3248 |
3240 static GList *yahoo_actions(PurplePlugin *plugin, gpointer context) { | 3249 static GList *yahoo_actions(PurplePlugin *plugin, gpointer context) { |
3241 GList *m = NULL; | 3250 GList *m = NULL; |
3242 PurplePluginAction *act; | 3251 PurplePluginAction *act; |