mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 23:02:29 -04:00
- 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:
parent
935903287d
commit
3c65283f8f
22 changed files with 820 additions and 382 deletions
|
@ -1704,16 +1704,13 @@ void ForumsDialog::replytomessage()
|
|||
|
||||
if (rsPeers->getPeerName(msgInfo.srcId) !="")
|
||||
{
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText( (QString("Re:") + " " + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||
nMsgDialog->setWindowTitle(tr("Re:") + " " + QString::fromStdWString(msgInfo.title) ) ;
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
nMsgDialog->insertTitleText(QString::fromStdWString(msgInfo.title), MessageComposer::REPLY);
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
nMsgDialog->insertPastedText(cited_text) ;
|
||||
nMsgDialog->insertPastedText(doc.toPlainText());
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
|
|
@ -66,10 +66,11 @@
|
|||
|
||||
#define COLUMN_DATA 0 // column for storing the userdata like msgid and srcid
|
||||
|
||||
#define ROLE_SORT Qt::UserRole
|
||||
#define ROLE_MSGID Qt::UserRole + 1
|
||||
#define ROLE_SRCID Qt::UserRole + 2
|
||||
#define ROLE_UNREAD Qt::UserRole + 3
|
||||
#define ROLE_SORT Qt::UserRole
|
||||
#define ROLE_MSGID Qt::UserRole + 1
|
||||
#define ROLE_SRCID Qt::UserRole + 2
|
||||
#define ROLE_UNREAD Qt::UserRole + 3
|
||||
#define ROLE_MSGFLAGS Qt::UserRole + 4
|
||||
|
||||
#define ROW_INBOX 0
|
||||
#define ROW_OUTBOX 1
|
||||
|
@ -737,11 +738,13 @@ void MessagesDialog::folderlistWidgetCostumPopupMenu(QPoint point)
|
|||
|
||||
void MessagesDialog::newmessage()
|
||||
{
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* fill it in */
|
||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
|
@ -757,16 +760,11 @@ void MessagesDialog::editmessage()
|
|||
if(!getCurrentMsg(cid, mid))
|
||||
return ;
|
||||
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs->getMessage(mid, msgInfo)) {
|
||||
std::cerr << "MessagesDialog::editmessage() Couldn't find Msg" << std::endl;
|
||||
MessageComposer *pMsgDialog = MessageComposer::newMsg(mid);
|
||||
if (pMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
MessageComposer *pMsgDialog = new MessageComposer();
|
||||
/* fill it in */
|
||||
pMsgDialog->newMsg(msgInfo.msgId);
|
||||
|
||||
pMsgDialog->show();
|
||||
pMsgDialog->activateWindow();
|
||||
|
||||
|
@ -786,35 +784,11 @@ void MessagesDialog::replytomessage()
|
|||
mCurrCertId = cid;
|
||||
mCurrMsgId = mid;
|
||||
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs -> getMessage(mid, msgInfo))
|
||||
return ;
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
/* fill it in */
|
||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
|
||||
QString text = QString::fromStdWString(msgInfo.title);
|
||||
|
||||
if (text.startsWith("Re:", Qt::CaseInsensitive))
|
||||
{
|
||||
nMsgDialog->insertTitleText( QString::fromStdWString(msgInfo.title).toStdString()) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
nMsgDialog->insertTitleText( (QString("Re:") + " " + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||
MessageComposer *nMsgDialog = MessageComposer::replyMsg(mid, false);
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->setWindowTitle( tr ("Compose: ") + tr("Re:") + " " + QString::fromStdWString(msgInfo.title) ) ;
|
||||
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
nMsgDialog->insertPastedText(cited_text) ;
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
|
@ -834,40 +808,9 @@ void MessagesDialog::replyallmessage()
|
|||
mCurrCertId = cid;
|
||||
mCurrMsgId = mid;
|
||||
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs -> getMessage(mid, msgInfo))
|
||||
return ;
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
/* fill it in */
|
||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
|
||||
QString text = QString::fromStdWString(msgInfo.title);
|
||||
|
||||
if (text.startsWith("Re:", Qt::CaseInsensitive))
|
||||
{
|
||||
nMsgDialog->insertTitleText( QString::fromStdWString(msgInfo.title).toStdString()) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
nMsgDialog->insertTitleText( (QString("Re:") + " " + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||
}
|
||||
nMsgDialog->setWindowTitle( tr ("Compose: ") + tr("Re:") + " " + QString::fromStdWString(msgInfo.title) ) ;
|
||||
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
nMsgDialog->insertPastedText(cited_text) ;
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
|
||||
std::list<std::string> tl ( msgInfo.msgto );
|
||||
|
||||
for ( std::list<std::string>::iterator tli = tl.begin(); tli!= tl.end(); tli++ )
|
||||
{
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, *tli, false) ;
|
||||
MessageComposer *nMsgDialog = MessageComposer::replyMsg(mid, true);
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->show();
|
||||
|
@ -889,46 +832,11 @@ void MessagesDialog::forwardmessage()
|
|||
mCurrCertId = cid;
|
||||
mCurrMsgId = mid;
|
||||
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs -> getMessage(mid, msgInfo))
|
||||
return ;
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
/* fill it in */
|
||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
|
||||
QString text = QString::fromStdWString(msgInfo.title);
|
||||
|
||||
if (text.startsWith("Fwd:", Qt::CaseInsensitive))
|
||||
{
|
||||
nMsgDialog->insertTitleText( QString::fromStdWString(msgInfo.title).toStdString()) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
nMsgDialog->insertTitleText( (QString("Fwd:") + " " + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||
MessageComposer *nMsgDialog = MessageComposer::forwardMsg(mid);
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->setWindowTitle( tr ("Compose:") + " " + tr("Fwd:") + " " + QString::fromStdWString(msgInfo.title) ) ;
|
||||
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
nMsgDialog->insertForwardPastedText(cited_text) ;
|
||||
|
||||
std::list<FileInfo>& files_info = msgInfo.files;
|
||||
|
||||
/* enable all files for sending */
|
||||
std::list<FileInfo>::iterator it;
|
||||
for(it = files_info.begin(); it != files_info.end(); it++)
|
||||
{
|
||||
it->inRecommend = true;
|
||||
}
|
||||
|
||||
nMsgDialog->insertFileList(files_info);
|
||||
//nMsgDialog->addRecipient( msgInfo.srcId ) ;
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
|
@ -1087,31 +995,37 @@ void MessagesDialog::messagesTagsChanged()
|
|||
insertMessages();
|
||||
}
|
||||
|
||||
static void InitIconAndFont(QStandardItem *pItem [COLUMN_COUNT], int nFlag)
|
||||
static void InitIconAndFont(QStandardItem *pItem [COLUMN_COUNT])
|
||||
{
|
||||
QString sText = pItem [COLUMN_SUBJECT]->text();
|
||||
QString mid = pItem [COLUMN_DATA]->data(ROLE_MSGID).toString();
|
||||
int nFlag = pItem [COLUMN_DATA]->data(ROLE_MSGFLAGS).toInt();
|
||||
|
||||
// show the real "New" state
|
||||
if (nFlag & RS_MSG_NEW) {
|
||||
if (sText.startsWith("Re:", Qt::CaseInsensitive)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied.png"));
|
||||
} else if (sText.startsWith("Fwd:", Qt::CaseInsensitive)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-forwarded.png"));
|
||||
} else {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail.png"));
|
||||
}
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-state-new.png"));
|
||||
} else {
|
||||
// Change Message icon when Subject is Re: or Fwd:
|
||||
if (sText.startsWith("Re:", Qt::CaseInsensitive)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied-read.png"));
|
||||
} else if (sText.startsWith("Fwd:", Qt::CaseInsensitive)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-forwarded-read.png"));
|
||||
if (nFlag & RS_MSG_UNREAD_BY_USER) {
|
||||
if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == RS_MSG_REPLIED) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied.png"));
|
||||
} else if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == RS_MSG_FORWARDED) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-forwarded.png"));
|
||||
} else if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == (RS_MSG_REPLIED | RS_MSG_FORWARDED)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied-forw.png"));
|
||||
} else {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail.png"));
|
||||
}
|
||||
} else {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-read.png"));
|
||||
if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == RS_MSG_REPLIED) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied-read.png"));
|
||||
} else if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == RS_MSG_FORWARDED) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-forwarded-read.png"));
|
||||
} else if ((nFlag & (RS_MSG_REPLIED | RS_MSG_FORWARDED)) == (RS_MSG_REPLIED | RS_MSG_FORWARDED)) {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-replied-forw-read.png"));
|
||||
} else {
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon(":/images/message-mail-read.png"));
|
||||
}
|
||||
}
|
||||
pItem[COLUMN_SUBJECT]->setIcon(QIcon());
|
||||
}
|
||||
|
||||
bool bNew = nFlag & (RS_MSG_NEW | RS_MSG_UNREAD_BY_USER);
|
||||
|
@ -1405,9 +1319,10 @@ void MessagesDialog::insertMessages()
|
|||
QString msgId = QString::fromStdString(it->msgId);
|
||||
item[COLUMN_DATA]->setData(QString::fromStdString(it->srcId), ROLE_SRCID);
|
||||
item[COLUMN_DATA]->setData(msgId, ROLE_MSGID);
|
||||
item[COLUMN_DATA]->setData(it->msgflags, ROLE_MSGFLAGS);
|
||||
|
||||
// Init icon and font
|
||||
InitIconAndFont(item, it->msgflags);
|
||||
InitIconAndFont(item);
|
||||
|
||||
// Tags
|
||||
MsgTagInfo tagInfo;
|
||||
|
@ -1555,7 +1470,18 @@ void MessagesDialog::setMsgAsReadUnread(const QList<int> &Rows, bool bRead)
|
|||
std::string mid = item[COLUMN_DATA]->data(ROLE_MSGID).toString().toStdString();
|
||||
|
||||
if (rsMsgs->MessageRead(mid, !bRead)) {
|
||||
InitIconAndFont(item, bRead ? 0 : RS_MSG_UNREAD_BY_USER);
|
||||
int nFlag = item[COLUMN_DATA]->data(ROLE_MSGFLAGS).toInt();
|
||||
nFlag &= ~RS_MSG_NEW;
|
||||
|
||||
if (bRead) {
|
||||
nFlag &= ~RS_MSG_UNREAD_BY_USER;
|
||||
} else {
|
||||
nFlag |= RS_MSG_UNREAD_BY_USER;
|
||||
}
|
||||
|
||||
item[COLUMN_DATA]->setData(nFlag, ROLE_MSGFLAGS);
|
||||
|
||||
InitIconAndFont(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1433,9 +1433,9 @@ void PeersDialog::insertChat()
|
|||
QString notifyMsg = name + ": " + editor.toPlainText();
|
||||
|
||||
if(notifyMsg.length() > 30)
|
||||
emit notifyGroupChat(QString("New group chat"), notifyMsg.left(30) + QString("..."));
|
||||
emit notifyGroupChat(tr("New group chat"), notifyMsg.left(30) + QString("..."));
|
||||
else
|
||||
emit notifyGroupChat(QString("New group chat"), notifyMsg);
|
||||
emit notifyGroupChat(tr("New group chat"), notifyMsg);
|
||||
}
|
||||
|
||||
historyKeeper.addMessage(incoming, it->rsid, name, sendTime, recvTime, msg);
|
||||
|
|
|
@ -899,7 +899,7 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Live Chat</string>
|
||||
<string>Group Chat</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
|
|
|
@ -1199,12 +1199,14 @@ void SearchDialog::sendLinkTo( )
|
|||
copysearchLink();
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("New RetroShare Link(s)");
|
||||
nMsgDialog->insertTitleText(tr("New RetroShare Link(s)"));
|
||||
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml().toStdString()) ;
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml()) ;
|
||||
nMsgDialog->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
|
|
|
@ -410,16 +410,18 @@ void SharedFilesDialog::sendremoteLinkTo()
|
|||
copyLinkRemote ();
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* fill it in
|
||||
* files are receommended already
|
||||
* just need to set peers
|
||||
*/
|
||||
std::cerr << "SharedFilesDialog::sendremoteLinkTo()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("RetroShare Link");
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml().toStdString());
|
||||
nMsgDialog->insertTitleText(tr("RetroShare Link"));
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml());
|
||||
|
||||
nMsgDialog->show();
|
||||
|
||||
|
@ -431,40 +433,43 @@ void SharedFilesDialog::sendLinkTo()
|
|||
copyLinkLocal ();
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* fill it in
|
||||
* files are receommended already
|
||||
* just need to set peers
|
||||
*/
|
||||
std::cerr << "SharedFilesDialog::sendLinkTo()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("RetroShare Link");
|
||||
nMsgDialog->insertTitleText(tr("RetroShare Link"));
|
||||
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml().toStdString());
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml());
|
||||
|
||||
nMsgDialog->show();
|
||||
|
||||
/* window will destroy itself! */
|
||||
}
|
||||
|
||||
void SharedFilesDialog::sendHtmlLinkTo( )
|
||||
void SharedFilesDialog::sendHtmlLinkTo()
|
||||
{
|
||||
copyLinkLocal ();
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* fill it in
|
||||
* files are receommended already
|
||||
* just need to set peers
|
||||
*/
|
||||
std::cerr << "SharedFilesDialog::sendLinkTo()" << std::endl;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("RetroShare Link");
|
||||
nMsgDialog->insertTitleText(tr("RetroShare Link"));
|
||||
// nMsgDialog->insertHtmlText(QApplication::clipboard()->text().toStdString());// not compatible with multiple links
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml().toStdString());
|
||||
nMsgDialog->insertMsgText(RSLinkClipboard::toHtml());
|
||||
|
||||
nMsgDialog->show();
|
||||
|
||||
|
@ -588,7 +593,10 @@ void SharedFilesDialog::recommendFilesTo( std::string rsid )
|
|||
return ;
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* fill it in
|
||||
* files are receommended already
|
||||
|
@ -596,9 +604,14 @@ void SharedFilesDialog::recommendFilesTo( std::string rsid )
|
|||
*/
|
||||
|
||||
nMsgDialog->insertFileList(files_info) ;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("Recommendation(s)");
|
||||
nMsgDialog->insertMsgText(rsPeers->getPeerName(rsPeers->getOwnId())+" recommends " + ( (files_info.size()>1)?"a list of files":"a file")+" to you");
|
||||
nMsgDialog->insertTitleText(tr("Recommendation(s)"));
|
||||
|
||||
QString peerName = QString::fromStdString(rsPeers->getPeerName(rsPeers->getOwnId()));
|
||||
if (files_info.size() > 1) {
|
||||
nMsgDialog->insertMsgText(tr("%1 recommends a list of files to you").arg(peerName));
|
||||
} else {
|
||||
nMsgDialog->insertMsgText(tr("%1 recommends a file to you").arg(peerName));
|
||||
}
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, rsid, false) ;
|
||||
|
||||
nMsgDialog->sendMessage();
|
||||
|
@ -618,12 +631,14 @@ void SharedFilesDialog::recommendFilesToMsg( std::string rsid )
|
|||
|
||||
/* create a message */
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->insertFileList(files_info) ;
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText("Recommendation(s)");
|
||||
nMsgDialog->insertMsgText("Recommendation(s)");
|
||||
nMsgDialog->insertTitleText(tr("Recommendation(s)"));
|
||||
nMsgDialog->insertMsgText(tr("Recommendation(s)"));
|
||||
nMsgDialog->show();
|
||||
|
||||
std::cout << "recommending to " << rsid << std::endl ;
|
||||
|
|
|
@ -196,8 +196,10 @@ void ChatMsgItem::sendMsg()
|
|||
if (mParent)
|
||||
{
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
nMsgDialog->newMsg();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, mPeerId, false);
|
||||
nMsgDialog->show();
|
||||
|
|
|
@ -254,26 +254,15 @@ void MsgItem::replyMsg()
|
|||
{
|
||||
//mParent->openMsg(FEEDHOLDER_MSG_MESSAGE, mPeerId, mMsgId);
|
||||
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs -> getMessage(mMsgId, msgInfo))
|
||||
return ;
|
||||
MessageComposer *nMsgDialog = MessageComposer::replyMsg(mMsgId, false);
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
nMsgDialog->newMsg();
|
||||
nMsgDialog->insertTitleText( (QString("Re: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
std::string cited_text(doc.toPlainText().toStdString()) ;
|
||||
|
||||
nMsgDialog->insertPastedText(cited_text) ;
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
nMsgDialog->show();
|
||||
nMsgDialog->activateWindow();
|
||||
|
||||
/* window will destroy itself! */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -302,8 +302,10 @@ void PeerItem::sendMsg()
|
|||
{
|
||||
//mParent->openMsg(FEEDHOLDER_MSG_MESSAGE, mPeerId, "");
|
||||
|
||||
MessageComposer *nMsgDialog = new MessageComposer();
|
||||
nMsgDialog->newMsg();
|
||||
MessageComposer *nMsgDialog = MessageComposer::newMsg();
|
||||
if (nMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
nMsgDialog->addRecipient(MessageComposer::TO, mPeerId, false);
|
||||
nMsgDialog->show();
|
||||
|
|
|
@ -282,6 +282,8 @@
|
|||
<file>images/message-mail-forwarded-read.png</file>
|
||||
<file>images/message-mail-replied.png</file>
|
||||
<file>images/message-mail-forwarded.png</file>
|
||||
<file>images/message-mail-replied-forw.png</file>
|
||||
<file>images/message-mail-replied-forw-read.png</file>
|
||||
<file>images/message-state-read.png</file>
|
||||
<file>images/message-state-unread.png</file>
|
||||
<file>images/message-state-header.png</file>
|
||||
|
|
|
@ -102,6 +102,8 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
|
|||
/* Invoke the Qt Designer generated object setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
m_msgType = NORMAL;
|
||||
|
||||
setupFileActions();
|
||||
setupEditActions();
|
||||
setupViewActions();
|
||||
|
@ -275,6 +277,9 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WFlags flags)
|
|||
// load settings
|
||||
processSettings(true);
|
||||
|
||||
/* worker fns */
|
||||
insertSendList();
|
||||
|
||||
/* set focus to subject */
|
||||
ui.titleEdit->setFocus();
|
||||
|
||||
|
@ -322,9 +327,10 @@ void MessageComposer::processSettings(bool bLoad)
|
|||
|
||||
/* create a message */
|
||||
|
||||
MessageComposer *pMsgDialog = new MessageComposer();
|
||||
|
||||
pMsgDialog->newMsg();
|
||||
MessageComposer *pMsgDialog = MessageComposer::newMsg();
|
||||
if (pMsgDialog == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (group) {
|
||||
pMsgDialog->addRecipient(TO, id, true);
|
||||
|
@ -383,15 +389,13 @@ void MessageComposer::recommendFriend(std::list <std::string> &peerids)
|
|||
}
|
||||
|
||||
/* create a message */
|
||||
MessageComposer *pMsgDialog = new MessageComposer();
|
||||
MessageComposer *pMsgDialog = MessageComposer::newMsg();
|
||||
|
||||
pMsgDialog->newMsg();
|
||||
pMsgDialog->setWindowTitle(tr("Compose") + ": " + tr("Friend Recommendation")) ;
|
||||
pMsgDialog->insertTitleText(tr("Friend Recommendation(s)").toStdString());
|
||||
pMsgDialog->insertTitleText(tr("Friend Recommendation(s)"));
|
||||
|
||||
std::string sMsgText = tr("I recommend a good friend of me, you can trust him too when you trust me. <br> Copy friend link and paste to Friends list").toStdString();
|
||||
QString sMsgText = tr("I recommend a good friend of me, you can trust him too when you trust me. <br> Copy friend link and paste to Friends list");
|
||||
sMsgText += "<br><br>";
|
||||
sMsgText += BuildRecommendHtml(peerids).toStdString();
|
||||
sMsgText += BuildRecommendHtml(peerids);
|
||||
pMsgDialog->insertMsgText(sMsgText);
|
||||
|
||||
// pMsgDialog->insertFileList(files_info);
|
||||
|
@ -704,7 +708,7 @@ void MessageComposer::insertFileList(const std::list<FileInfo>& files_info)
|
|||
/* make a widget per person */
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem((QTreeWidget*)0);
|
||||
|
||||
item->setText(0, QString::fromStdString(it->fname)); /* (0) Filename */
|
||||
item->setText(0, QString::fromUtf8(it->fname.c_str())); /* (0) Filename */
|
||||
item->setText(1, misc::friendlyUnit(it->size)); /* (1) Size */
|
||||
item->setText(2, QString::number(0)) ;//it->rank));
|
||||
item->setText(3, QString::fromStdString(it->hash));
|
||||
|
@ -820,38 +824,38 @@ static void calculateGroupsOfSslIds(std::list<RsGroupInfo> &existingGroupInfos,
|
|||
}
|
||||
}
|
||||
|
||||
void MessageComposer::newMsg(std::string msgId /*= ""*/)
|
||||
MessageComposer *MessageComposer::newMsg(const std::string &msgId /*= ""*/)
|
||||
{
|
||||
/* clear all */
|
||||
ui.msgText->setText("");
|
||||
MessageComposer *msgComposer = new MessageComposer();
|
||||
|
||||
/* worker fns */
|
||||
insertSendList();
|
||||
msgComposer->addEmptyRecipient();
|
||||
|
||||
ui.recipientWidget->setRowCount(0);
|
||||
addEmptyRecipient();
|
||||
|
||||
m_sMsgId = msgId;
|
||||
m_sDraftMsgId.clear();
|
||||
|
||||
if (m_sMsgId.empty() == false) {
|
||||
if (msgId.empty() == false) {
|
||||
// fill existing message
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs->getMessage(m_sMsgId, msgInfo)) {
|
||||
if (!rsMsgs->getMessage(msgId, msgInfo)) {
|
||||
std::cerr << "MessageComposer::newMsg() Couldn't find Msg" << std::endl;
|
||||
m_sMsgId.clear();
|
||||
return;
|
||||
delete msgComposer;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (msgInfo.msgflags & RS_MSG_DRAFT) {
|
||||
m_sDraftMsgId = msgId;
|
||||
msgComposer->m_sDraftMsgId = msgId;
|
||||
|
||||
rsMsgs->getMsgParentId(msgId, msgComposer->m_msgParentId);
|
||||
|
||||
if (msgInfo.msgflags & RS_MSG_REPLIED) {
|
||||
msgComposer->m_msgType = REPLY;
|
||||
} else if (msgInfo.msgflags & RS_MSG_FORWARDED) {
|
||||
msgComposer->m_msgType = FORWARD;
|
||||
}
|
||||
}
|
||||
|
||||
insertTitleText( QString::fromStdWString(msgInfo.title).toStdString());
|
||||
msgComposer->insertTitleText(QString::fromStdWString(msgInfo.title));
|
||||
|
||||
insertMsgText(QString::fromStdWString(msgInfo.msg).toStdString());
|
||||
msgComposer->insertMsgText(QString::fromStdWString(msgInfo.msg));
|
||||
|
||||
insertFileList(msgInfo.files);
|
||||
msgComposer->insertFileList(msgInfo.files);
|
||||
|
||||
// get existing groups
|
||||
std::list<RsGroupInfo> groupInfoList;
|
||||
|
@ -863,48 +867,152 @@ void MessageComposer::newMsg(std::string msgId /*= ""*/)
|
|||
|
||||
calculateGroupsOfSslIds(groupInfoList, msgInfo.msgto, groupIds);
|
||||
for (groupIt = groupIds.begin(); groupIt != groupIds.end(); groupIt++ ) {
|
||||
addRecipient(MessageComposer::TO, *groupIt, true) ;
|
||||
msgComposer->addRecipient(MessageComposer::TO, *groupIt, true) ;
|
||||
}
|
||||
for (it = msgInfo.msgto.begin(); it != msgInfo.msgto.end(); it++ ) {
|
||||
addRecipient(MessageComposer::TO, *it, false) ;
|
||||
msgComposer->addRecipient(MessageComposer::TO, *it, false) ;
|
||||
}
|
||||
|
||||
calculateGroupsOfSslIds(groupInfoList, msgInfo.msgcc, groupIds);
|
||||
for (groupIt = groupIds.begin(); groupIt != groupIds.end(); groupIt++ ) {
|
||||
addRecipient(MessageComposer::CC, *groupIt, true) ;
|
||||
msgComposer->addRecipient(MessageComposer::CC, *groupIt, true) ;
|
||||
}
|
||||
for (it = msgInfo.msgcc.begin(); it != msgInfo.msgcc.end(); it++ ) {
|
||||
addRecipient(MessageComposer::CC, *it, false) ;
|
||||
msgComposer->addRecipient(MessageComposer::CC, *it, false) ;
|
||||
}
|
||||
|
||||
calculateGroupsOfSslIds(groupInfoList, msgInfo.msgbcc, groupIds);
|
||||
for (groupIt = groupIds.begin(); groupIt != groupIds.end(); groupIt++ ) {
|
||||
addRecipient(MessageComposer::BCC, *groupIt, true) ;
|
||||
msgComposer->addRecipient(MessageComposer::BCC, *groupIt, true) ;
|
||||
}
|
||||
for (it = msgInfo.msgbcc.begin(); it != msgInfo.msgbcc.end(); it++ ) {
|
||||
addRecipient(MessageComposer::BCC, *it, false) ;
|
||||
msgComposer->addRecipient(MessageComposer::BCC, *it, false) ;
|
||||
}
|
||||
|
||||
ui.msgText->document()->setModified(false);
|
||||
msgComposer->ui.msgText->document()->setModified(false);
|
||||
} else {
|
||||
insertTitleText(tr("No Title").toStdString());
|
||||
msgComposer->insertTitleText(tr("No Title"));
|
||||
}
|
||||
|
||||
calculateTitle();
|
||||
msgComposer->calculateTitle();
|
||||
|
||||
return msgComposer;
|
||||
}
|
||||
|
||||
void MessageComposer::insertTitleText(std::string title)
|
||||
MessageComposer *MessageComposer::replyMsg(const std::string &msgId, bool all)
|
||||
{
|
||||
ui.titleEdit->setText(QString::fromStdString(title));
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs->getMessage(msgId, msgInfo)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MessageComposer *msgComposer = MessageComposer::newMsg();
|
||||
msgComposer->m_msgParentId = msgId;
|
||||
msgComposer->m_msgType = REPLY;
|
||||
|
||||
/* fill it in */
|
||||
|
||||
msgComposer->insertTitleText(QString::fromStdWString(msgInfo.title), REPLY);
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg));
|
||||
|
||||
msgComposer->insertPastedText(doc.toPlainText());
|
||||
msgComposer->addRecipient(MessageComposer::TO, msgInfo.srcId, false);
|
||||
|
||||
if (all) {
|
||||
std::string ownId = rsPeers->getOwnId();
|
||||
|
||||
for (std::list<std::string>::iterator tli = msgInfo.msgto.begin(); tli != msgInfo.msgto.end(); tli++) {
|
||||
if (ownId != *tli) {
|
||||
msgComposer->addRecipient(MessageComposer::TO, *tli, false) ;
|
||||
}
|
||||
}
|
||||
|
||||
for (std::list<std::string>::iterator tli = msgInfo.msgcc.begin(); tli != msgInfo.msgcc.end(); tli++) {
|
||||
if (ownId != *tli) {
|
||||
msgComposer->addRecipient(MessageComposer::TO, *tli, false) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
msgComposer->calculateTitle();
|
||||
|
||||
/* window will destroy itself! */
|
||||
|
||||
return msgComposer;
|
||||
}
|
||||
|
||||
void MessageComposer::insertPastedText(std::string msg)
|
||||
MessageComposer *MessageComposer::forwardMsg(const std::string &msgId)
|
||||
{
|
||||
std::string::size_type i=0 ;
|
||||
while( (i=msg.find_first_of('\n',i+1)) < msg.size())
|
||||
msg.replace(i,1,std::string("\n<BR/>> ")) ;
|
||||
MessageInfo msgInfo;
|
||||
if (!rsMsgs->getMessage(msgId, msgInfo)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ui.msgText->setHtml(QString("<HTML><font color=\"blue\">")+QString::fromStdString(std::string("> ") + msg)+"</font><br/><br/></HTML>") ;
|
||||
MessageComposer *msgComposer = MessageComposer::newMsg();
|
||||
msgComposer->m_msgParentId = msgId;
|
||||
msgComposer->m_msgType = FORWARD;
|
||||
|
||||
/* fill it in */
|
||||
|
||||
msgComposer->insertTitleText(QString::fromStdWString(msgInfo.title), FORWARD);
|
||||
|
||||
QTextDocument doc ;
|
||||
doc.setHtml(QString::fromStdWString(msgInfo.msg)) ;
|
||||
|
||||
msgComposer->insertForwardPastedText(doc.toPlainText());
|
||||
|
||||
std::list<FileInfo>& files_info = msgInfo.files;
|
||||
|
||||
/* enable all files for sending */
|
||||
std::list<FileInfo>::iterator it;
|
||||
for(it = files_info.begin(); it != files_info.end(); it++)
|
||||
{
|
||||
it->inRecommend = true;
|
||||
}
|
||||
|
||||
msgComposer->insertFileList(files_info);
|
||||
|
||||
msgComposer->calculateTitle();
|
||||
|
||||
/* window will destroy itself! */
|
||||
|
||||
return msgComposer;
|
||||
}
|
||||
|
||||
void MessageComposer::insertTitleText(const QString &title, enumMessageType type)
|
||||
{
|
||||
QString titleText;
|
||||
|
||||
switch (type) {
|
||||
case NORMAL:
|
||||
titleText = title;
|
||||
break;
|
||||
case REPLY:
|
||||
if (title.startsWith("Re:", Qt::CaseInsensitive)) {
|
||||
titleText = title;
|
||||
} else {
|
||||
titleText = tr("Re:") + " " + title;
|
||||
}
|
||||
break;
|
||||
case FORWARD:
|
||||
if (title.startsWith("Fwd:", Qt::CaseInsensitive)) {
|
||||
titleText = title;
|
||||
} else {
|
||||
titleText = tr("Fwd:") + " " + title;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ui.titleEdit->setText(titleText);
|
||||
}
|
||||
|
||||
void MessageComposer::insertPastedText(QString msg)
|
||||
{
|
||||
msg.replace("\n", "\n<BR/>> ");
|
||||
|
||||
ui.msgText->setHtml("<HTML><font color=\"blue\"> > " + msg + "</font><br/><br/></HTML>");
|
||||
|
||||
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||
|
||||
|
@ -915,13 +1023,11 @@ void MessageComposer::insertPastedText(std::string msg)
|
|||
ui.msgText->document()->setModified(true);
|
||||
}
|
||||
|
||||
void MessageComposer::insertForwardPastedText(std::string msg)
|
||||
void MessageComposer::insertForwardPastedText(QString msg)
|
||||
{
|
||||
std::string::size_type i=0 ;
|
||||
while( (i=msg.find_first_of('\n',i+1)) < msg.size())
|
||||
msg.replace(i,1,std::string("\n<BR/>> ")) ;
|
||||
msg.replace("\n", "\n<BR/>> ");
|
||||
|
||||
ui.msgText->setHtml(QString("<HTML><blockquote [type=cite]><font color=\"blue\">")+QString::fromStdString(std::string("") + msg)+"</font><br/><br/></blockquote></HTML>") ;
|
||||
ui.msgText->setHtml("<HTML><blockquote [type=cite]><font color=\"blue\">> " + msg + "</font><br/><br/></blockquote></HTML>");
|
||||
|
||||
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||
|
||||
|
@ -932,9 +1038,9 @@ void MessageComposer::insertForwardPastedText(std::string msg)
|
|||
ui.msgText->document()->setModified(true);
|
||||
}
|
||||
|
||||
void MessageComposer::insertMsgText(std::string msg)
|
||||
void MessageComposer::insertMsgText(const QString &msg)
|
||||
{
|
||||
ui.msgText->setText(QString::fromStdString(msg));
|
||||
ui.msgText->setText(msg);
|
||||
|
||||
ui.msgText->setFocus( Qt::OtherFocusReason );
|
||||
|
||||
|
@ -945,9 +1051,9 @@ void MessageComposer::insertMsgText(std::string msg)
|
|||
ui.msgText->document()->setModified(true);
|
||||
}
|
||||
|
||||
void MessageComposer::insertHtmlText(std::string msg)
|
||||
void MessageComposer::insertHtmlText(const QString &msg)
|
||||
{
|
||||
ui.msgText->setHtml(QString("<a href='") + QString::fromStdString(std::string(msg + "'> ") ) + QString::fromStdString(std::string(msg)) + "</a>") ;
|
||||
ui.msgText->setHtml("<a href='" + msg + "'> " + msg + "</a>");
|
||||
|
||||
ui.msgText->document()->setModified(true);
|
||||
}
|
||||
|
@ -1058,17 +1164,47 @@ bool MessageComposer::sendMessage_internal(bool bDraftbox)
|
|||
|
||||
if (bDraftbox) {
|
||||
mi.msgId = m_sDraftMsgId;
|
||||
rsMsgs->MessageToDraft(mi);
|
||||
|
||||
rsMsgs->MessageToDraft(mi, m_msgParentId);
|
||||
|
||||
// use new message id
|
||||
m_sDraftMsgId = mi.msgId;
|
||||
|
||||
switch (m_msgType) {
|
||||
case NORMAL:
|
||||
break;
|
||||
case REPLY:
|
||||
rsMsgs->MessageReplied(m_sDraftMsgId, true);
|
||||
break;
|
||||
case FORWARD:
|
||||
rsMsgs->MessageForwarded(m_sDraftMsgId, true);
|
||||
break;
|
||||
}
|
||||
|
||||
// PROBLEM: message to set reply/forwarded get lost
|
||||
} else {
|
||||
/* check for the recipient */
|
||||
if (mi.msgto.empty()) {
|
||||
QMessageBox::warning(this, tr("RetroShare"), tr("Please insert at least one recipient."), QMessageBox::Ok);
|
||||
return false; // Don't send with no recipient
|
||||
}
|
||||
rsMsgs->MessageSend(mi);
|
||||
|
||||
if (rsMsgs->MessageSend(mi) == false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_msgParentId.empty() == false) {
|
||||
switch (m_msgType) {
|
||||
case NORMAL:
|
||||
break;
|
||||
case REPLY:
|
||||
rsMsgs->MessageReplied(m_msgParentId, true);
|
||||
break;
|
||||
case FORWARD:
|
||||
rsMsgs->MessageForwarded(m_msgParentId, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ui.msgText->document()->setModified(false);
|
||||
|
@ -1748,7 +1884,6 @@ void MessageComposer::saveasDraft()
|
|||
sendMessage_internal(true);
|
||||
}
|
||||
|
||||
|
||||
void MessageComposer::filePrint()
|
||||
{
|
||||
#ifndef QT_NO_PRINTER
|
||||
|
|
|
@ -40,6 +40,7 @@ class MessageComposer : public QMainWindow
|
|||
|
||||
public:
|
||||
enum enumType { TO, CC, BCC };
|
||||
enum enumMessageType { NORMAL, REPLY, FORWARD };
|
||||
|
||||
public:
|
||||
/** Default Constructor */
|
||||
|
@ -50,22 +51,23 @@ public:
|
|||
static void msgFriend(std::string id, bool group);
|
||||
static void recommendFriend(std::list <std::string> &peerids);
|
||||
|
||||
void newMsg(std::string msgId = "");
|
||||
static MessageComposer *newMsg(const std::string &msgId = "");
|
||||
static MessageComposer *replyMsg(const std::string &msgId, bool all);
|
||||
static MessageComposer *forwardMsg(const std::string &msgId);
|
||||
|
||||
/* worker fns */
|
||||
void insertSendList();
|
||||
void insertFileList(const std::list<DirDetails>&);
|
||||
void insertFileList(const std::list<FileInfo>&);
|
||||
void insertTitleText(std::string title);
|
||||
void insertPastedText(std::string msg) ;
|
||||
void insertForwardPastedText(std::string msg);
|
||||
void insertHtmlText(std::string msg);
|
||||
void insertMsgText(std::string msg);
|
||||
void insertTitleText(const QString &title, enumMessageType type = NORMAL);
|
||||
void insertPastedText(QString msg) ;
|
||||
void insertForwardPastedText(QString msg);
|
||||
void insertHtmlText(const QString &msg);
|
||||
void insertMsgText(const QString &msg);
|
||||
void addRecipient(enumType type, const std::string &id, bool group);
|
||||
void Create_New_Image_Tag(const QString urlremoteorlocal);
|
||||
|
||||
public slots:
|
||||
|
||||
/* actions to take.... */
|
||||
void sendMessage();
|
||||
void cancelMessage();
|
||||
|
@ -73,7 +75,6 @@ public slots:
|
|||
|
||||
void changeFormatType(int styleIndex );
|
||||
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent * event);
|
||||
bool eventFilter(QObject *obj, QEvent *ev);
|
||||
|
@ -155,7 +156,7 @@ private:
|
|||
void colorChanged(const QColor &c);
|
||||
void alignmentChanged(Qt::Alignment a);
|
||||
|
||||
bool sendMessage_internal(bool bDraftbox);
|
||||
bool sendMessage_internal(bool bDraftbox);
|
||||
|
||||
void FilterItems();
|
||||
bool FilterItem(QTreeWidgetItem *pItem, QString &sPattern);
|
||||
|
@ -191,8 +192,9 @@ private:
|
|||
QHash<QString, QString> autoLinkTitleDictionary;
|
||||
QHash<QString, int> autoLinkTargetDictionary;
|
||||
|
||||
std::string m_sMsgId; // existing message id
|
||||
std::string m_msgParentId; // parent message id
|
||||
std::string m_sDraftMsgId; // existing message id
|
||||
enumMessageType m_msgType;
|
||||
|
||||
/* maps of files */
|
||||
std::list<AttachFileItem *> mAttachments;
|
||||
|
|
Binary file not shown.
|
@ -1183,7 +1183,7 @@ Verfügbar: %3</translation>
|
|||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/ChatMsgItem.cpp" line="+272"/>
|
||||
<location filename="../gui/feeds/ChatMsgItem.cpp" line="+274"/>
|
||||
<source>Quick Message</source>
|
||||
<translation>Schnelle Nachrricht</translation>
|
||||
</message>
|
||||
|
@ -3550,27 +3550,22 @@ p, li { white-space: pre-wrap; }
|
|||
</message>
|
||||
<message>
|
||||
<location line="+487"/>
|
||||
<location line="+91"/>
|
||||
<location line="+88"/>
|
||||
<source>RetroShare</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-91"/>
|
||||
<location line="-88"/>
|
||||
<source>No Forum Selected!</source>
|
||||
<translation>Kein Forum ausgewählt!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+76"/>
|
||||
<source>Re:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+15"/>
|
||||
<location line="+88"/>
|
||||
<source>You cant reply a Anonymous Author</source>
|
||||
<translation>Du kannst einem anonymen Autor nicht antworten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1489"/>
|
||||
<location line="-1486"/>
|
||||
<source>Your Forums</source>
|
||||
<translation>Deine Foren</translation>
|
||||
</message>
|
||||
|
@ -5289,8 +5284,7 @@ Bitte gib etwas Speicher frei und drücke OK.</translation>
|
|||
<name>MessageComposer</name>
|
||||
<message>
|
||||
<location filename="../gui/msgs/MessageComposer.ui" line="+17"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+389"/>
|
||||
<location line="+344"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+737"/>
|
||||
<source>Compose</source>
|
||||
<translation>Verfassen</translation>
|
||||
</message>
|
||||
|
@ -5432,7 +5426,7 @@ Bitte gib etwas Speicher frei und drücke OK.</translation>
|
|||
<translation>Setzt Schriftart auf Codestil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+397"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="+529"/>
|
||||
<source>To</source>
|
||||
<translation>An</translation>
|
||||
</message>
|
||||
|
@ -5522,7 +5516,7 @@ Bitte gib etwas Speicher frei und drücke OK.</translation>
|
|||
<translation>Blockquote hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="-939"/>
|
||||
<location filename="../gui/msgs/MessageComposer.cpp" line="-1073"/>
|
||||
<source>&Left</source>
|
||||
<translation>&Links</translation>
|
||||
</message>
|
||||
|
@ -5542,36 +5536,46 @@ Bitte gib etwas Speicher frei und drücke OK.</translation>
|
|||
<translation>&Blocksatz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+209"/>
|
||||
<location line="+1410"/>
|
||||
<location line="+211"/>
|
||||
<location line="+1541"/>
|
||||
<source>Save Message</source>
|
||||
<translation>Nachricht speichern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1409"/>
|
||||
<location line="-1540"/>
|
||||
<source>Message has not been Sent.
|
||||
Do you want to save message to draft box?</source>
|
||||
<translation>Nachricht wurde noch nicht gesendet.
|
||||
Möchtest Du die Nachricht in den Entwürfen speichern?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+560"/>
|
||||
<location line="+96"/>
|
||||
<location line="+580"/>
|
||||
<source>Re:</source>
|
||||
<translation>Re:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<source>Fwd:</source>
|
||||
<translation>Fwd:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+75"/>
|
||||
<location line="+110"/>
|
||||
<source>RetroShare</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-96"/>
|
||||
<location line="-110"/>
|
||||
<source>Do you want to send the message without a subject ?</source>
|
||||
<translation>Möchtest Du die Nachricht ohne Betreff senden ?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+96"/>
|
||||
<location line="+110"/>
|
||||
<source>Please insert at least one recipient.</source>
|
||||
<translation>Bitte geben sie mindestens einen Empfänger ein.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+96"/>
|
||||
<location line="+112"/>
|
||||
<source>Unknown</source>
|
||||
<translation>Unbekannt</translation>
|
||||
</message>
|
||||
|
@ -5702,7 +5706,7 @@ Möchtest Du die Nachricht in den Entwürfen speichern?</translation>
|
|||
<translation>Speichern unter...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+22"/>
|
||||
<location line="+21"/>
|
||||
<source>Print Document</source>
|
||||
<translation>Dokument drucken</translation>
|
||||
</message>
|
||||
|
@ -5729,12 +5733,7 @@ Willst Du die Nachricht speichern ?</translation>
|
|||
<translation>Zusätzliche Datei hinzufügen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1572"/>
|
||||
<source>Friend Recommendation</source>
|
||||
<translation>Freundempfehlung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1"/>
|
||||
<location line="-1702"/>
|
||||
<source>Friend Recommendation(s)</source>
|
||||
<translation>Freundempfehlung(en)</translation>
|
||||
</message>
|
||||
|
@ -5834,7 +5833,7 @@ Willst Du die Nachricht speichern ?</translation>
|
|||
<name>MessagesDialog</name>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="+573"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+692"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+693"/>
|
||||
<source>New Message</source>
|
||||
<translation>Neue Nachricht</translation>
|
||||
</message>
|
||||
|
@ -5857,7 +5856,7 @@ Willst Du die Nachricht speichern ?</translation>
|
|||
<message>
|
||||
<location line="-5"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1"/>
|
||||
<location line="+928"/>
|
||||
<location line="+841"/>
|
||||
<source>From</source>
|
||||
<translation>Von</translation>
|
||||
</message>
|
||||
|
@ -5942,15 +5941,15 @@ p, li { white-space: pre-wrap; }
|
|||
<message>
|
||||
<location line="+177"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-44"/>
|
||||
<location line="+983"/>
|
||||
<location line="+995"/>
|
||||
<location line="+10"/>
|
||||
<source>Inbox</source>
|
||||
<translation>Posteingang</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-988"/>
|
||||
<location line="+1001"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1000"/>
|
||||
<location line="+1013"/>
|
||||
<location line="+8"/>
|
||||
<source>Outbox</source>
|
||||
<translation>Postausgang</translation>
|
||||
|
@ -5962,7 +5961,7 @@ p, li { white-space: pre-wrap; }
|
|||
</message>
|
||||
<message>
|
||||
<location line="+9"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-999"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1011"/>
|
||||
<source>Sent</source>
|
||||
<translation>Gesendet</translation>
|
||||
</message>
|
||||
|
@ -6024,13 +6023,13 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Speichern unter...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+748"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+760"/>
|
||||
<source>Print Document</source>
|
||||
<translation>Dokument drucken</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.ui" line="-891"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1649"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1574"/>
|
||||
<source>Subject</source>
|
||||
<translation>Betreff</translation>
|
||||
</message>
|
||||
|
@ -6090,19 +6089,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Herunterladen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+96"/>
|
||||
<location line="+47"/>
|
||||
<source>Compose: </source>
|
||||
<translation>Verfassen: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-47"/>
|
||||
<location line="+47"/>
|
||||
<source>Re:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+90"/>
|
||||
<location line="+140"/>
|
||||
<source>Hide</source>
|
||||
<translation>Empfohlene Dateien ausblenden</translation>
|
||||
</message>
|
||||
|
@ -6112,7 +6099,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Empfohlene Dateien einblenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1031"/>
|
||||
<location line="+1049"/>
|
||||
<source>Save as...</source>
|
||||
<translation>Speichern unter...</translation>
|
||||
</message>
|
||||
|
@ -6122,7 +6109,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>HTML-Dateien (*.htm *.html);;Alle Dateien (*)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-1633"/>
|
||||
<location line="-1558"/>
|
||||
<location line="+272"/>
|
||||
<source>Reply to All</source>
|
||||
<translation>Allen antworten</translation>
|
||||
|
@ -6161,8 +6148,8 @@ p, li { white-space: pre-wrap; }
|
|||
</message>
|
||||
<message>
|
||||
<location line="+177"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+724"/>
|
||||
<location line="+1025"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="+637"/>
|
||||
<location line="+1037"/>
|
||||
<location line="+5"/>
|
||||
<source>Trash</source>
|
||||
<translation>Papierkorb</translation>
|
||||
|
@ -6178,7 +6165,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1743"/>
|
||||
<location filename="../gui/MessagesDialog.cpp" line="-1668"/>
|
||||
<source>Remove All Tags</source>
|
||||
<translation>Alle Schlagwörter entfernen</translation>
|
||||
</message>
|
||||
|
@ -6208,34 +6195,24 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Papierkorb leeren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+179"/>
|
||||
<source>Compose:</source>
|
||||
<translation>Verfassen:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+0"/>
|
||||
<source>Fwd:</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+275"/>
|
||||
<location line="+1016"/>
|
||||
<location line="+367"/>
|
||||
<location line="+1028"/>
|
||||
<location line="+8"/>
|
||||
<source>Drafts</source>
|
||||
<translation>Entwürfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-988"/>
|
||||
<location line="-1000"/>
|
||||
<source>To</source>
|
||||
<translation>An</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-591"/>
|
||||
<location line="-504"/>
|
||||
<source>Edit...</source>
|
||||
<translation>Editieren...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+1499"/>
|
||||
<location line="+1424"/>
|
||||
<location line="+4"/>
|
||||
<location line="+4"/>
|
||||
<location line="+4"/>
|
||||
|
@ -6421,17 +6398,12 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Medium abspielen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/MsgItem.cpp" line="+61"/>
|
||||
<source>Re: </source>
|
||||
<translation>Re: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/MsgItem.ui" line="-56"/>
|
||||
<location line="-56"/>
|
||||
<source>Reply Message</source>
|
||||
<translation>Auf Nachricht antworten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/feeds/MsgItem.cpp" line="-67"/>
|
||||
<location filename="../gui/feeds/MsgItem.cpp" line="-6"/>
|
||||
<source>Hide</source>
|
||||
<translation>Verbergen</translation>
|
||||
</message>
|
||||
|
@ -7226,7 +7198,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Verbergen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+138"/>
|
||||
<location line="+140"/>
|
||||
<source>Quick Message</source>
|
||||
<translation>Schnelle Nachrricht</translation>
|
||||
</message>
|
||||
|
@ -7377,7 +7349,13 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Verfügbar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+784"/>
|
||||
<location line="+421"/>
|
||||
<location line="+2"/>
|
||||
<source>New group chat</source>
|
||||
<translation>Neuer Gruppenchat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+361"/>
|
||||
<source>Add Extra File</source>
|
||||
<translation>Zusätzliche Datei hinzufügen</translation>
|
||||
</message>
|
||||
|
@ -7436,12 +7414,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Statusnachricht ändern</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+38"/>
|
||||
<source>Live Chat</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+194"/>
|
||||
<location line="+232"/>
|
||||
<source>Bold</source>
|
||||
<translation>Fett</translation>
|
||||
</message>
|
||||
|
@ -7510,7 +7483,12 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Schriftart</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+35"/>
|
||||
<location line="-308"/>
|
||||
<source>Group Chat</source>
|
||||
<translation>Gruppenchat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+343"/>
|
||||
<source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
|
@ -9221,6 +9199,11 @@ p, li { white-space: pre-wrap; }
|
|||
<source>Folder</source>
|
||||
<translation>Ordner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+456"/>
|
||||
<source>New RetroShare Link(s)</source>
|
||||
<translation>Neu(e) RetroShare Link(s)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.ui" line="-583"/>
|
||||
<source>Any</source>
|
||||
|
@ -9267,7 +9250,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Such ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-458"/>
|
||||
<location filename="../gui/SearchDialog.cpp" line="-914"/>
|
||||
<source>Download Notice</source>
|
||||
<translation>Download</translation>
|
||||
</message>
|
||||
|
@ -9964,22 +9947,22 @@ p, li { white-space: pre-wrap; }
|
|||
</message>
|
||||
<message>
|
||||
<location filename="../gui/SharedFilesDialog.cpp" line="-68"/>
|
||||
<location line="+595"/>
|
||||
<location line="+610"/>
|
||||
<source>Open File</source>
|
||||
<translation>Datei öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-593"/>
|
||||
<location line="-608"/>
|
||||
<source>Open Folder</source>
|
||||
<translation>Ordner öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+602"/>
|
||||
<location line="+617"/>
|
||||
<source>Set command for opening this file</source>
|
||||
<translation>Setze eine Regel zum Öffnen dieser Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-533"/>
|
||||
<location line="-548"/>
|
||||
<source>Copy retroshare Link</source>
|
||||
<translation>Kopiere RetroShare Link</translation>
|
||||
</message>
|
||||
|
@ -9999,7 +9982,17 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Sende RetroShare Link</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+437"/>
|
||||
<location line="+325"/>
|
||||
<source>%1 recommends a list of files to you</source>
|
||||
<translation>%1 empfiehlt Dir eine Liste von Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>%1 recommends a file to you</source>
|
||||
<translation>%1 empfiehlt Dir eine Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+125"/>
|
||||
<source>Recommend (Automated message) To </source>
|
||||
<translation>Empfehle (automatisch) in einer Nachricht an </translation>
|
||||
</message>
|
||||
|
@ -10009,7 +10002,7 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Empfehle in einer Nachricht an </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-525"/>
|
||||
<location line="-540"/>
|
||||
<source>Copy retroshare Links to Clipboard</source>
|
||||
<translation>Kopiere RetroShare Links in die Zwischenablage</translation>
|
||||
</message>
|
||||
|
@ -10039,7 +10032,21 @@ p, li { white-space: pre-wrap; }
|
|||
<translation>Füge die Links zur Verknüpfungs-Wolke hinzu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+666"/>
|
||||
<location line="+213"/>
|
||||
<location line="+23"/>
|
||||
<location line="+24"/>
|
||||
<source>RetroShare Link</source>
|
||||
<translation>RetroShare Link</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+137"/>
|
||||
<location line="+33"/>
|
||||
<location line="+1"/>
|
||||
<source>Recommendation(s)</source>
|
||||
<translation>Empfehlung(en)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+250"/>
|
||||
<source><strong>My Shared Files</strong></source>
|
||||
<translation><strong>Meine Dateien</strong></translation>
|
||||
</message>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue