Mercurial > pidgin
diff src/protocols/msn/msn.c @ 5364:379beab3d157
[gaim-migrate @ 5740]
If you have MSN Mobile support, you can now enable or disable it from the
Protocol Actions menu.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 13 May 2003 08:36:36 +0000 |
parents | ebebc833cf77 |
children | a87818e9dc54 |
line wrap: on
line diff
--- a/src/protocols/msn/msn.c Tue May 13 08:03:27 2003 +0000 +++ b/src/protocols/msn/msn.c Tue May 13 08:36:36 2003 +0000 @@ -67,7 +67,7 @@ } static void -msn_set_phone_number(gpointer data, const char *type, const char *entry) +msn_set_prp(gpointer data, const char *type, const char *entry) { struct gaim_connection *gc = data; MsnSession *session = gc->proto_data; @@ -89,22 +89,36 @@ static void msn_set_home_phone_cb(gpointer data, char *entry) { - msn_set_phone_number(data, "PHH", entry); + msn_set_prp(data, "PHH", entry); } static void msn_set_work_phone_cb(gpointer data, char *entry) { - msn_set_phone_number(data, "PHW", entry); + msn_set_prp(data, "PHW", entry); } static void msn_set_mobile_phone_cb(gpointer data, char *entry) { - msn_set_phone_number(data, "PHM", entry); + msn_set_prp(data, "PHM", entry); +} + +static void +__enable_msn_pages_cb(struct gaim_connection *gc) +{ + msn_set_prp(gc, "MOB", "Y"); } static void +__disable_msn_pages_cb(struct gaim_connection *gc) +{ + msn_set_prp(gc, "MOB", "N"); +} + +/* -- */ + +static void msn_show_set_friendly_name(struct gaim_connection *gc) { do_prompt_dialog(_("Set Friendly Name:"), gc->displayname, @@ -141,6 +155,36 @@ gc, msn_set_mobile_phone_cb, NULL); } +#if 0 +static void +msn_show_set_mobile_support(struct gaim_connection *gc) +{ + MsnSession *session = gc->proto_data; + + do_ask_dialog(_("MSN Mobile Support"), + _("Do you want to enable or disable MSN Mobile " + "device support?"), + gc, + _("Enable"), __enable_msn_mobile_cb, + _("Disable"), __disable_msn_mobile_cb, + session->prpl->handle, FALSE); +} +#endif + +static void +msn_show_set_mobile_pages(struct gaim_connection *gc) +{ + MsnSession *session = gc->proto_data; + + do_ask_dialog(_("MSN Mobile Pages"), + _("Do you want to allow or disallow people on your buddy " + "list to send you mobile pages?"), + gc, + _("Allow"), __enable_msn_pages_cb, + _("Disallow"), __disable_msn_pages_cb, + session->prpl->handle, FALSE); +} + /************************************************************************** * Protocol Plugin ops **************************************************************************/ @@ -226,6 +270,8 @@ pam->gc = gc; m = g_list_append(m, pam); + m = g_list_append(m, NULL); + pam = g_new0(struct proto_actions_menu, 1); pam->label = _("Set Home Phone Number"); pam->callback = msn_show_set_home_phone; @@ -244,6 +290,22 @@ pam->gc = gc; m = g_list_append(m, pam); + m = g_list_append(m, NULL); + +#if 0 + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Enable/Disable Mobile Devices"); + pam->callback = msn_show_set_mobile_support; + pam->gc = gc; + m = g_list_append(m, pam); +#endif + + pam = g_new0(struct proto_actions_menu, 1); + pam->label = _("Allow/Disallow Mobile Pages"); + pam->callback = msn_show_set_mobile_pages; + pam->gc = gc; + m = g_list_append(m, pam); + return m; }