- Change methods of RsMsgs from "std::string" to "const std::string&"

- Fixed sent messages doesn't get the flag RS_MSG_FLAGS_NEW
- Rework reply and forward message, now the replied or forwarded message gets the state and not the answer itself
- Added RsMsgParentId (with test) to save the parent of the message in draft
- Change methods of MessageComposer from "std::string" to "QString"
- Show image in the message row in MessagesDialog again
- Fixed umlauts in recommended files in MessageComposer
- Renamed tab "Live Chat" in "Group Chat"
- Fixed german translation

recompile of the GUI needed

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3741 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-11-02 21:11:11 +00:00
parent 935903287d
commit 3c65283f8f
22 changed files with 820 additions and 382 deletions

View file

@ -57,7 +57,7 @@ bool p3Msgs::getMessageSummaries(std::list<MsgInfoSummary> &msgList)
bool p3Msgs::getMessage(std::string mid, MessageInfo &msg)
bool p3Msgs::getMessage(const std::string &mid, MessageInfo &msg)
{
return mMsgSrv->getMessage(mid, msg);
}
@ -75,19 +75,24 @@ bool p3Msgs::MessageSend(MessageInfo &info)
return mMsgSrv->MessageSend(info);
}
bool p3Msgs::MessageToDraft(MessageInfo &info)
bool p3Msgs::MessageToDraft(MessageInfo &info, const std::string &msgParentId)
{
return mMsgSrv->MessageToDraft(info);
return mMsgSrv->MessageToDraft(info, msgParentId);
}
bool p3Msgs::MessageToTrash(std::string mid, bool bTrash)
bool p3Msgs::MessageToTrash(const std::string &mid, bool bTrash)
{
return mMsgSrv->MessageToTrash(mid, bTrash);
return mMsgSrv->MessageToTrash(mid, bTrash);
}
bool p3Msgs::getMsgParentId(const std::string &msgId, std::string &msgParentId)
{
return mMsgSrv->getMsgParentId(msgId, msgParentId);
}
/****************************************/
/****************************************/
bool p3Msgs::MessageDelete(std::string mid)
bool p3Msgs::MessageDelete(const std::string &mid)
{
//std::cerr << "p3Msgs::MessageDelete() ";
//std::cerr << "mid: " << mid << std::endl;
@ -95,7 +100,7 @@ bool p3Msgs::MessageDelete(std::string mid)
return mMsgSrv -> removeMsgId(mid);
}
bool p3Msgs::MessageRead(std::string mid, bool bUnreadByUser)
bool p3Msgs::MessageRead(const std::string &mid, bool bUnreadByUser)
{
//std::cerr << "p3Msgs::MessageRead() ";
//std::cerr << "mid: " << mid << std::endl;
@ -103,6 +108,16 @@ bool p3Msgs::MessageRead(std::string mid, bool bUnreadByUser)
return mMsgSrv -> markMsgIdRead(mid, bUnreadByUser);
}
bool p3Msgs::MessageReplied(const std::string &mid, bool replied)
{
return mMsgSrv->setMsgFlag(mid, replied ? RS_MSG_FLAGS_REPLIED : 0, RS_MSG_FLAGS_REPLIED);
}
bool p3Msgs::MessageForwarded(const std::string &mid, bool forwarded)
{
return mMsgSrv->setMsgFlag(mid, forwarded ? RS_MSG_FLAGS_FORWARDED : 0, RS_MSG_FLAGS_FORWARDED);
}
bool p3Msgs::getMessageTagTypes(MsgTagType& tags)
{
return mMsgSrv->getMessageTagTypes(tags);
@ -118,12 +133,12 @@ bool p3Msgs::removeMessageTagType(uint32_t tagId)
return mMsgSrv->removeMessageTagType(tagId);
}
bool p3Msgs::getMessageTag(std::string msgId, MsgTagInfo& info)
bool p3Msgs::getMessageTag(const std::string &msgId, MsgTagInfo& info)
{
return mMsgSrv->getMessageTag(msgId, info);
}
bool p3Msgs::setMessageTag(std::string msgId, uint32_t tagId, bool set)
bool p3Msgs::setMessageTag(const std::string &msgId, uint32_t tagId, bool set)
{
return mMsgSrv->setMessageTag(msgId, tagId, set);
}

View file

@ -54,22 +54,25 @@ class p3Msgs: public RsMsgs
* @param msgList ref to list summarising client's msgs
*/
virtual bool getMessageSummaries(std::list<MsgInfoSummary> &msgList);
virtual bool getMessage(std::string mId, MessageInfo &msg);
virtual bool getMessage(const std::string &mId, MessageInfo &msg);
virtual void getMessageCount(unsigned int *pnInbox, unsigned int *pnInboxNew, unsigned int *pnOutbox, unsigned int *pnDraftbox, unsigned int *pnSentbox, unsigned int *pnTrashbox);
virtual bool MessageSend(MessageInfo &info);
virtual bool MessageToDraft(MessageInfo &info);
virtual bool MessageToTrash(std::string mid, bool bTrash);
virtual bool MessageDelete(std::string mid);
virtual bool MessageRead(std::string mid, bool bUnreadByUser);
virtual bool MessageToDraft(MessageInfo &info, const std::string &msgParentId);
virtual bool MessageToTrash(const std::string &mid, bool bTrash);
virtual bool MessageDelete(const std::string &mid);
virtual bool MessageRead(const std::string &mid, bool bUnreadByUser);
virtual bool MessageReplied(const std::string &mid, bool replied);
virtual bool MessageForwarded(const std::string &mid, bool forwarded);
virtual bool getMsgParentId(const std::string &msgId, std::string &msgParentId);
virtual bool getMessageTagTypes(MsgTagType& tags);
virtual bool setMessageTagType(uint32_t tagId, std::string& text, uint32_t rgb_color);
virtual bool removeMessageTagType(uint32_t tagId);
virtual bool getMessageTag(std::string msgId, MsgTagInfo& info);
virtual bool getMessageTag(const std::string &msgId, MsgTagInfo& info);
/* set == false && tagId == 0 --> remove all */
virtual bool setMessageTag(std::string msgId, uint32_t tagId, bool set);
virtual bool setMessageTag(const std::string &msgId, uint32_t tagId, bool set);
virtual bool resetMessageStandardTagTypes(MsgTagType& tags);