gboolean abusive;
/* confirm the blocking */
- if (empathy_block_contact_dialog_show (GTK_WINDOW (dialog),
- contact, &abusive)) {
+ if (empathy_block_contact_dialog_show (GTK_WINDOW (dialog), contact,
+ NULL, &abusive)) {
empathy_contact_list_remove (
EMPATHY_CONTACT_LIST (manager),
contact, "");
gboolean
empathy_block_contact_dialog_show (GtkWindow *parent,
EmpathyContact *contact,
+ GdkPixbuf *avatar,
gboolean *abusive)
{
EmpathyContactManager *manager;
_("_Block"), GTK_RESPONSE_REJECT,
NULL);
+ if (avatar != NULL) {
+ GtkWidget *image = gtk_image_new_from_pixbuf (avatar);
+ gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
+ gtk_widget_show (image);
+ }
+
/* ask the user if they want to also report the contact as abusive */
if (flags & EMPATHY_CONTACT_LIST_CAN_REPORT_ABUSIVE) {
GtkWidget *vbox;
if (blocked) {
/* confirm the user really wishes to block the contact */
GtkWidget *parent;
+ GdkPixbuf *avatar;
/* gtk_menu_get_attach_widget () doesn't behave properly here
* for some reason */
G_OBJECT (gtk_widget_get_parent (GTK_WIDGET (item))),
"window");
+ avatar = empathy_pixbuf_avatar_from_contact_scaled (contact, 48, 48);
+
if (!empathy_block_contact_dialog_show (GTK_WINDOW (parent),
- contact, &abusive))
+ contact, avatar, &abusive))
return;
}