mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 03:16:18 -05:00
Fixed to check if Messages contains Re or Fwd to not add more.
Added when Messages contains Re or Fwd change Message icon git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2052 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3f22602b6c
commit
561104297e
@ -247,7 +247,18 @@ void MessagesDialog::replytomessage()
|
|||||||
/* fill it in */
|
/* fill it in */
|
||||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||||
nMsgDialog->newMsg();
|
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->insertTitleText( (QString("Re: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||||
|
}
|
||||||
|
|
||||||
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
||||||
|
|
||||||
|
|
||||||
@ -282,7 +293,17 @@ void MessagesDialog::replyallmessage()
|
|||||||
/* fill it in */
|
/* fill it in */
|
||||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||||
nMsgDialog->newMsg();
|
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->insertTitleText( (QString("Re: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||||
|
}
|
||||||
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
nMsgDialog->setWindowTitle(tr("Re: ") + QString::fromStdWString(msgInfo.title) ) ;
|
||||||
|
|
||||||
|
|
||||||
@ -327,7 +348,18 @@ void MessagesDialog::forwardmessage()
|
|||||||
/* fill it in */
|
/* fill it in */
|
||||||
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
//std::cerr << "MessagesDialog::newmessage()" << std::endl;
|
||||||
nMsgDialog->newMsg();
|
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()) ;
|
nMsgDialog->insertTitleText( (QString("Fwd: ") + QString::fromStdWString(msgInfo.title)).toStdString()) ;
|
||||||
|
}
|
||||||
|
|
||||||
nMsgDialog->setWindowTitle(tr("Fwd: ") + QString::fromStdWString(msgInfo.title) ) ;
|
nMsgDialog->setWindowTitle(tr("Fwd: ") + QString::fromStdWString(msgInfo.title) ) ;
|
||||||
|
|
||||||
|
|
||||||
@ -585,6 +617,46 @@ void MessagesDialog::insertMessages()
|
|||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
item -> setText(2, QString::fromStdWString(it->title));
|
item -> setText(2, QString::fromStdWString(it->title));
|
||||||
|
|
||||||
|
// Change Message icon when Subject is Re: or Fwd:
|
||||||
|
QString text = QString::fromStdWString(it->title);
|
||||||
|
|
||||||
|
if (text.startsWith("Re:", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail-replied-read.png")));
|
||||||
|
}
|
||||||
|
else if (text.startsWith("Fwd:", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail-forwarded-read.png")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail-read.png")));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (it -> msgflags & RS_MSG_NEW)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
QFont qf = item->font(i);
|
||||||
|
qf.setBold(true);
|
||||||
|
item->setFont(i, qf);
|
||||||
|
}
|
||||||
|
QString text = QString::fromStdWString(it->title);
|
||||||
|
|
||||||
|
if (text.startsWith("Re:", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail-replied.png")));
|
||||||
|
}
|
||||||
|
else if (text.startsWith("Fwd:", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail-forwarded.png")));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item -> setIcon(2, (QIcon(":/images/message-mail.png")));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// No of Files.
|
// No of Files.
|
||||||
{
|
{
|
||||||
@ -601,22 +673,6 @@ void MessagesDialog::insertMessages()
|
|||||||
newSelected = item;
|
newSelected = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (it -> msgflags & RS_MSG_NEW)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
QFont qf = item->font(i);
|
|
||||||
qf.setBold(true);
|
|
||||||
item->setFont(i, qf);
|
|
||||||
item -> setIcon(2, (QIcon(":/images/message-mail.png")));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
item -> setIcon(2, (QIcon(":/images/message-mail-read.png")));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* add to the list */
|
/* add to the list */
|
||||||
items.append(item);
|
items.append(item);
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<file>images/btn_27.png</file>
|
<file>images/btn_27.png</file>
|
||||||
<file>images/btn_27_hover.png</file>
|
<file>images/btn_27_hover.png</file>
|
||||||
<file>images/connect_established.png</file>
|
<file>images/connect_established.png</file>
|
||||||
|
<file>images/connect_creating.png</file>
|
||||||
<file>images/feedback_arrow.png</file>
|
<file>images/feedback_arrow.png</file>
|
||||||
<file>images/feedback_arrow_hover.png</file>
|
<file>images/feedback_arrow_hover.png</file>
|
||||||
<file>images/feedback-bar-background.png</file>
|
<file>images/feedback-bar-background.png</file>
|
||||||
@ -261,6 +262,9 @@
|
|||||||
<file>images/message-mail-read.png</file>
|
<file>images/message-mail-read.png</file>
|
||||||
<file>images/message-mail-imapdelete.png</file>
|
<file>images/message-mail-imapdelete.png</file>
|
||||||
<file>images/message-mail-replied-read.png</file>
|
<file>images/message-mail-replied-read.png</file>
|
||||||
|
<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-news.png</file>
|
<file>images/message-news.png</file>
|
||||||
<file>images/message.png</file>
|
<file>images/message.png</file>
|
||||||
<file>images/messenger.png</file>
|
<file>images/messenger.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/images/message-mail-forwarded.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-forwarded.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 656 B |
BIN
retroshare-gui/src/gui/images/message-mail-replied-forw-read.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-replied-forw-read.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 842 B |
BIN
retroshare-gui/src/gui/images/message-mail-replied-forw.png
Normal file
BIN
retroshare-gui/src/gui/images/message-mail-replied-forw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 803 B |
Loading…
Reference in New Issue
Block a user