mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -04:00
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:
parent
0591ef0432
commit
b35d32ef15
19 changed files with 282 additions and 248 deletions
|
@ -60,6 +60,7 @@
|
|||
#include "feeds/AttachFileItem.h"
|
||||
#include "im_history/ImHistoryBrowser.h"
|
||||
#include "common/RSTreeWidgetItem.h"
|
||||
#include "gui/common/AvatarDefs.h"
|
||||
|
||||
#include "RetroShareLink.h"
|
||||
|
||||
|
@ -1795,26 +1796,11 @@ void FriendsDialog::viewprofile()
|
|||
|
||||
void FriendsDialog::updateAvatar()
|
||||
{
|
||||
unsigned char *data = NULL;
|
||||
int size = 0 ;
|
||||
|
||||
rsMsgs->getOwnAvatarData(data,size);
|
||||
|
||||
#ifdef FRIENDS_DEBUG
|
||||
std::cerr << "Image size = " << size << std::endl ;
|
||||
#endif
|
||||
|
||||
if(size == 0)
|
||||
std::cerr << "Got no image" << std::endl ;
|
||||
|
||||
// set the image
|
||||
QPixmap pix ;
|
||||
pix.loadFromData(data,size,"PNG") ;
|
||||
ui.avatartoolButton->setIcon(pix); // writes image into ba in PNG format
|
||||
QPixmap avatar;
|
||||
AvatarDefs::getOwnAvatar(avatar, "");
|
||||
ui.avatartoolButton->setIcon(avatar);
|
||||
|
||||
PopupChatDialog::updateAllAvatars();
|
||||
|
||||
delete[] data ;
|
||||
}
|
||||
|
||||
void FriendsDialog::getAvatar()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue