mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 08:25:53 -04:00
simplification of the chat interface to libretroshare using a single unified class for chat IDs. Used a common chat widget for all chats including broadcast. Opens the way to having plugins send/recv chat messages. Patch from Electron.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7800 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
535fe875e4
commit
13d7866171
53 changed files with 1180 additions and 2280 deletions
|
@ -58,10 +58,13 @@ PopupDistantChatDialog::PopupDistantChatDialog(QWidget *parent, Qt::WindowFlags
|
|||
updateDisplay() ;
|
||||
}
|
||||
|
||||
void PopupDistantChatDialog::init(const RsPeerId &pid,const QString & title)
|
||||
void PopupDistantChatDialog::init(const RsGxsId &gxs_id,const QString & title)
|
||||
{
|
||||
_pid = RsGxsId(pid) ;
|
||||
PopupChatDialog::init(pid,title) ;
|
||||
_pid = gxs_id ;
|
||||
PopupChatDialog::init(ChatId(gxs_id), title) ;
|
||||
|
||||
// hide avatar frame, because it does not have funcntionality for gxs
|
||||
showAvatarFrame(false);
|
||||
}
|
||||
|
||||
void PopupDistantChatDialog::updateDisplay()
|
||||
|
@ -137,15 +140,16 @@ void PopupDistantChatDialog::closeEvent(QCloseEvent *e)
|
|||
PopupChatDialog::closeEvent(e) ;
|
||||
}
|
||||
|
||||
QString PopupDistantChatDialog::getPeerName(const RsPeerId& id) const
|
||||
QString PopupDistantChatDialog::getPeerName(const ChatId &id) const
|
||||
{
|
||||
uint32_t status ;
|
||||
|
||||
RsIdentityDetails details ;
|
||||
|
||||
if(rsIdentity->getIdDetails(RsGxsId(id),details))
|
||||
if(rsIdentity->getIdDetails(id.toGxsId(),details))
|
||||
return QString::fromUtf8( details.mNickname.c_str() ) ;
|
||||
else
|
||||
return QString::fromStdString(id.toStdString()) ;
|
||||
return QString::fromStdString(id.toGxsId().toStdString()) ;
|
||||
}
|
||||
|
||||
QString PopupDistantChatDialog::getOwnName() const
|
||||
{
|
||||
return QString("me (TODO: gxs-name)");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue