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,12 +5,13 @@ List of fixes/improvements before 0.6
[ ] it's not possible to create a Posted thread without a Owner.
Bug? If not, then remove "No signature" from selection box
[ ] Show an info page for unsubscribed posted threads (same as forums)
[ ] Fix the counting of unread messages in Posted. Now it's wrong.
Forums
[ ] it's not possible to create a Forum thread without a Owner.
Bug? If not, then remove "No signature" from selection box
[X] the tooltip over GXS ids should show the avatar on the left side.
[ ] fix data race between GXS ID default icons
[ ] fix data race between GXS ID default icons
GUI General
[ ] do we keep "Getting Started" ? the look needs to be improved
@ -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
[ ] Distant chat window should show GXS avatars
[X] Distant chat window should show GXS avatars
[ ] Distant chat should work with shared identities
[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.
[ ] Add timeout to Identities that are unused. Need to keep a time stamp list, updated
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
[ ] Friends => Friend nodes
@ -49,10 +51,15 @@ List of fixes/improvements before 0.6
[X] remove the Ghost news feed items
[X] remove the double feed publication
libretroshare
[ ] fix the data race in pqissl
[ ] make a valgrind pass for
libretroshare
[ ] fix the data race in pqissl
[ ] make a valgrind pass for
[ ] remove mktemp => use mkstemp
Packaging
[ ] check compilation on debian
[ ] check compilation on ARM
Post v0.6 release changes
=========================

View File

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

View File

@ -63,8 +63,11 @@ void PopupDistantChatDialog::init(const RsGxsId &gxs_id,const QString & title)
_pid = gxs_id ;
PopupChatDialog::init(ChatId(gxs_id), title) ;
// hide avatar frame, because it does not have funcntionality for gxs
showAvatarFrame(false);
RsGxsId own_gxs_id ;
uint32_t status ;
if(rsMsgs->getDistantChatStatus(gxs_id,status,&own_gxs_id))
ui.ownAvatarWidget->setOwnId(own_gxs_id);
}
void PopupDistantChatDialog::updateDisplay()
@ -164,5 +167,14 @@ QString PopupDistantChatDialog::getPeerName(const ChatId &id) 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();
refreshStatus();
}
void AvatarWidget::setOwnId(const RsGxsId& own_gxs_id)
{
mFlag.isOwnId = true;
setId(ChatId(own_gxs_id));
}
void AvatarWidget::setOwnId()
{
mFlag.isOwnId = true;