Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
5363:ebebc833cf77 | 5364:379beab3d157 |
---|---|
65 signoff(gc); | 65 signoff(gc); |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 static void | 69 static void |
70 msn_set_phone_number(gpointer data, const char *type, const char *entry) | 70 msn_set_prp(gpointer data, const char *type, const char *entry) |
71 { | 71 { |
72 struct gaim_connection *gc = data; | 72 struct gaim_connection *gc = data; |
73 MsnSession *session = gc->proto_data; | 73 MsnSession *session = gc->proto_data; |
74 char outparams[MSN_BUF_LEN]; | 74 char outparams[MSN_BUF_LEN]; |
75 | 75 |
87 } | 87 } |
88 | 88 |
89 static void | 89 static void |
90 msn_set_home_phone_cb(gpointer data, char *entry) | 90 msn_set_home_phone_cb(gpointer data, char *entry) |
91 { | 91 { |
92 msn_set_phone_number(data, "PHH", entry); | 92 msn_set_prp(data, "PHH", entry); |
93 } | 93 } |
94 | 94 |
95 static void | 95 static void |
96 msn_set_work_phone_cb(gpointer data, char *entry) | 96 msn_set_work_phone_cb(gpointer data, char *entry) |
97 { | 97 { |
98 msn_set_phone_number(data, "PHW", entry); | 98 msn_set_prp(data, "PHW", entry); |
99 } | 99 } |
100 | 100 |
101 static void | 101 static void |
102 msn_set_mobile_phone_cb(gpointer data, char *entry) | 102 msn_set_mobile_phone_cb(gpointer data, char *entry) |
103 { | 103 { |
104 msn_set_phone_number(data, "PHM", entry); | 104 msn_set_prp(data, "PHM", entry); |
105 } | 105 } |
106 | |
107 static void | |
108 __enable_msn_pages_cb(struct gaim_connection *gc) | |
109 { | |
110 msn_set_prp(gc, "MOB", "Y"); | |
111 } | |
112 | |
113 static void | |
114 __disable_msn_pages_cb(struct gaim_connection *gc) | |
115 { | |
116 msn_set_prp(gc, "MOB", "N"); | |
117 } | |
118 | |
119 /* -- */ | |
106 | 120 |
107 static void | 121 static void |
108 msn_show_set_friendly_name(struct gaim_connection *gc) | 122 msn_show_set_friendly_name(struct gaim_connection *gc) |
109 { | 123 { |
110 do_prompt_dialog(_("Set Friendly Name:"), gc->displayname, | 124 do_prompt_dialog(_("Set Friendly Name:"), gc->displayname, |
137 MsnSession *session = gc->proto_data; | 151 MsnSession *session = gc->proto_data; |
138 | 152 |
139 do_prompt_dialog(_("Set Mobile Phone Number:"), | 153 do_prompt_dialog(_("Set Mobile Phone Number:"), |
140 msn_user_get_mobile_phone(session->user), | 154 msn_user_get_mobile_phone(session->user), |
141 gc, msn_set_mobile_phone_cb, NULL); | 155 gc, msn_set_mobile_phone_cb, NULL); |
156 } | |
157 | |
158 #if 0 | |
159 static void | |
160 msn_show_set_mobile_support(struct gaim_connection *gc) | |
161 { | |
162 MsnSession *session = gc->proto_data; | |
163 | |
164 do_ask_dialog(_("MSN Mobile Support"), | |
165 _("Do you want to enable or disable MSN Mobile " | |
166 "device support?"), | |
167 gc, | |
168 _("Enable"), __enable_msn_mobile_cb, | |
169 _("Disable"), __disable_msn_mobile_cb, | |
170 session->prpl->handle, FALSE); | |
171 } | |
172 #endif | |
173 | |
174 static void | |
175 msn_show_set_mobile_pages(struct gaim_connection *gc) | |
176 { | |
177 MsnSession *session = gc->proto_data; | |
178 | |
179 do_ask_dialog(_("MSN Mobile Pages"), | |
180 _("Do you want to allow or disallow people on your buddy " | |
181 "list to send you mobile pages?"), | |
182 gc, | |
183 _("Allow"), __enable_msn_pages_cb, | |
184 _("Disallow"), __disable_msn_pages_cb, | |
185 session->prpl->handle, FALSE); | |
142 } | 186 } |
143 | 187 |
144 /************************************************************************** | 188 /************************************************************************** |
145 * Protocol Plugin ops | 189 * Protocol Plugin ops |
146 **************************************************************************/ | 190 **************************************************************************/ |
224 pam->label = _("Set Friendly Name"); | 268 pam->label = _("Set Friendly Name"); |
225 pam->callback = msn_show_set_friendly_name; | 269 pam->callback = msn_show_set_friendly_name; |
226 pam->gc = gc; | 270 pam->gc = gc; |
227 m = g_list_append(m, pam); | 271 m = g_list_append(m, pam); |
228 | 272 |
273 m = g_list_append(m, NULL); | |
274 | |
229 pam = g_new0(struct proto_actions_menu, 1); | 275 pam = g_new0(struct proto_actions_menu, 1); |
230 pam->label = _("Set Home Phone Number"); | 276 pam->label = _("Set Home Phone Number"); |
231 pam->callback = msn_show_set_home_phone; | 277 pam->callback = msn_show_set_home_phone; |
232 pam->gc = gc; | 278 pam->gc = gc; |
233 m = g_list_append(m, pam); | 279 m = g_list_append(m, pam); |
239 m = g_list_append(m, pam); | 285 m = g_list_append(m, pam); |
240 | 286 |
241 pam = g_new0(struct proto_actions_menu, 1); | 287 pam = g_new0(struct proto_actions_menu, 1); |
242 pam->label = _("Set Mobile Phone Number"); | 288 pam->label = _("Set Mobile Phone Number"); |
243 pam->callback = msn_show_set_mobile_phone; | 289 pam->callback = msn_show_set_mobile_phone; |
290 pam->gc = gc; | |
291 m = g_list_append(m, pam); | |
292 | |
293 m = g_list_append(m, NULL); | |
294 | |
295 #if 0 | |
296 pam = g_new0(struct proto_actions_menu, 1); | |
297 pam->label = _("Enable/Disable Mobile Devices"); | |
298 pam->callback = msn_show_set_mobile_support; | |
299 pam->gc = gc; | |
300 m = g_list_append(m, pam); | |
301 #endif | |
302 | |
303 pam = g_new0(struct proto_actions_menu, 1); | |
304 pam->label = _("Allow/Disallow Mobile Pages"); | |
305 pam->callback = msn_show_set_mobile_pages; | |
244 pam->gc = gc; | 306 pam->gc = gc; |
245 m = g_list_append(m, pam); | 307 m = g_list_append(m, pam); |
246 | 308 |
247 return m; | 309 return m; |
248 } | 310 } |