diff -r bbcb198650b7 -r 0145b9f2d77c pidgin/gtknotify.c --- a/pidgin/gtknotify.c Sat Sep 21 11:54:03 2013 +0200 +++ b/pidgin/gtknotify.c Sat Sep 21 12:26:23 2013 +0200 @@ -507,6 +507,35 @@ g_list_free(row); } +/* copy-paste from gtkrequest.c */ +static void +pidgin_widget_decorate_account(GtkWidget *cont, PurpleAccount *account) +{ + GtkWidget *image; + GdkPixbuf *pixbuf; + + if (!account) + return; + + pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); + image = gtk_image_new_from_pixbuf(pixbuf); + g_object_unref(G_OBJECT(pixbuf)); + + gtk_widget_set_tooltip_text(image, + purple_account_get_username(account)); + + if (GTK_IS_DIALOG(cont)) { + gtk_box_pack_start(GTK_BOX(gtk_dialog_get_action_area( + GTK_DIALOG(cont))), image, FALSE, TRUE, 0); + gtk_box_reorder_child(GTK_BOX(gtk_dialog_get_action_area( + GTK_DIALOG(cont))), image, 0); + } else if (GTK_IS_HBOX(cont)) { + gtk_misc_set_alignment(GTK_MISC(image), 0, 0); + gtk_box_pack_end(GTK_BOX(cont), image, FALSE, TRUE, 0); + } + gtk_widget_show(image); +} + static void * pidgin_notify_message(PurpleNotifyMsgType type, const char *title, const char *primary, const char *secondary, @@ -568,6 +597,9 @@ if (img != NULL) gtk_box_pack_start(GTK_BOX(hbox), img, FALSE, FALSE, 0); + pidgin_widget_decorate_account(hbox, + purple_request_cpar_get_account(cpar)); + primary_esc = g_markup_escape_text(primary, -1); secondary_esc = (secondary != NULL) ? g_markup_escape_text(secondary, -1) : NULL; g_snprintf(label_text, sizeof(label_text),