diff -urN -X psidiff.ignore sources/src/contactview.cpp work/src/contactview.cpp
--- sources/src/contactview.cpp	2009-07-26 19:07:41.000000000 +0600
+++ work/src/contactview.cpp	2009-07-26 22:54:28.000000000 +0600
@@ -37,6 +37,7 @@
 #include <QList>
 #include <QDropEvent>
 #include <QPixmap>
+#include <QPainter>
 #include <QDesktopWidget>
 #include <stdlib.h>
 #include "common.h"
@@ -890,6 +891,18 @@
 	}
 }
 
+void ContactProfile::updateAvatarIcon(const Jid &j)
+{
+	if (PsiOptions::instance()->getOption("options.ui.contactlist.avatars.show").toBool()) {
+		ContactViewItem *i;
+		Entry *e;
+		i = self() && self()->u()->jid().compare(j)?
+			self():
+			((e = findEntry(j))?e->cvi.first():0);
+		if(i) i->updateAvatarIcon();
+	}
+}
+
 void ContactProfile::ensureVisible(const Jid &j)
 {
 	Entry *e = findEntry(j);
@@ -2833,7 +2846,8 @@
 {
 	Q3ListViewItem::setup();
 	if (v_rich) {
-		int h = height();
+		QFontMetrics fm(listView()->font());
+		int h = fm.height();
 		QString txt = text(0);
 		if( txt.isEmpty() ){
 			delete v_rt;
@@ -2905,7 +2919,7 @@
 	if(px) {
 		pxw = px->width();
 		pxh = px->height();
-		pxrect = QRect(r, icon_vpadding, pxw, pxh);
+		pxrect = QRect(r, icon_vpadding + (height() - v_rt->height())/2, pxw, pxh);
 		r += pxw + lv->itemMargin();
 	}
 
@@ -2933,6 +2947,13 @@
 	return v_widthUsed;
 }
 
+int RichListViewItem::requiredHeight()
+{
+	QFontMetrics fm(listView()->font());
+	int h = v_rich?QMAX(v_rt->height(), fm.height()):fm.height();
+	return h;
+}
+
 //----------------------------------------------------------------------------
 // ContactViewItem
 //----------------------------------------------------------------------------
@@ -3007,6 +3028,7 @@
 	bool alerting;
 	bool animatingNick;
 	bool status_single;
+	QPixmap avatar_icon;
 
 	PsiIcon *icon, *lastIcon;
 	int animateNickX, animateNickColor; // nick animation
@@ -3089,8 +3111,10 @@
 
 	if(!parent->isVisible())
 		setVisible(false);
-	else
+	else {
 		setup();
+		updateAvatarIcon();
+	}
 }
 
 ContactViewItem::~ContactViewItem()
@@ -3182,6 +3206,34 @@
 	}
 }
 
+void ContactViewItem::updateAvatarIcon()
+{
+	int avSize = PsiOptions::instance()->getOption("options.ui.contactlist.avatars.show").toBool()?
+				PsiOptions::instance()->getOption("options.ui.contactlist.avatars.size").toInt():0;
+	Avatar *av;
+	int radius;
+	if (avSize && (av = contactProfile()->psiAccount()->avatarFactory()->retrieveAvatar(d->u->jid().bare()))) {
+		if (radius = PsiOptions::instance()->getOption("options.ui.contactlist.avatars.radius").toInt()) {
+			avSize = QMAX(avSize, radius*2);
+			const QPixmap bg = av->getPixmap().scaled(avSize, avSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+			int w = bg.width(), h = bg.height();
+			QPainterPath pp;
+			pp.addRoundedRect(0, 0, w, h, radius, radius);
+			d->avatar_icon = QPixmap(w, h);
+			d->avatar_icon.fill(QColor(0,0,0,0));
+			QPainter mp(&d->avatar_icon);
+			mp.setBackgroundMode(Qt::TransparentMode);
+			mp.setRenderHints(QPainter::Antialiasing, true);
+			mp.fillPath(pp, QBrush(bg));
+		} else {
+			d->avatar_icon = av->getPixmap().scaled(avSize, avSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
+		}
+	} else {
+		d->avatar_icon = QPixmap();
+	}
+	setHeight(QMAX(requiredHeight(), d->avatar_icon.height()));
+}
+
 void ContactViewItem::paintFocus(QPainter *, const QColorGroup &, const QRect &)
 {
 	// re-implimented to do nothing.  selection is enough of a focus
@@ -3231,6 +3283,61 @@
 					x += 24;
 				}
 			}
+			QList<QPixmap> rightPixs;
+			QList<int> rightWidths;
+			if ( !d->avatar_icon.isNull() ) {
+				rightPixs.push_back(d->avatar_icon);
+				//rightWidths.push_back(d->avatar_icon.width());
+				rightWidths.push_back(PsiOptions::instance()->getOption("options.ui.contactlist.avatars.size").toInt());
+			}
+			if ( PsiOptions::instance()->getOption("options.ui.contactlist.show-client-icons").toBool())
+			{
+				const QStringList& qsl = d->u->clients();
+				bool showAllClients = PsiOptions::instance()->getOption("options.ui.contactlist.show-all-client-icons").toBool();
+
+				for (QStringList::ConstIterator it = qsl.begin(); it != qsl.end(); ++it)
+				{
+					const QPixmap &pix = IconsetFactory::iconPixmap("clients/" + *it);
+					if(!pix.isNull()) rightPixs.push_back(pix);
+					rightWidths.push_back(pix.width());
+					if(!showAllClients) break;
+				}
+			}
+			if ( PsiOptions::instance()->getOption("options.ui.contactlist.show-mood-icons").toBool() &&
+			     !d->u->mood().isNull() ) {
+				const QPixmap &pix = IconsetFactory::iconPixmap("mood/"+d->u->mood().typeValue());
+				if (!pix.isNull()) {
+					rightPixs.push_back(pix);
+					rightWidths.push_back(pix.width());
+				}
+			}
+			if ( PsiOptions::instance()->getOption("options.ui.contactlist.show-tune-icons").toBool() && !d->u->tune().isEmpty()) {
+				const QPixmap &pix = IconsetFactory::iconPixmap("psiplus/notification_roster_tune");
+				rightPixs.push_back(pix);
+				rightWidths.push_back(pix.width());
+			}
+			int sumWidth = 0;
+			foreach (int w, rightWidths) {
+				sumWidth += w;
+			}
+			QColor bgc = isSelected()?cg.color(QPalette::Highlight):
+				     PsiOptions::instance()->getOption("options.ui.look.colors.contactlist.background").value<QColor>();
+			QColor tbgc = bgc;
+			tbgc.setAlpha(0);
+			sumWidth+=rightPixs.count(); //additional pixel to each pict
+			QLinearGradient grad(width - sumWidth - 20, 0, width - sumWidth, 0);
+			grad.setColorAt(0, tbgc);
+			grad.setColorAt(1, bgc);
+			QBrush tbakBr(grad);
+			p->fillRect(width - sumWidth - 20, 0, 20 + sumWidth, height(), tbakBr);
+
+			int endx = width;
+			for (int i=0; i<rightPixs.size(); i++) {
+				const QPixmap pix = rightPixs[i];
+				int y = (height() - pix.height()) / 2;
+				endx -= (rightWidths[i] + 1); // +1 - +1 pixel
+				p->drawPixmap(endx-1 + (rightWidths[i] - pix.width())/2, y, pix);
+			}
 		}
 	}
 	else if ( type_ == Group || type_ == Profile ) {
@@ -3309,6 +3416,14 @@
 	}
 }
 
+void ContactViewItem::setHeight( int h )
+{
+	h = QMAX(h, d->avatar_icon.height() + 1);
+	if ( h % 2 > 0 )
+			h++;
+	RichListViewItem::setHeight(h);
+}
+
 /*
  * \brief "Opens" or "closes the ContactViewItem
  *
@@ -3662,6 +3777,7 @@
 		drawGroupIcon();
 	}
 	else if(type_ == Contact) {
+		updateAvatarIcon(); //FIXME check if size or something really changed. since its expensive operation
 		if(!d->alerting)
 			resetStatus();
 		else
diff -urN -X psidiff.ignore sources/src/contactview.h work/src/contactview.h
--- sources/src/contactview.h	2009-07-26 19:07:41.000000000 +0600
+++ work/src/contactview.h	2009-07-26 19:08:01.000000000 +0600
@@ -128,6 +128,9 @@
 	void actionSetAvatar();
 	void actionUnsetAvatar();
 
+public slots:
+	void updateAvatarIcon(const Jid &);
+
 private slots:
 	void updateGroups();
 
@@ -324,6 +327,7 @@
 	virtual void setup();
 	virtual ~RichListViewItem();
 	int widthUsed();
+	int requiredHeight();
 
 protected:
 	virtual void paintCell( QPainter * p, const QColorGroup & cg, int column
@@ -386,11 +390,13 @@
 	void paintFocus(QPainter *, const QColorGroup &, const QRect &);
 	void paintBranches(QPainter *, const QColorGroup &, int, int, int);
 	void paintCell(QPainter *, const QColorGroup & cg, int column, int width, int alignment);
+	void setHeight( int h );
 	void setOpen(bool o);
 	void insertItem(Q3ListViewItem * newChild);
 	void takeItem(Q3ListViewItem * item);
 	int compare(Q3ListViewItem *, int, bool) const;
 	bool acceptDrop(const QMimeSource *) const;
+	void updateAvatarIcon();
 
 public slots:
 	void resetAnim();
diff -urN -X psidiff.ignore sources/src/psiaccount.cpp work/src/psiaccount.cpp
--- sources/src/psiaccount.cpp	2009-07-26 19:07:41.000000000 +0600
+++ work/src/psiaccount.cpp	2009-07-26 19:08:01.000000000 +0600
@@ -789,6 +789,7 @@
 	// Avatars
 	d->avatarFactory = new AvatarFactory(this);
 	d->self.setAvatarFactory(avatarFactory());
+	connect(d->avatarFactory, SIGNAL(avatarChanged(Jid)), d->cp, SLOT(updateAvatarIcon(Jid)));
 
 	connect(VCardFactory::instance(), SIGNAL(vcardChanged(const Jid&)), d, SLOT(vcardChanged(const Jid&)));
 
