Modifications to the GUI to support new message types.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@277 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2007-12-12 02:55:50 +00:00
parent 46a001af47
commit 9b695977ae
3 changed files with 51 additions and 14 deletions

View File

@ -428,7 +428,7 @@ void MessagesDialog::insertMsgTxtAndFiles()
else
{
cid = qtwi -> text(7).toStdString();
mid = qtwi -> text(8).toStdString();
mid = qtwi -> text(8).toStdString();
}
/* Save the Data.... for later */
@ -491,11 +491,40 @@ void MessagesDialog::insertMsgTxtAndFiles()
/* add the Msg */
std::string msgtext = "Title: " + mi -> title;
msgtext += "\nHdr: " + mi -> header;
msgtext += "\n-----------------\n" + mi -> msg;
std::ostringstream msgout;
std::list<PersonInfo>::const_iterator pit;
msgout << "Msg Header ----------------- TS: " << mi->ts;
if (mi->msgto.size() > 0)
msgout << std::endl << "To: ";
for(pit = mi->msgto.begin(); pit != mi->msgto.end(); pit++)
{
msgout << pit->name << " (" << pit->id << "), ";
}
ui.msgText->setText(QString::fromStdString(msgtext));
if (mi->msgcc.size() > 0)
msgout << std::endl << "Cc: ";
for(pit = mi->msgcc.begin(); pit != mi->msgcc.end(); pit++)
{
msgout << pit->name << " (" << pit->id << "), ";
}
if (mi->msgbcc.size() > 0)
msgout << std::endl << "Bcc: ";
for(pit = mi->msgbcc.begin(); pit != mi->msgbcc.end(); pit++)
{
msgout << pit->name << " (" << pit->id << "), ";
}
msgout << std::endl;
msgout << "----------------------------";
msgout << std::endl;
msgout << "Subject: " << mi -> title << std::endl;
msgout << "Message: " << std::endl;
msgout << mi->msg << std::endl;
ui.msgText->setText(QString::fromStdString(msgout.str()));
rsiface->unlockData(); /* Unlock Interface */

View File

@ -261,8 +261,8 @@ virtual int FileSetBandwidthTotals(float outkB, float inkB) = 0;
/****************************************/
/* Message Items */
virtual int MessageSend(MessageInfo &info) = 0;
virtual int MessageDelete(std::string id) = 0;
virtual int MessageRead(std::string id) = 0;
virtual int MessageDelete(std::string mid) = 0;
virtual int MessageRead(std::string mid) = 0;
/* Channel Items */
virtual int ChannelCreateNew(ChannelInfo &info) = 0;

View File

@ -31,6 +31,8 @@
#include <iostream>
#include <string>
#if 0
#define RSCERTIDLEN 16
class RsCertId
@ -47,13 +49,11 @@ class RsCertId
std::ostream &operator<<(std::ostream &out, const RsCertId &id);
/* use RsCertId, (not unsigned long) because the definition will change
typedef unsigned long RsCertId;
*/
typedef RsCertId RsChanId;
typedef RsCertId RsMsgId;
#endif
typedef std::string RsCertId;
typedef std::string RsChanId;
typedef std::string RsMsgId;
typedef std::string RsAuthId;
@ -192,6 +192,7 @@ class FileTransferInfo: public FileInfo
{
public:
std::string source;
std::list<std::string> peerIds;
int transfered;
double tfRate; /* kbytes */
bool download;
@ -223,9 +224,16 @@ class MessageInfo: public BaseInfo
unsigned int msgflags;
std::string srcname;
std::list<PersonInfo> msgto;
std::list<PersonInfo> msgcc;
std::list<PersonInfo> msgbcc;
std::string title;
std::string header;
std::string msg;
std::string attach_title;
std::string attach_comment;
std::list<FileInfo> files;
int size; /* total of files */
int count; /* file count */