549
549
char *msg = g_strdup_printf(ngettext("You have %d contact named %s. Would you like to merge them?", "You currently have %d contacts named %s. Would you like to merge them?", i), i, alias);
550
550
purple_request_action(NULL, NULL, msg, _("Merging these contacts will cause them to share a single entry on the buddy list and use a single conversation window. "
551
551
"You can separate them again by choosing 'Expand' from the contact's context menu"), 0, NULL, NULL, NULL,
552
merges, 2, _("_Merge"), PURPLE_CALLBACK(gtk_blist_do_personize), _("_Cancel"), PURPLE_CALLBACK(g_list_free));
552
merges, 2, _("_Yes"), PURPLE_CALLBACK(gtk_blist_do_personize), _("_No"), PURPLE_CALLBACK(g_list_free));
555
555
g_list_free(merges);
705
705
for (bnode = node->child; bnode != NULL; bnode = bnode->next) {
706
706
purple_blist_node_set_bool(bnode, "show_offline", setting);
708
} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
709
PurpleBlistNode *cnode, *bnode;
710
gboolean setting = !purple_blist_node_get_bool(node, "show_offline");
712
purple_blist_node_set_bool(node, "show_offline", setting);
713
for (cnode = node->child; cnode != NULL; cnode = cnode->next) {
714
purple_blist_node_set_bool(cnode, "show_offline", setting);
715
for (bnode = cnode->child; bnode != NULL; bnode = bnode->next) {
716
purple_blist_node_set_bool(bnode, "show_offline", setting);
709
720
pidgin_blist_update(purple_get_blist(), node);
1459
1470
G_CALLBACK(pidgin_blist_remove_cb), node, 0, 0, NULL);
1460
1471
pidgin_new_item_from_stock(menu, _("_Rename"), NULL,
1461
1472
G_CALLBACK(gtk_blist_menu_alias_cb), node, 0, 0, NULL);
1473
if (!(purple_blist_node_get_flags(node) & PURPLE_BLIST_NODE_FLAG_NO_SAVE)) {
1474
gboolean show_offline = purple_blist_node_get_bool(node, "show_offline");
1475
pidgin_new_item_from_stock(menu, show_offline ? _("Hide when offline") : _("Show when offline"),
1476
NULL, G_CALLBACK(gtk_blist_menu_showoffline_cb), node, 0, 0, NULL);
1463
1479
pidgin_append_blist_node_extended_menu(menu, node);
2482
2498
purple_buddy_icon_get_scale_size(&prpl_info->icon_spec, &scale_width, &scale_height);
2484
2500
if (scaled || scale_height > 200 || scale_width > 200) {
2485
2502
float scale_size = scaled ? 32.0 : 200.0;
2486
2503
if(scale_height > scale_width) {
2487
2504
scale_width = scale_size * (double)scale_width / (double)scale_height;
2490
2507
scale_height = scale_size * (double)scale_height / (double)scale_width;
2491
2508
scale_width = scale_size;
2510
/* scale & round before making square, so rectangular (but non-square)
2511
* images get rounded corners too */
2512
tmpbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, scale_width, scale_height);
2513
gdk_pixbuf_fill(tmpbuf, 0x00000000);
2514
gdk_pixbuf_scale(buf, tmpbuf, 0, 0, scale_width, scale_height, 0, 0, (double)scale_width/(double)orig_width, (double)scale_height/(double)orig_height, GDK_INTERP_BILINEAR);
2515
if (pidgin_gdk_pixbuf_is_opaque(tmpbuf))
2516
pidgin_gdk_pixbuf_make_round(tmpbuf);
2494
2517
ret = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, scale_size, scale_size);
2495
2518
gdk_pixbuf_fill(ret, 0x00000000);
2496
gdk_pixbuf_scale(buf, ret, (scale_size-scale_width)/2, (scale_size-scale_height)/2, scale_width, scale_height, (scale_size-scale_width)/2, (scale_size-scale_height)/2, (double)scale_width/(double)orig_width, (double)scale_height/(double)orig_height, GDK_INTERP_BILINEAR);
2497
if (pidgin_gdk_pixbuf_is_opaque(ret))
2498
pidgin_gdk_pixbuf_make_round(ret);
2519
gdk_pixbuf_copy_area(tmpbuf, 0, 0, scale_width, scale_height, ret, (scale_size-scale_width)/2, (scale_size-scale_height)/2);
2520
g_object_unref(G_OBJECT(tmpbuf));
2500
2522
ret = gdk_pixbuf_scale_simple(buf,scale_width,scale_height, GDK_INTERP_BILINEAR);
3132
if (bnode && bnode->conv.conv &&
3133
prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC) &&
3134
!purple_conv_chat_has_left(PURPLE_CONV_CHAT(bnode->conv.conv))) {
3135
const char *topic = purple_conv_chat_get_topic(PURPLE_CONV_CHAT(bnode->conv.conv));
3155
if (bnode && bnode->conv.conv) {
3156
conv = bnode->conv.conv;
3159
if (prpl_info && prpl_info->get_chat_name)
3160
chat_name = prpl_info->get_chat_name(chat->components);
3162
chat_name = g_strdup(purple_chat_get_name(chat));
3164
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT, chat_name,
3168
if (conv && prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC) &&
3169
!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) {
3170
char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1);
3136
3171
g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)"));
3139
3175
if (prpl_info->chat_info != NULL)
3319
3355
purple_notify_user_info_destroy(user_info);
3320
3356
} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
3321
3358
PurpleGroup *group = (PurpleGroup*)node;
3322
3359
PurpleNotifyUserInfo *user_info;
3324
3361
user_info = purple_notify_user_info_new();
3326
/* Total buddies (from online accounts) in group */
3327
tmp = g_strdup_printf("%d",
3328
purple_blist_get_group_size(group, FALSE));
3329
purple_notify_user_info_add_pair(user_info, _("Total Buddies"),
3333
/* Online buddies in group */
3334
tmp = g_strdup_printf("%d",
3335
purple_blist_get_group_online_count(group));
3336
purple_notify_user_info_add_pair(user_info, _("Online Buddies"),
3363
count = purple_blist_get_group_online_count(group);
3366
/* Online buddies in group */
3367
tmp = g_strdup_printf("%d", count);
3368
purple_notify_user_info_add_pair(user_info,
3369
_("Online Buddies"),
3375
count = purple_blist_get_group_size(group, FALSE);
3377
/* Total buddies (from online accounts) in group */
3378
tmp = g_strdup_printf("%d", count);
3379
purple_notify_user_info_add_pair(user_info,
3340
3386
tmp = purple_notify_user_info_get_text_with_newline(user_info, "\n");
3341
3387
g_string_append(str, tmp);
6320
6366
vbox = gtk_vbox_new(FALSE, 0);
6321
6367
gtk_container_add(GTK_CONTAINER(hbox), vbox);
6323
label = gtk_label_new(
6324
_("Please enter the screen name of the person you would like "
6325
"to add to your buddy list. You may optionally enter an alias, "
6326
"or nickname, for the buddy. The alias will be displayed in "
6327
"place of the screen name whenever possible.\n"));
6329
gtk_widget_set_size_request(GTK_WIDGET(label), 400, -1);
6330
gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
6331
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
6332
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
6334
hbox = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE);
6335
gtk_container_add(GTK_CONTAINER(vbox), hbox);
6337
6369
g_signal_connect(G_OBJECT(data->window), "destroy",
6338
G_CALLBACK(destroy_add_buddy_dialog_cb), data);
6370
G_CALLBACK(destroy_add_buddy_dialog_cb), data);
6372
label = gtk_label_new(_("Add a buddy.\n"));
6373
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
6374
gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
6340
6376
table = gtk_table_new(4, 2, FALSE);
6341
6377
gtk_table_set_row_spacings(GTK_TABLE(table), 5);
6343
6379
gtk_container_set_border_width(GTK_CONTAINER(table), 0);
6344
6380
gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
6346
/* Set up stuff for the account box */
6347
label = gtk_label_new_with_mnemonic(_("A_ccount:"));
6348
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
6349
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 0, 1);
6351
6382
data->account_box = pidgin_account_option_menu_new(account, FALSE,
6352
6383
G_CALLBACK(add_buddy_select_account_cb), NULL, data);
6354
gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 1, 2, 0, 1);
6355
gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->account_box);
6356
pidgin_set_accessible_label (data->account_box, label);
6357
/* End of account box */
6385
gtk_table_attach_defaults(GTK_TABLE(table), data->account_box, 0, 2, 0, 1);
6359
label = gtk_label_new_with_mnemonic(_("_Screen name:"));
6387
label = gtk_label_new_with_mnemonic(_("Buddy's _screen name:"));
6360
6388
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
6361
6389
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
6368
6396
gtk_entry_set_text(GTK_ENTRY(data->entry), username);
6370
6398
gtk_dialog_set_response_sensitive(GTK_DIALOG(data->window),
6371
GTK_RESPONSE_OK, FALSE);
6399
GTK_RESPONSE_OK, FALSE);
6373
6401
gtk_entry_set_activates_default (GTK_ENTRY(data->entry), TRUE);
6374
6402
gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->entry);
6375
6403
pidgin_set_accessible_label (data->entry, label);
6377
6405
g_signal_connect(G_OBJECT(data->entry), "changed",
6378
G_CALLBACK(pidgin_set_sensitive_if_input),
6406
G_CALLBACK(pidgin_set_sensitive_if_input),
6381
label = gtk_label_new_with_mnemonic(_("A_lias:"));
6409
label = gtk_label_new_with_mnemonic(_("(Optional) A_lias:"));
6382
6410
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
6383
6411
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 2, 3);
6385
6413
data->entry_for_alias = gtk_entry_new();
6386
6414
gtk_table_attach_defaults(GTK_TABLE(table),
6387
data->entry_for_alias, 1, 2, 2, 3);
6415
data->entry_for_alias, 1, 2, 2, 3);
6389
6417
if (alias != NULL)
6390
6418
gtk_entry_set_text(GTK_ENTRY(data->entry_for_alias), alias);
6396
6424
gtk_label_set_mnemonic_widget(GTK_LABEL(label), data->entry_for_alias);
6397
6425
pidgin_set_accessible_label (data->entry_for_alias, label);
6399
label = gtk_label_new_with_mnemonic(_("_Group:"));
6427
label = gtk_label_new_with_mnemonic(_("Add buddy to _group:"));
6400
6428
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
6401
6429
gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 3, 4);