- fixed up avatar exchange between peers

- reverted preceding commit about PNG/JPG in popup chat dialog. This only concerns internal data representation and this string has nothing to do with accepted image formats.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1704 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2009-09-30 20:53:18 +00:00
parent c255ec1a21
commit dee82c5f1b
12 changed files with 31 additions and 28 deletions

View file

@ -304,11 +304,6 @@ std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() <<
qsb -> setValue(oldQsbValue);
}
if(ci->chatflags & RS_CHAT_AVATAR_AVAILABLE)
{
std::cerr << "received msg saying an avatar for peer " << ci->rsid << " is available." << std::endl ;
updatePeerAvatar(ci->rsid) ;
}
/*else
{
ui.avatarlabel->setPixmap(QPixmap(":/images/user/personal128.png"));
@ -648,6 +643,8 @@ void PopupChatDialog::changeStyle()
void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
{
std::cerr << "popupchatDialog: updating avatar for peer " << peer_id << std::endl ;
unsigned char *data = NULL;
int size = 0 ;
@ -665,7 +662,7 @@ void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
// set the image
QPixmap pix ;
pix.loadFromData(data,size,"JPG") ;
pix.loadFromData(data,size,"PNG") ;
ui.avatarlabel->setPixmap(pix); // writes image into ba in JPG format
delete[] data ;