mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-20 20:34:25 -04:00
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:
parent
46a001af47
commit
9b695977ae
3 changed files with 51 additions and 14 deletions
|
@ -428,7 +428,7 @@ void MessagesDialog::insertMsgTxtAndFiles()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cid = qtwi -> text(7).toStdString();
|
cid = qtwi -> text(7).toStdString();
|
||||||
mid = qtwi -> text(8).toStdString();
|
mid = qtwi -> text(8).toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Save the Data.... for later */
|
/* Save the Data.... for later */
|
||||||
|
@ -491,11 +491,40 @@ void MessagesDialog::insertMsgTxtAndFiles()
|
||||||
|
|
||||||
|
|
||||||
/* add the Msg */
|
/* add the Msg */
|
||||||
std::string msgtext = "Title: " + mi -> title;
|
std::ostringstream msgout;
|
||||||
msgtext += "\nHdr: " + mi -> header;
|
std::list<PersonInfo>::const_iterator pit;
|
||||||
msgtext += "\n-----------------\n" + mi -> msg;
|
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 */
|
rsiface->unlockData(); /* Unlock Interface */
|
||||||
|
|
||||||
|
|
|
@ -261,8 +261,8 @@ virtual int FileSetBandwidthTotals(float outkB, float inkB) = 0;
|
||||||
/****************************************/
|
/****************************************/
|
||||||
/* Message Items */
|
/* Message Items */
|
||||||
virtual int MessageSend(MessageInfo &info) = 0;
|
virtual int MessageSend(MessageInfo &info) = 0;
|
||||||
virtual int MessageDelete(std::string id) = 0;
|
virtual int MessageDelete(std::string mid) = 0;
|
||||||
virtual int MessageRead(std::string id) = 0;
|
virtual int MessageRead(std::string mid) = 0;
|
||||||
|
|
||||||
/* Channel Items */
|
/* Channel Items */
|
||||||
virtual int ChannelCreateNew(ChannelInfo &info) = 0;
|
virtual int ChannelCreateNew(ChannelInfo &info) = 0;
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
#define RSCERTIDLEN 16
|
#define RSCERTIDLEN 16
|
||||||
|
|
||||||
class RsCertId
|
class RsCertId
|
||||||
|
@ -47,13 +49,11 @@ class RsCertId
|
||||||
|
|
||||||
std::ostream &operator<<(std::ostream &out, const RsCertId &id);
|
std::ostream &operator<<(std::ostream &out, const RsCertId &id);
|
||||||
|
|
||||||
/* use RsCertId, (not unsigned long) because the definition will change
|
#endif
|
||||||
typedef unsigned long RsCertId;
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef RsCertId RsChanId;
|
|
||||||
typedef RsCertId RsMsgId;
|
|
||||||
|
|
||||||
|
typedef std::string RsCertId;
|
||||||
|
typedef std::string RsChanId;
|
||||||
|
typedef std::string RsMsgId;
|
||||||
typedef std::string RsAuthId;
|
typedef std::string RsAuthId;
|
||||||
|
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ class FileTransferInfo: public FileInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::string source;
|
std::string source;
|
||||||
|
std::list<std::string> peerIds;
|
||||||
int transfered;
|
int transfered;
|
||||||
double tfRate; /* kbytes */
|
double tfRate; /* kbytes */
|
||||||
bool download;
|
bool download;
|
||||||
|
@ -223,9 +224,16 @@ class MessageInfo: public BaseInfo
|
||||||
|
|
||||||
unsigned int msgflags;
|
unsigned int msgflags;
|
||||||
std::string srcname;
|
std::string srcname;
|
||||||
|
|
||||||
|
std::list<PersonInfo> msgto;
|
||||||
|
std::list<PersonInfo> msgcc;
|
||||||
|
std::list<PersonInfo> msgbcc;
|
||||||
|
|
||||||
std::string title;
|
std::string title;
|
||||||
std::string header;
|
|
||||||
std::string msg;
|
std::string msg;
|
||||||
|
|
||||||
|
std::string attach_title;
|
||||||
|
std::string attach_comment;
|
||||||
std::list<FileInfo> files;
|
std::list<FileInfo> files;
|
||||||
int size; /* total of files */
|
int size; /* total of files */
|
||||||
int count; /* file count */
|
int count; /* file count */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue