Added avatar image to ConfCertDialog (defnax).

Added new class AvatarDefs to get the avatar for a ssl id or gpg id.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4585 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-09-02 10:22:44 +00:00
parent 0591ef0432
commit b35d32ef15
19 changed files with 282 additions and 248 deletions

View file

@ -456,15 +456,11 @@ void NotifyQt::UpdateGUI()
/* id the name */
QString name;
unsigned char *data = NULL;
int size = 0 ;
if (type == RS_POPUP_DOWNLOAD) {
/* id = file hash */
} else {
name = QString::fromUtf8(rsPeers->getPeerName(id).c_str());
rsMsgs->getAvatarData(id,data,size);
}
switch(type)
@ -478,18 +474,7 @@ void NotifyQt::UpdateGUI()
case RS_POPUP_CONNECT:
if (popupflags & RS_POPUP_CONNECT)
{
QPixmap avatar;
if(size != 0)
{
// set the image
avatar.loadFromData(data,size,"PNG");
}
else
{
avatar = QPixmap(":/images/user/personal64.png");
}
toaster = new Toaster(new OnlineToaster(id, name, avatar));
toaster = new Toaster(new OnlineToaster(id, name));
}
break;
case RS_POPUP_DOWNLOAD:
@ -500,10 +485,6 @@ void NotifyQt::UpdateGUI()
break;
}
if (data) {
delete[] data;
}
if (toaster) {
/* init attributes */
toaster->widget->setWindowFlags(Qt::ToolTip | Qt::WindowStaysOnTopHint);