src/protocols/msn/msn.c

changeset 9015
3c27e9074fa2
parent 8993
41f67bceab41
child 9030
7b574a641391
equal deleted inserted replaced
9014:047e5fb72251 9015:3c27e9074fa2
180 } 180 }
181 181
182 /* -- */ 182 /* -- */
183 183
184 static void 184 static void
185 msn_show_set_friendly_name(GaimConnection *gc) 185 msn_show_set_friendly_name(GaimPluginAction *action)
186 { 186 {
187 GaimConnection *gc = (GaimConnection *) action->context;
187 gaim_request_input(gc, NULL, _("Set your friendly name."), 188 gaim_request_input(gc, NULL, _("Set your friendly name."),
188 _("This is the name that other MSN buddies will " 189 _("This is the name that other MSN buddies will "
189 "see you as."), 190 "see you as."),
190 gaim_connection_get_display_name(gc), FALSE, FALSE, NULL, 191 gaim_connection_get_display_name(gc), FALSE, FALSE, NULL,
191 _("OK"), G_CALLBACK(msn_act_id), 192 _("OK"), G_CALLBACK(msn_act_id),
192 _("Cancel"), NULL, gc); 193 _("Cancel"), NULL, gc);
193 } 194 }
194 195
195 static void 196 static void
196 msn_show_set_home_phone(GaimConnection *gc) 197 msn_show_set_home_phone(GaimPluginAction *action)
197 { 198 {
199 GaimConnection *gc = (GaimConnection *) action->context;
198 MsnSession *session = gc->proto_data; 200 MsnSession *session = gc->proto_data;
199 201
200 gaim_request_input(gc, NULL, _("Set your home phone number."), NULL, 202 gaim_request_input(gc, NULL, _("Set your home phone number."), NULL,
201 msn_user_get_home_phone(session->user), FALSE, FALSE, NULL, 203 msn_user_get_home_phone(session->user), FALSE, FALSE, NULL,
202 _("OK"), G_CALLBACK(msn_set_home_phone_cb), 204 _("OK"), G_CALLBACK(msn_set_home_phone_cb),
203 _("Cancel"), NULL, gc); 205 _("Cancel"), NULL, gc);
204 } 206 }
205 207
206 static void 208 static void
207 msn_show_set_work_phone(GaimConnection *gc) 209 msn_show_set_work_phone(GaimPluginAction *action)
208 { 210 {
211 GaimConnection *gc = (GaimConnection *) action->context;
209 MsnSession *session = gc->proto_data; 212 MsnSession *session = gc->proto_data;
210 213
211 gaim_request_input(gc, NULL, _("Set your work phone number."), NULL, 214 gaim_request_input(gc, NULL, _("Set your work phone number."), NULL,
212 msn_user_get_work_phone(session->user), FALSE, FALSE, NULL, 215 msn_user_get_work_phone(session->user), FALSE, FALSE, NULL,
213 _("OK"), G_CALLBACK(msn_set_work_phone_cb), 216 _("OK"), G_CALLBACK(msn_set_work_phone_cb),
214 _("Cancel"), NULL, gc); 217 _("Cancel"), NULL, gc);
215 } 218 }
216 219
217 static void 220 static void
218 msn_show_set_mobile_phone(GaimConnection *gc) 221 msn_show_set_mobile_phone(GaimPluginAction *action)
219 { 222 {
223 GaimConnection *gc = (GaimConnection *) action->context;
220 MsnSession *session = gc->proto_data; 224 MsnSession *session = gc->proto_data;
221 225
222 gaim_request_input(gc, NULL, _("Set your mobile phone number."), NULL, 226 gaim_request_input(gc, NULL, _("Set your mobile phone number."), NULL,
223 msn_user_get_mobile_phone(session->user), FALSE, FALSE, NULL, 227 msn_user_get_mobile_phone(session->user), FALSE, FALSE, NULL,
224 _("OK"), G_CALLBACK(msn_set_mobile_phone_cb), 228 _("OK"), G_CALLBACK(msn_set_mobile_phone_cb),
225 _("Cancel"), NULL, gc); 229 _("Cancel"), NULL, gc);
226 } 230 }
227 231
228 static void 232 static void
229 msn_show_set_mobile_pages(GaimConnection *gc) 233 msn_show_set_mobile_pages(GaimPluginAction *action)
230 { 234 {
235 GaimConnection *gc = (GaimConnection *) action->context;
231 gaim_request_action(gc, NULL, _("Allow MSN Mobile pages?"), 236 gaim_request_action(gc, NULL, _("Allow MSN Mobile pages?"),
232 _("Do you want to allow or disallow people on " 237 _("Do you want to allow or disallow people on "
233 "your buddy list to send you MSN Mobile pages " 238 "your buddy list to send you MSN Mobile pages "
234 "to your cell phone or other mobile device?"), 239 "to your cell phone or other mobile device?"),
235 -1, gc, 3, 240 -1, gc, 3,
366 371
367 return m; 372 return m;
368 } 373 }
369 374
370 static GList * 375 static GList *
371 msn_actions(GaimConnection *gc) 376 msn_actions(GaimPlugin *plugin, gpointer context)
372 { 377 {
373 GList *m = NULL; 378 GList *m = NULL;
374 struct proto_actions_menu *pam; 379 GaimPluginAction *act;
375 380
376 pam = g_new0(struct proto_actions_menu, 1); 381 act = gaim_plugin_action_new(_("Set Friendly Name"),
377 pam->label = _("Set Friendly Name"); 382 msn_show_set_friendly_name);
378 pam->callback = msn_show_set_friendly_name; 383 m = g_list_append(m, act);
379 pam->gc = gc;
380 m = g_list_append(m, pam);
381
382 m = g_list_append(m, NULL); 384 m = g_list_append(m, NULL);
383 385
384 pam = g_new0(struct proto_actions_menu, 1); 386 act = gaim_plugin_action_new(_("Set Home Phone Number"),
385 pam->label = _("Set Home Phone Number"); 387 msn_show_set_home_phone);
386 pam->callback = msn_show_set_home_phone; 388 m = g_list_append(m, act);
387 pam->gc = gc; 389
388 m = g_list_append(m, pam); 390 act = gaim_plugin_action_new(_("Set Work Phone Number"),
389 391 msn_show_set_work_phone);
390 pam = g_new0(struct proto_actions_menu, 1); 392 m = g_list_append(m, act);
391 pam->label = _("Set Work Phone Number"); 393
392 pam->callback = msn_show_set_work_phone; 394 act = gaim_plugin_action_new(_("Set Mobile Phone Number"),
393 pam->gc = gc; 395 msn_show_set_mobile_phone);
394 m = g_list_append(m, pam); 396 m = g_list_append(m, act);
395
396 pam = g_new0(struct proto_actions_menu, 1);
397 pam->label = _("Set Mobile Phone Number");
398 pam->callback = msn_show_set_mobile_phone;
399 pam->gc = gc;
400 m = g_list_append(m, pam);
401
402 m = g_list_append(m, NULL); 397 m = g_list_append(m, NULL);
403 398
404 #if 0 399 #if 0
405 pam = g_new0(struct proto_actions_menu, 1); 400 act = gaim_plugin_action_new(_("Enable/Disable Mobile Devices"),
406 pam->label = _("Enable/Disable Mobile Devices"); 401 msn_show_set_mobile_support);
407 pam->callback = msn_show_set_mobile_support; 402 m = g_list_append(m, act);
408 pam->gc = gc;
409 m = g_list_append(m, pam);
410 #endif 403 #endif
411 404
412 pam = g_new0(struct proto_actions_menu, 1); 405 act = gaim_plugin_action_new(_("Allow/Disallow Mobile Pages"),
413 pam->label = _("Allow/Disallow Mobile Pages"); 406 msn_show_set_mobile_pages);
414 pam->callback = msn_show_set_mobile_pages; 407 m = g_list_append(m, act);
415 pam->gc = gc;
416 m = g_list_append(m, pam);
417 408
418 return m; 409 return m;
419 } 410 }
420 411
421 static GList * 412 static GList *
1633 msn_list_icon, 1624 msn_list_icon,
1634 msn_list_emblems, 1625 msn_list_emblems,
1635 msn_status_text, 1626 msn_status_text,
1636 msn_tooltip_text, 1627 msn_tooltip_text,
1637 msn_away_states, 1628 msn_away_states,
1638 msn_actions,
1639 msn_buddy_menu, 1629 msn_buddy_menu,
1640 NULL, 1630 NULL,
1641 msn_login, 1631 msn_login,
1642 msn_close, 1632 msn_close,
1643 msn_send_im, 1633 msn_send_im,
1708 NULL, /**< destroy */ 1698 NULL, /**< destroy */
1709 1699
1710 NULL, /**< ui_info */ 1700 NULL, /**< ui_info */
1711 &prpl_info, /**< extra_info */ 1701 &prpl_info, /**< extra_info */
1712 &prefs_info, /**< prefs_info */ 1702 &prefs_info, /**< prefs_info */
1713 NULL 1703 msn_actions
1714 }; 1704 };
1715 1705
1716 static void 1706 static void
1717 init_plugin(GaimPlugin *plugin) 1707 init_plugin(GaimPlugin *plugin)
1718 { 1708 {

mercurial