comparison libpurple/protocols/yahoo/libymsg.c @ 27531:07d09a987b86

Allow setting some personal information for an account. Currently the name and phone number(s) can be set. It's possible to set a lot of information about a Yahoo! account that can be set for an XMPP account, but the list looked too huge for me. So I just picked the ones that I thought could be useful. Someone might want to know about the birthdays too ... I don't know. Someone should test this on Yahoo! JAPAN (why not 'Japan', by the way?)
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 10 Jul 2009 15:18:09 +0000
parents b00f138c850a
children 708c7edba73b f92d37b363c6
comparison
equal deleted inserted replaced
27530:1b580473e753 27531:07d09a987b86
3536 g_free(yd->pending_chat_id); 3536 g_free(yd->pending_chat_id);
3537 g_free(yd->pending_chat_topic); 3537 g_free(yd->pending_chat_topic);
3538 g_free(yd->pending_chat_goto); 3538 g_free(yd->pending_chat_goto);
3539 g_strfreev(yd->profiles); 3539 g_strfreev(yd->profiles);
3540 3540
3541 yahoo_personal_details_reset(&yd->ypd);
3542
3541 g_free(yd->current_list15_grp); 3543 g_free(yd->current_list15_grp);
3542 3544
3543 g_free(yd); 3545 g_free(yd);
3544 gc->proto_data = NULL; 3546 gc->proto_data = NULL;
3545 } 3547 }
4010 const char *yahoo_mail_url = (yd->jp ? YAHOOJP_MAIL_URL : YAHOO_MAIL_URL); 4012 const char *yahoo_mail_url = (yd->jp ? YAHOOJP_MAIL_URL : YAHOO_MAIL_URL);
4011 purple_debug_error("yahoo", 4013 purple_debug_error("yahoo",
4012 "Unable to request mail login token; forwarding to login screen."); 4014 "Unable to request mail login token; forwarding to login screen.");
4013 purple_notify_uri(gc, yahoo_mail_url); 4015 purple_notify_uri(gc, yahoo_mail_url);
4014 } 4016 }
4015 4017 }
4016 } 4018
4017 4019 static void
4020 yahoo_set_userinfo_fn(PurplePluginAction *action)
4021 {
4022 yahoo_set_userinfo(action->context);
4023 }
4018 4024
4019 static void yahoo_show_act_id(PurplePluginAction *action) 4025 static void yahoo_show_act_id(PurplePluginAction *action)
4020 { 4026 {
4021 PurpleRequestFields *fields; 4027 PurpleRequestFields *fields;
4022 PurpleRequestFieldGroup *group; 4028 PurpleRequestFieldGroup *group;
4058 } 4064 }
4059 4065
4060 GList *yahoo_actions(PurplePlugin *plugin, gpointer context) { 4066 GList *yahoo_actions(PurplePlugin *plugin, gpointer context) {
4061 GList *m = NULL; 4067 GList *m = NULL;
4062 PurplePluginAction *act; 4068 PurplePluginAction *act;
4069
4070 act = purple_plugin_action_new(_("Set User Info..."),
4071 yahoo_set_userinfo_fn);
4072 m = g_list_append(m, act);
4063 4073
4064 act = purple_plugin_action_new(_("Activate ID..."), 4074 act = purple_plugin_action_new(_("Activate ID..."),
4065 yahoo_show_act_id); 4075 yahoo_show_act_id);
4066 m = g_list_append(m, act); 4076 m = g_list_append(m, act);
4067 4077