mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
Added "peer is typing" functionality to private chat. This shoudld be extended to additional stuff like "idle", and to public chat. Also the display is the status bar of the chat window could be made nicer, e.g. directly in the msg window. Suppressed ChatDialog class that is not more used
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1164 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ce3db07a63
commit
e144e75ba6
18 changed files with 495 additions and 975 deletions
|
@ -109,6 +109,11 @@ bool p3Msgs::ChatSend(ChatInfo &ci)
|
|||
return true;
|
||||
}
|
||||
|
||||
void p3Msgs::sendStatusString(const std::string& peer_id,const std::string& status_string)
|
||||
{
|
||||
mChatSrv->sendStatusString(peer_id,status_string);
|
||||
}
|
||||
|
||||
bool p3Msgs::chatAvailable()
|
||||
{
|
||||
return mChatSrv->receivedItems();
|
||||
|
@ -119,13 +124,13 @@ bool p3Msgs::getNewChat(std::list<ChatInfo> &chats)
|
|||
/* get any messages and push them to iface */
|
||||
|
||||
// get the items from the list.
|
||||
std::list<RsChatItem *> clist = mChatSrv -> getChatQueue();
|
||||
std::list<RsChatMsgItem *> clist = mChatSrv -> getChatQueue();
|
||||
if (clist.size() < 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::list<RsChatItem *>::iterator it;
|
||||
std::list<RsChatMsgItem *>::iterator it;
|
||||
for(it = clist.begin(); it != clist.end(); it++)
|
||||
{
|
||||
ChatInfo ci;
|
||||
|
@ -142,7 +147,7 @@ bool p3Msgs::getNewChat(std::list<ChatInfo> &chats)
|
|||
* for intAddChannel / intAddChannelMsg.
|
||||
*/
|
||||
|
||||
void p3Msgs::initRsChatInfo(RsChatItem *c, ChatInfo &i)
|
||||
void p3Msgs::initRsChatInfo(RsChatMsgItem *c, ChatInfo &i)
|
||||
{
|
||||
i.rsid = c -> PeerId();
|
||||
i.name = mAuthMgr->getName(i.rsid);
|
||||
|
|
|
@ -32,7 +32,7 @@ class p3AuthMgr;
|
|||
class p3MsgService;
|
||||
class p3ChatService;
|
||||
|
||||
class RsChatItem;
|
||||
class RsChatMsgItem;
|
||||
|
||||
class p3Msgs: public RsMsgs
|
||||
{
|
||||
|
@ -62,13 +62,14 @@ class p3Msgs: public RsMsgs
|
|||
virtual bool chatAvailable();
|
||||
virtual bool ChatSend(ChatInfo &ci);
|
||||
virtual bool getNewChat(std::list<ChatInfo> &chats);
|
||||
virtual void sendStatusString(const std::string& peer_id,const std::string& status_string) ;
|
||||
|
||||
/****************************************/
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void initRsChatInfo(RsChatItem *c, ChatInfo &i);
|
||||
void initRsChatInfo(RsChatMsgItem *c, ChatInfo &i);
|
||||
|
||||
p3AuthMgr *mAuthMgr;
|
||||
p3MsgService *mMsgSrv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue