mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
When QutBox is selected then Display header item "Recipient" instead of "From"
Added to Count Total Inbox and Total Sent on Messages. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2813 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7f8cafa8a9
commit
caaf7884f8
@ -743,6 +743,15 @@ void MessagesDialog::insertMessages()
|
||||
item1 -> setIcon(QIcon(":/images/message-mail.png"));
|
||||
}
|
||||
}
|
||||
|
||||
if ((it -> msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX )
|
||||
{
|
||||
MessagesModel->setHeaderData(2, Qt::Horizontal, tr("Recipient"));
|
||||
}
|
||||
else
|
||||
{
|
||||
MessagesModel->setHeaderData(2, Qt::Horizontal, tr("From"));
|
||||
}
|
||||
|
||||
// No of Files.
|
||||
{
|
||||
@ -1285,6 +1294,8 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
int newInboxCount = 0;
|
||||
int newOutboxCount = 0;
|
||||
int newDraftCount = 0;
|
||||
int newSentboxCount = 0;
|
||||
int inboxCount = 0;
|
||||
|
||||
/*calculating the new messages*/
|
||||
for(it = msgList.begin(); it != msgList.end(); it++)
|
||||
@ -1293,6 +1304,10 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
{
|
||||
newInboxCount ++;
|
||||
}
|
||||
if ((it -> msgflags & RS_MSG_BOXMASK) == RS_MSG_INBOX )
|
||||
{
|
||||
inboxCount ++;
|
||||
}
|
||||
if ((it -> msgflags & RS_MSG_BOXMASK) == RS_MSG_OUTBOX )
|
||||
{
|
||||
newOutboxCount ++;
|
||||
@ -1301,6 +1316,10 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
{
|
||||
newDraftCount ++;
|
||||
}
|
||||
if ((it -> msgflags & RS_MSG_BOXMASK) == RS_MSG_SENTBOX )
|
||||
{
|
||||
newSentboxCount ++;
|
||||
}
|
||||
}
|
||||
|
||||
QString textItem;
|
||||
@ -1374,6 +1393,50 @@ void MessagesDialog::updateMessageSummaryList()
|
||||
qf.setBold(false);
|
||||
item->setFont(qf);
|
||||
|
||||
}
|
||||
|
||||
/* Total Inbox */
|
||||
if(inboxCount != 0)
|
||||
{
|
||||
QListWidgetItem* item = ui.listWidget->item(5);
|
||||
|
||||
textItem = tr("Total Inbox:") + " " + QString::number(inboxCount);
|
||||
item->setText(textItem);
|
||||
/*QFont qf = item->font();
|
||||
qf.setBold(true);
|
||||
item->setFont(qf);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
QListWidgetItem* item = ui.listWidget->item(5);
|
||||
|
||||
textItem = tr("Total Inbox:") + " " + "0";
|
||||
item->setText(textItem);
|
||||
/*QFont qf = item->font();
|
||||
qf.setBold(false);
|
||||
item->setFont(qf);*/
|
||||
}
|
||||
|
||||
/* Total Sent */
|
||||
if(newSentboxCount != 0)
|
||||
{
|
||||
QListWidgetItem* item = ui.listWidget->item(6);
|
||||
|
||||
textItem = tr("Total Sent:") + " " + QString::number(newSentboxCount);
|
||||
item->setText(textItem);
|
||||
/*QFont qf = item->font();
|
||||
qf.setBold(true);
|
||||
item->setFont(qf);*/
|
||||
}
|
||||
else
|
||||
{
|
||||
QListWidgetItem* item = ui.listWidget->item(6);
|
||||
|
||||
textItem = tr("Total Sent:") + " " + "0";
|
||||
item->setText(textItem);
|
||||
/*QFont qf = item->font();
|
||||
qf.setBold(false);
|
||||
item->setFont(qf);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1029,6 +1029,48 @@ border-image: url(:/images/closepressed.png)
|
||||
<normaloff>:/images/folder-sent.png</normaloff>:/images/folder-sent.png</iconset>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="background">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
<property name="foreground">
|
||||
<brush brushstyle="NoBrush">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</property>
|
||||
<property name="flags">
|
||||
<set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Total Inbox:</string>
|
||||
</property>
|
||||
<property name="flags">
|
||||
<set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Total Sent:</string>
|
||||
</property>
|
||||
<property name="flags">
|
||||
<set>ItemIsDragEnabled|ItemIsUserCheckable|ItemIsEnabled</set>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QSplitter" name="msgSplitter">
|
||||
<property name="orientation">
|
||||
|
Loading…
Reference in New Issue
Block a user