comparison pidgin/gtkblist.c @ 26361:38238d41923b

propagate from branch 'im.pidgin.pidgin' (head 5573ab30de2e34d78f13bad8ae0b2ac5de6d1083) to branch 'im.pidgin.pidgin.vv' (head 6733a54a9c1b0ab68c8b924c82783cc4af588952)
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 16 Mar 2009 02:33:48 +0000
parents c0115655a94e ff4212a5268f
children f5f08111da52
comparison
equal deleted inserted replaced
26267:da9e022befd9 26361:38238d41923b
336 { 336 {
337 pidgin_dialogs_im_with_user(purple_buddy_get_account(b), 337 pidgin_dialogs_im_with_user(purple_buddy_get_account(b),
338 purple_buddy_get_name(b)); 338 purple_buddy_get_name(b));
339 } 339 }
340 340
341 #ifdef USE_VV
342 static void gtk_blist_menu_audio_call_cb(GtkWidget *w, PurpleBuddy *b)
343 {
344 purple_prpl_initiate_media(purple_buddy_get_account(b),
345 purple_buddy_get_name(b), PURPLE_MEDIA_AUDIO);
346 }
347
348 static void gtk_blist_menu_video_call_cb(GtkWidget *w, PurpleBuddy *b)
349 {
350 /* if the buddy supports both audio and video, start a combined call,
351 otherwise start a pure video session */
352 if (purple_prpl_get_media_caps(purple_buddy_get_account(b),
353 purple_buddy_get_name(b)) &
354 PURPLE_MEDIA_CAPS_AUDIO_VIDEO) {
355 purple_prpl_initiate_media(purple_buddy_get_account(b),
356 purple_buddy_get_name(b), PURPLE_MEDIA_AUDIO | PURPLE_MEDIA_VIDEO);
357 } else {
358 purple_prpl_initiate_media(purple_buddy_get_account(b),
359 purple_buddy_get_name(b), PURPLE_MEDIA_VIDEO);
360 }
361 }
362
363 #endif
364
341 static void gtk_blist_menu_send_file_cb(GtkWidget *w, PurpleBuddy *b) 365 static void gtk_blist_menu_send_file_cb(GtkWidget *w, PurpleBuddy *b)
342 { 366 {
343 PurpleAccount *account = purple_buddy_get_account(b); 367 PurpleAccount *account = purple_buddy_get_account(b);
344 368
345 serv_send_file(purple_account_get_connection(account), 369 serv_send_file(purple_account_get_connection(account),
1474 pidgin_new_item_from_stock(menu, _("Get _Info"), PIDGIN_STOCK_TOOLBAR_USER_INFO, 1498 pidgin_new_item_from_stock(menu, _("Get _Info"), PIDGIN_STOCK_TOOLBAR_USER_INFO,
1475 G_CALLBACK(gtk_blist_menu_info_cb), buddy, 0, 0, NULL); 1499 G_CALLBACK(gtk_blist_menu_info_cb), buddy, 0, 0, NULL);
1476 } 1500 }
1477 pidgin_new_item_from_stock(menu, _("I_M"), PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW, 1501 pidgin_new_item_from_stock(menu, _("I_M"), PIDGIN_STOCK_TOOLBAR_MESSAGE_NEW,
1478 G_CALLBACK(gtk_blist_menu_im_cb), buddy, 0, 0, NULL); 1502 G_CALLBACK(gtk_blist_menu_im_cb), buddy, 0, 0, NULL);
1503
1504 #ifdef USE_VV
1505 if (prpl_info && prpl_info->get_media_caps) {
1506 PurpleAccount *account = purple_buddy_get_account(buddy);
1507 const gchar *who = purple_buddy_get_name(buddy);
1508 PurpleMediaCaps caps = purple_prpl_get_media_caps(account, who);
1509 if (caps & PURPLE_MEDIA_CAPS_AUDIO) {
1510 pidgin_new_item_from_stock(menu, _("_Audio Call"),
1511 PIDGIN_STOCK_TOOLBAR_AUDIO_CALL,
1512 G_CALLBACK(gtk_blist_menu_audio_call_cb), buddy, 0, 0, NULL);
1513 }
1514 if (caps & PURPLE_MEDIA_CAPS_AUDIO_VIDEO) {
1515 pidgin_new_item_from_stock(menu, _("Audio/_Video Call"),
1516 PIDGIN_STOCK_TOOLBAR_VIDEO_CALL,
1517 G_CALLBACK(gtk_blist_menu_video_call_cb), buddy, 0, 0, NULL);
1518 } else if (caps & PURPLE_MEDIA_CAPS_VIDEO) {
1519 pidgin_new_item_from_stock(menu, _("_Video Call"),
1520 PIDGIN_STOCK_TOOLBAR_VIDEO_CALL,
1521 G_CALLBACK(gtk_blist_menu_video_call_cb), buddy, 0, 0, NULL);
1522 }
1523 }
1524
1525 #endif
1526
1479 if (prpl_info && prpl_info->send_file) { 1527 if (prpl_info && prpl_info->send_file) {
1480 if (!prpl_info->can_receive_file || 1528 if (!prpl_info->can_receive_file ||
1481 prpl_info->can_receive_file(buddy->account->gc, buddy->name)) 1529 prpl_info->can_receive_file(buddy->account->gc, buddy->name))
1482 { 1530 {
1483 pidgin_new_item_from_stock(menu, _("_Send File..."), 1531 pidgin_new_item_from_stock(menu, _("_Send File..."),