mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
removed mentions to encrypted messages. Replaced by distant, with the appropriate flags. Removed old msg encryption code
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7963 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3a7ef25adf
commit
ab9cb2b600
6 changed files with 34 additions and 487 deletions
|
@ -615,9 +615,6 @@ void MessagesDialog::messageTreeWidgetCustomPopupMenu(QPoint /*point*/)
|
|||
action->setDisabled(true);
|
||||
}
|
||||
|
||||
if(nCount==1 && (msgInfo.msgflags & RS_MSG_ENCRYPTED))
|
||||
action = contextMnu.addAction(QIcon(IMAGE_DECRYPTMESSAGE), tr("Decrypt Message"), this, SLOT(decryptSelectedMsg()));
|
||||
|
||||
int listrow = ui.listWidget->currentRow();
|
||||
if (listrow == ROW_TRASHBOX) {
|
||||
action = contextMnu.addAction(tr("Undelete"), this, SLOT(undeletemessage()));
|
||||
|
@ -1104,7 +1101,8 @@ void MessagesDialog::insertMessages()
|
|||
if ((it->msgflags & RS_MSG_SYSTEM) && it->srcId == ownId) {
|
||||
text = "RetroShare";
|
||||
} else {
|
||||
if (it->msgflags & (RS_MSG_DECRYPTED | RS_MSG_ENCRYPTED)) {
|
||||
if (it->msgflags & RS_MSG_DISTANT)
|
||||
{
|
||||
// distant message
|
||||
if (gotInfo || rsMsgs->getMessage(it->msgId, msgInfo)) {
|
||||
gotInfo = true;
|
||||
|
@ -1148,17 +1146,15 @@ void MessagesDialog::insertMessages()
|
|||
std::cerr << "MessagesDialog::insertMsgTxtAndFiles() Couldn't find Msg" << std::endl;
|
||||
}
|
||||
}
|
||||
if ((it->msgflags & (RS_MSG_DECRYPTED | RS_MSG_ENCRYPTED)) == 0) {
|
||||
if(it->msgflags & RS_MSG_DISTANT)
|
||||
{
|
||||
item->setText(COLUMN_FROM, text);
|
||||
item->setData(COLUMN_FROM, ROLE_SORT, text + dateString);
|
||||
}
|
||||
}
|
||||
|
||||
// Subject
|
||||
if(it->msgflags & RS_MSG_ENCRYPTED)
|
||||
text = tr("Encrypted message. Right-click to decrypt it.") ;
|
||||
else
|
||||
text = QString::fromUtf8(it->title.c_str());
|
||||
text = QString::fromUtf8(it->title.c_str());
|
||||
|
||||
item->setText(COLUMN_SUBJECT, text);
|
||||
item->setData(COLUMN_SUBJECT, ROLE_SORT, text + dateString);
|
||||
|
@ -1234,16 +1230,10 @@ void MessagesDialog::insertMessages()
|
|||
}
|
||||
}
|
||||
|
||||
if(it->msgflags & RS_MSG_ENCRYPTED)
|
||||
{
|
||||
item->setIcon(COLUMN_SIGNATURE, QIcon(":/images/blue_lock.png")) ;
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message is encrypted. Right click to decrypt it.")) ;
|
||||
item->setIcon(COLUMN_SUBJECT, QIcon(":/images/mail-encrypted-full.png")) ;
|
||||
}
|
||||
else if(it->msgflags & RS_MSG_DECRYPTED)
|
||||
else if(it->msgflags & RS_MSG_DISTANT)
|
||||
{
|
||||
item->setIcon(COLUMN_SIGNATURE, QIcon(":/images/blue_lock_open.png")) ;
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message has been successfully decrypted, and is unsigned.")) ;
|
||||
item->setToolTip(COLUMN_SIGNATURE, tr("This message comes from a distant person.")) ;
|
||||
item->setIcon(COLUMN_SUBJECT, QIcon(":/images/message-mail-read.png")) ;
|
||||
|
||||
if(it->msgflags & RS_MSG_SIGNED)
|
||||
|
|
|
@ -144,10 +144,7 @@ void MsgItem::updateItemStatic()
|
|||
titleLabel->setText(title);
|
||||
subjectLabel->setText(QString::fromUtf8(mi.title.c_str()));
|
||||
|
||||
if(mi.msgflags & RS_MSG_ENCRYPTED)
|
||||
msgLabel->setText(RsHtml().formatText(NULL, QString("[%1]").arg(tr("Encrypted message")), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
else
|
||||
msgLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mi.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
msgLabel->setText(RsHtml().formatText(NULL, QString::fromUtf8(mi.msg.c_str()), RSHTML_FORMATTEXT_EMBED_SMILEYS | RSHTML_FORMATTEXT_EMBED_LINKS));
|
||||
|
||||
std::list<FileInfo>::iterator it;
|
||||
for(it = mi.files.begin(); it != mi.files.end(); ++it)
|
||||
|
@ -162,9 +159,6 @@ void MsgItem::updateItemStatic()
|
|||
|
||||
playButton->setEnabled(false);
|
||||
|
||||
if(mi.msgflags & RS_MSG_ENCRYPTED)
|
||||
replyButton->setEnabled(false) ;
|
||||
|
||||
if (mIsHome)
|
||||
{
|
||||
/* disable buttons */
|
||||
|
@ -174,10 +168,6 @@ void MsgItem::updateItemStatic()
|
|||
/* hide buttons */
|
||||
clearButton->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
//deleteButton->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -546,21 +546,22 @@ void MessageWidget::fill(const std::string &msgId)
|
|||
RsPeerId ownId = rsPeers->getOwnId();
|
||||
QString tooltip_string ;
|
||||
|
||||
if ((msgInfo.msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX) // outgoing message are from me
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(ownId) ;
|
||||
link.createMessage(ownId, "");
|
||||
}
|
||||
else if(msgInfo.msgflags & RS_MSG_DECRYPTED || msgInfo.msgflags & RS_MSG_ENCRYPTED) // distant message
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rsgxsid_srcId) ;
|
||||
link.createMessage(msgInfo.rsgxsid_srcId, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rspeerid_srcId) ;
|
||||
link.createMessage(msgInfo.rspeerid_srcId, "");
|
||||
}
|
||||
// if ((msgInfo.msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX) // outgoing message are from me
|
||||
// {
|
||||
// tooltip_string = PeerDefs::rsidFromId(ownId) ;
|
||||
// link.createMessage(ownId, "");
|
||||
// }
|
||||
|
||||
if(msgInfo.msgflags & RS_MSG_DISTANT) // distant message
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rsgxsid_srcId) ;
|
||||
link.createMessage(msgInfo.rsgxsid_srcId, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
tooltip_string = PeerDefs::rsidFromId(msgInfo.rspeerid_srcId) ;
|
||||
link.createMessage(msgInfo.rspeerid_srcId, "");
|
||||
}
|
||||
|
||||
if ((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) {
|
||||
ui.fromText->setText("RetroShare");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue