mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-10-17 07:51:07 -04:00
Added a standard tab to GxsForums and FeedReader.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6055 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
999d9c3920
commit
35cc460e71
12 changed files with 252 additions and 58 deletions
|
@ -90,7 +90,6 @@ GxsForumThreadWidget::GxsForumThreadWidget(const std::string &forumId, QWidget *
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
mForumId = forumId;
|
||||
mSubscribeFlags = 0;
|
||||
mInProcessSettings = false;
|
||||
mUnreadCount = 0;
|
||||
|
@ -172,8 +171,7 @@ GxsForumThreadWidget::GxsForumThreadWidget(const std::string &forumId, QWidget *
|
|||
|
||||
mFillThread = NULL;
|
||||
|
||||
ui->forumName->setText(tr("Loading"));
|
||||
insertThreads();
|
||||
setForumId(forumId);
|
||||
|
||||
ui->threadTreeWidget->installEventFilter(this);
|
||||
}
|
||||
|
@ -234,9 +232,27 @@ void GxsForumThreadWidget::processSettings(bool load)
|
|||
mInProcessSettings = false;
|
||||
}
|
||||
|
||||
void GxsForumThreadWidget::setForumId(const std::string &forumId)
|
||||
{
|
||||
if (mForumId == forumId) {
|
||||
if (!forumId.empty()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
mForumId = forumId;
|
||||
ui->forumName->setText(mForumId.empty () ? "" : tr("Loading"));
|
||||
mNewCount = 0;
|
||||
mUnreadCount = 0;
|
||||
|
||||
emit forumChanged(this);
|
||||
|
||||
insertThreads();
|
||||
}
|
||||
|
||||
QString GxsForumThreadWidget::forumName(bool withUnreadCount)
|
||||
{
|
||||
QString name = ui->forumName->text();
|
||||
QString name = mForumId.empty () ? tr("No name") : ui->forumName->text();
|
||||
|
||||
if (withUnreadCount && mUnreadCount) {
|
||||
name += QString(" (%1)").arg(mUnreadCount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue