From 1d4a02141f482d64537192f44a74765460fa4c43 Mon Sep 17 00:00:00 2001 From: defnax Date: Sat, 12 Jun 2010 15:11:42 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/MessagesDialog.cpp | 36 ++++++++++++++++++----- retroshare-gui/src/gui/MessagesDialog.ui | 34 ++++++++------------- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp index 2c9520c9e..96a7f701d 100644 --- a/retroshare-gui/src/gui/MessagesDialog.cpp +++ b/retroshare-gui/src/gui/MessagesDialog.cpp @@ -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(); diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/MessagesDialog.ui index 541bc533b..1890b791f 100644 --- a/retroshare-gui/src/gui/MessagesDialog.ui +++ b/retroshare-gui/src/gui/MessagesDialog.ui @@ -985,6 +985,14 @@ border-image: url(:/images/closepressed.png) + + Qt::LeftToRight + + + QTabBar::tab { +} + + 0 @@ -1191,7 +1199,7 @@ border: 1px solid #CCCCCC;} - + 0 @@ -1208,24 +1216,6 @@ border: 1px solid #CCCCCC;} - - - - - 0 - 18 - - - - - 9 - - - - Total Sent: - - - @@ -1452,7 +1442,7 @@ p, li { white-space: pre-wrap; } - 60 + 0 12 @@ -1517,7 +1507,7 @@ p, li { white-space: pre-wrap; } - 60 + 0 12 @@ -1582,7 +1572,7 @@ p, li { white-space: pre-wrap; } - 60 + 0 12