added avatars for GXS ids in distant chat

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7928 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-02-08 17:38:30 +00:00
parent a7b902a0ee
commit b731999f99
4 changed files with 33 additions and 9 deletions

View File

@ -5,6 +5,7 @@ List of fixes/improvements before 0.6
[ ] it's not possible to create a Posted thread without a Owner. [ ] it's not possible to create a Posted thread without a Owner.
Bug? If not, then remove "No signature" from selection box Bug? If not, then remove "No signature" from selection box
[ ] Show an info page for unsubscribed posted threads (same as forums) [ ] Show an info page for unsubscribed posted threads (same as forums)
[ ] Fix the counting of unread messages in Posted. Now it's wrong.
Forums Forums
[ ] it's not possible to create a Forum thread without a Owner. [ ] it's not possible to create a Forum thread without a Owner.
@ -31,7 +32,7 @@ List of fixes/improvements before 0.6
[ ] Chat lobbies should use Identities. That's a significant change, probably not backward compatible. [ ] Chat lobbies should use Identities. That's a significant change, probably not backward compatible.
Chat Chat
[ ] Distant chat window should show GXS avatars [X] Distant chat window should show GXS avatars
[ ] Distant chat should work with shared identities [ ] Distant chat should work with shared identities
[X] You should not be enabled to distant-chat yourself! [X] You should not be enabled to distant-chat yourself!
@ -41,6 +42,7 @@ List of fixes/improvements before 0.6
[ ] reputations are not used yet. We should hide them. [ ] reputations are not used yet. We should hide them.
[ ] Add timeout to Identities that are unused. Need to keep a time stamp list, updated [ ] Add timeout to Identities that are unused. Need to keep a time stamp list, updated
whenever the identity is used for checking signatures. whenever the identity is used for checking signatures.
[ ] Fix avatar loading for identities. When loaded for the first time by forums, the avatar does not show up.
Network Network
[ ] Friends => Friend nodes [ ] Friends => Friend nodes
@ -52,6 +54,11 @@ List of fixes/improvements before 0.6
libretroshare libretroshare
[ ] fix the data race in pqissl [ ] fix the data race in pqissl
[ ] make a valgrind pass for [ ] make a valgrind pass for
[ ] remove mktemp => use mkstemp
Packaging
[ ] check compilation on debian
[ ] check compilation on ARM
Post v0.6 release changes Post v0.6 release changes
========================= =========================

View File

@ -60,7 +60,7 @@ protected:
virtual void addChatMsg(const ChatMessage& msg); virtual void addChatMsg(const ChatMessage& msg);
//virtual void onChatChanged(int list, int type); //virtual void onChatChanged(int list, int type);
private: protected:
bool manualDelete; bool manualDelete;
/** Qt Designer generated object */ /** Qt Designer generated object */

View File

@ -63,8 +63,11 @@ void PopupDistantChatDialog::init(const RsGxsId &gxs_id,const QString & title)
_pid = gxs_id ; _pid = gxs_id ;
PopupChatDialog::init(ChatId(gxs_id), title) ; PopupChatDialog::init(ChatId(gxs_id), title) ;
// hide avatar frame, because it does not have funcntionality for gxs RsGxsId own_gxs_id ;
showAvatarFrame(false); uint32_t status ;
if(rsMsgs->getDistantChatStatus(gxs_id,status,&own_gxs_id))
ui.ownAvatarWidget->setOwnId(own_gxs_id);
} }
void PopupDistantChatDialog::updateDisplay() void PopupDistantChatDialog::updateDisplay()
@ -164,5 +167,14 @@ QString PopupDistantChatDialog::getPeerName(const ChatId &id) const
QString PopupDistantChatDialog::getOwnName() const QString PopupDistantChatDialog::getOwnName() const
{ {
return QString("me (TODO: gxs-name)"); uint32_t status= RS_DISTANT_CHAT_STATUS_UNKNOWN;
RsGxsId from_gxs_id ;
rsMsgs->getDistantChatStatus(_pid,status,&from_gxs_id) ;
RsIdentityDetails details ;
if(rsIdentity->getIdDetails(from_gxs_id,details))
return QString::fromUtf8( details.mNickname.c_str() ) ;
else
return QString::fromStdString(from_gxs_id.toStdString()) ;
} }

View File

@ -135,7 +135,12 @@ void AvatarWidget::setId(const ChatId &id)
refreshAvatarImage(); refreshAvatarImage();
refreshStatus(); refreshStatus();
} }
void AvatarWidget::setOwnId(const RsGxsId& own_gxs_id)
{
mFlag.isOwnId = true;
setId(ChatId(own_gxs_id));
}
void AvatarWidget::setOwnId() void AvatarWidget::setOwnId()
{ {
mFlag.isOwnId = true; mFlag.isOwnId = true;