| 505 button->callback(purple_account_get_connection(data->account), row, data->user_data); |
505 button->callback(purple_account_get_connection(data->account), row, data->user_data); |
| 506 g_list_foreach(row, (GFunc)g_free, NULL); |
506 g_list_foreach(row, (GFunc)g_free, NULL); |
| 507 g_list_free(row); |
507 g_list_free(row); |
| 508 } |
508 } |
| 509 |
509 |
| |
510 /* copy-paste from gtkrequest.c */ |
| |
511 static void |
| |
512 pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account) |
| |
513 { |
| |
514 GtkWidget *image; |
| |
515 GdkPixbuf *pixbuf; |
| |
516 |
| |
517 if (!account) |
| |
518 return; |
| |
519 |
| |
520 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); |
| |
521 image = gtk_image_new_from_pixbuf(pixbuf); |
| |
522 g_object_unref(G_OBJECT(pixbuf)); |
| |
523 |
| |
524 gtk_widget_set_tooltip_text(image, |
| |
525 purple_account_get_username(account)); |
| |
526 |
| |
527 if (GTK_IS_DIALOG(cont)) { |
| |
528 gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area( |
| |
529 GTK_DIALOG(cont))), image, FALSE, TRUE, 0); |
| |
530 gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area( |
| |
531 GTK_DIALOG(cont))), image, 0); |
| |
532 } else if (GTK_IS_HBOX(cont)) { |
| |
533 gtk_misc_set_alignment(GTK_MISC(image), 0, 0); |
| |
534 gtk_box_pack_end(GTK_BOX(cont), image, FALSE, TRUE, 0); |
| |
535 } |
| |
536 gtk_widget_show(image); |
| |
537 } |
| |
538 |
| 510 static void * |
539 static void * |
| 511 pidgin_notify_message(PurpleNotifyMsgType type, const char *title, |
540 pidgin_notify_message(PurpleNotifyMsgType type, const char *title, |
| 512 const char *primary, const char *secondary, |
541 const char *primary, const char *secondary, |
| 513 PurpleRequestCommonParameters *cpar) |
542 PurpleRequestCommonParameters *cpar) |
| 514 { |
543 { |
| 565 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), |
594 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), |
| 566 hbox); |
595 hbox); |
| 567 |
596 |
| 568 if (img != NULL) |
597 if (img != NULL) |
| 569 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
598 gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); |
| |
599 |
| |
600 pidgin_widget_decorate_account(hbox, |
| |
601 purple_request_cpar_get_account(cpar)); |
| 570 |
602 |
| 571 primary_esc = g_markup_escape_text(primary, -1); |
603 primary_esc = g_markup_escape_text(primary, -1); |
| 572 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; |
604 secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; |
| 573 g_snprintf(label_text, sizeof(label_text), |
605 g_snprintf(label_text, sizeof(label_text), |
| 574 "<span weight=\"bold\" size=\"larger\">%s</span>%s%s", |
606 "<span weight=\"bold\" size=\"larger\">%s</span>%s%s", |