Added to use only one Label for Total Count, count selected Box on Total Label

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3114 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-06-12 15:11:42 +00:00
parent b715a577b0
commit 1d4a02141f
2 changed files with 41 additions and 29 deletions

View File

@ -2207,6 +2207,35 @@ void MessagesDialog::updateMessageSummaryList()
break;
}
}
int listrow = ui.listWidget->currentRow();
QString textTotal;
switch (listrow)
{
case ROW_INBOX:
textTotal = tr("Total:") + " " + QString::number(inboxCount);
ui.total_label->setText(textTotal);
break;
case ROW_OUTBOX:
textTotal = tr("Total:") + " " + QString::number(newOutboxCount);
ui.total_label->setText(textTotal);
break;
case ROW_DRAFTBOX:
textTotal = tr("Total:") + " " + QString::number(newDraftCount);
ui.total_label->setText(textTotal);
break;
case ROW_SENTBOX:
textTotal = tr("Total:") + " " + QString::number(newSentboxCount);
ui.total_label->setText(textTotal);
break;
case ROW_TRASHBOX:
textTotal = tr("Total:") + " " + QString::number(trashboxCount);
ui.total_label->setText(textTotal);
break;
}
QString textItem;
/*updating the labels in leftcolumn*/
@ -2286,13 +2315,6 @@ void MessagesDialog::updateMessageSummaryList()
item->setText(textItem);
}
/* Total Inbox */
textItem = tr("Total Inbox:") + " " + QString::number(inboxCount);
ui.totalInbox_label->setText(textItem);
/* Total Sent */
textItem = tr("Total Sent:") + " " + QString::number(newSentboxCount);
ui.totalSentbox_label->setText(textItem);
/* set tag counts */
int nRowCount = ui.tagWidget->count();

View File

@ -985,6 +985,14 @@ border-image: url(:/images/closepressed.png)
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true">QTabBar::tab {
}
</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@ -1191,7 +1199,7 @@ border: 1px solid #CCCCCC;}</string>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="totalInbox_label">
<widget class="QLabel" name="total_label">
<property name="minimumSize">
<size>
<width>0</width>
@ -1208,24 +1216,6 @@ border: 1px solid #CCCCCC;}</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="totalSentbox_label">
<property name="minimumSize">
<size>
<width>0</width>
<height>18</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="text">
<string>Total Sent:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="Folders_Button">
<property name="minimumSize">
@ -1452,7 +1442,7 @@ p, li { white-space: pre-wrap; }
</property>
<property name="minimumSize">
<size>
<width>60</width>
<width>0</width>
<height>12</height>
</size>
</property>
@ -1517,7 +1507,7 @@ p, li { white-space: pre-wrap; }
</property>
<property name="minimumSize">
<size>
<width>60</width>
<width>0</width>
<height>12</height>
</size>
</property>
@ -1582,7 +1572,7 @@ p, li { white-space: pre-wrap; }
</property>
<property name="minimumSize">
<size>
<width>60</width>
<width>0</width>
<height>12</height>
</size>
</property>