comparison libpurple/protocols/msn/msn.c @ 21360:e747ac0c42d6

propagate from branch 'im.pidgin.pidgin.next.minor' (head bd8f1d754a1b94e5ade30c3b135178b236f7b49a) to branch 'im.pidgin.cpw.resiak.disconnectreason' (head 5d84bcfaddc07cab4419ab9f04b31626421b97ff)
author Will Thompson <will.thompson@collabora.co.uk>
date Mon, 15 Oct 2007 10:45:46 +0000
parents ba41f2a60253 a20ef7180680
children 38cc722159ff
comparison
equal deleted inserted replaced
21359:fe57b8062249 21360:e747ac0c42d6
280 { 280 {
281 PurpleConnection *gc; 281 PurpleConnection *gc;
282 282
283 gc = (PurpleConnection *) action->context; 283 gc = (PurpleConnection *) action->context;
284 284
285 purple_request_input(gc, NULL, _("Set your friendly name."), 285 purple_request_input_with_hint(gc, NULL, _("Set your friendly name."),
286 _("This is the name that other MSN buddies will " 286 _("This is the name that other MSN buddies will "
287 "see you as."), 287 "see you as."),
288 purple_connection_get_display_name(gc), FALSE, FALSE, NULL, 288 purple_connection_get_display_name(gc), FALSE, FALSE, NULL,
289 _("OK"), G_CALLBACK(msn_act_id), 289 _("OK"), G_CALLBACK(msn_act_id),
290 _("Cancel"), NULL, 290 _("Cancel"), NULL,
291 purple_connection_get_account(gc), NULL, NULL, 291 purple_connection_get_account(gc), NULL, NULL,
292 gc); 292 PURPLE_REQUEST_UI_HINT_ACCOUNT, gc);
293 } 293 }
294 294
295 static void 295 static void
296 msn_show_set_home_phone(PurplePluginAction *action) 296 msn_show_set_home_phone(PurplePluginAction *action)
297 { 297 {
299 MsnSession *session; 299 MsnSession *session;
300 300
301 gc = (PurpleConnection *) action->context; 301 gc = (PurpleConnection *) action->context;
302 session = gc->proto_data; 302 session = gc->proto_data;
303 303
304 purple_request_input(gc, NULL, _("Set your home phone number."), NULL, 304 purple_request_input_with_hint(gc, NULL, _("Set your home phone number."), NULL,
305 msn_user_get_home_phone(session->user), FALSE, FALSE, NULL, 305 msn_user_get_home_phone(session->user), FALSE, FALSE, NULL,
306 _("OK"), G_CALLBACK(msn_set_home_phone_cb), 306 _("OK"), G_CALLBACK(msn_set_home_phone_cb),
307 _("Cancel"), NULL, 307 _("Cancel"), NULL,
308 purple_connection_get_account(gc), NULL, NULL, 308 purple_connection_get_account(gc), NULL, NULL,
309 gc); 309 PURPLE_REQUEST_UI_HINT_ACCOUNT, gc);
310 } 310 }
311 311
312 static void 312 static void
313 msn_show_set_work_phone(PurplePluginAction *action) 313 msn_show_set_work_phone(PurplePluginAction *action)
314 { 314 {
316 MsnSession *session; 316 MsnSession *session;
317 317
318 gc = (PurpleConnection *) action->context; 318 gc = (PurpleConnection *) action->context;
319 session = gc->proto_data; 319 session = gc->proto_data;
320 320
321 purple_request_input(gc, NULL, _("Set your work phone number."), NULL, 321 purple_request_input_with_hint(gc, NULL, _("Set your work phone number."), NULL,
322 msn_user_get_work_phone(session->user), FALSE, FALSE, NULL, 322 msn_user_get_work_phone(session->user), FALSE, FALSE, NULL,
323 _("OK"), G_CALLBACK(msn_set_work_phone_cb), 323 _("OK"), G_CALLBACK(msn_set_work_phone_cb),
324 _("Cancel"), NULL, 324 _("Cancel"), NULL,
325 purple_connection_get_account(gc), NULL, NULL, 325 purple_connection_get_account(gc), NULL, NULL,
326 gc); 326 PURPLE_REQUEST_UI_HINT_ACCOUNT, gc);
327 } 327 }
328 328
329 static void 329 static void
330 msn_show_set_mobile_phone(PurplePluginAction *action) 330 msn_show_set_mobile_phone(PurplePluginAction *action)
331 { 331 {
333 MsnSession *session; 333 MsnSession *session;
334 334
335 gc = (PurpleConnection *) action->context; 335 gc = (PurpleConnection *) action->context;
336 session = gc->proto_data; 336 session = gc->proto_data;
337 337
338 purple_request_input(gc, NULL, _("Set your mobile phone number."), NULL, 338 purple_request_input_with_hint(gc, NULL, _("Set your mobile phone number."), NULL,
339 msn_user_get_mobile_phone(session->user), FALSE, FALSE, NULL, 339 msn_user_get_mobile_phone(session->user), FALSE, FALSE, NULL,
340 _("OK"), G_CALLBACK(msn_set_mobile_phone_cb), 340 _("OK"), G_CALLBACK(msn_set_mobile_phone_cb),
341 _("Cancel"), NULL, 341 _("Cancel"), NULL,
342 purple_connection_get_account(gc), NULL, NULL, 342 purple_connection_get_account(gc), NULL, NULL,
343 gc); 343 PURPLE_REQUEST_UI_HINT_ACCOUNT, gc);
344 } 344 }
345 345
346 static void 346 static void
347 msn_show_set_mobile_pages(PurplePluginAction *action) 347 msn_show_set_mobile_pages(PurplePluginAction *action)
348 { 348 {
349 PurpleConnection *gc; 349 PurpleConnection *gc;
350 350
351 gc = (PurpleConnection *) action->context; 351 gc = (PurpleConnection *) action->context;
352 352
353 purple_request_action(gc, NULL, _("Allow MSN Mobile pages?"), 353 purple_request_action_with_hint(gc, NULL, _("Allow MSN Mobile pages?"),
354 _("Do you want to allow or disallow people on " 354 _("Do you want to allow or disallow people on "
355 "your buddy list to send you MSN Mobile pages " 355 "your buddy list to send you MSN Mobile pages "
356 "to your cell phone or other mobile device?"), 356 "to your cell phone or other mobile device?"),
357 -1, 357 -1,
358 purple_connection_get_account(gc), NULL, NULL, 358 purple_connection_get_account(gc), NULL, NULL,
359 gc, 3, 359 PURPLE_REQUEST_UI_HINT_ACCOUNT, gc, 3,
360 _("Allow"), G_CALLBACK(enable_msn_pages_cb), 360 _("Allow"), G_CALLBACK(enable_msn_pages_cb),
361 _("Disallow"), G_CALLBACK(disable_msn_pages_cb), 361 _("Disallow"), G_CALLBACK(disable_msn_pages_cb),
362 _("Cancel"), NULL); 362 _("Cancel"), NULL);
363 } 363 }
364 364
398 398
399 data = g_new0(MsnMobileData, 1); 399 data = g_new0(MsnMobileData, 1);
400 data->gc = gc; 400 data->gc = gc;
401 data->passport = buddy->name; 401 data->passport = buddy->name;
402 402
403 purple_request_input(gc, NULL, _("Send a mobile message."), NULL, 403 purple_request_input_with_hint(gc, NULL, _("Send a mobile message."), NULL,
404 NULL, TRUE, FALSE, NULL, 404 NULL, TRUE, FALSE, NULL,
405 _("Page"), G_CALLBACK(send_to_mobile_cb), 405 _("Page"), G_CALLBACK(send_to_mobile_cb),
406 _("Close"), G_CALLBACK(close_mobile_page_cb), 406 _("Close"), G_CALLBACK(close_mobile_page_cb),
407 purple_connection_get_account(gc), purple_buddy_get_name(buddy), NULL, 407 purple_connection_get_account(gc), purple_buddy_get_name(buddy), NULL,
408 data); 408 PURPLE_REQUEST_UI_HINT_ACCOUNT, data);
409 } 409 }
410 410
411 static gboolean 411 static gboolean
412 msn_offline_message(const PurpleBuddy *buddy) { 412 msn_offline_message(const PurpleBuddy *buddy) {
413 MsnUser *user; 413 MsnUser *user;