mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 09:27:09 -05:00
Fixed wrong display of the news feed notify in FriendsDialog when the tabs were moved.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4845 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b002e08c06
commit
4433872cb6
@ -95,8 +95,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
||||
ui.tabWidget->setTabPosition(QTabWidget::North);
|
||||
ui.tabWidget->addTab(new ChatLobbyWidget(), tr("Chat lobbies"));
|
||||
ui.tabWidget->addTab(new ProfileWidget(), tr("Profile"));
|
||||
NewsFeed *newsFeed = new NewsFeed();
|
||||
newsFeedTabIndex = ui.tabWidget->addTab(newsFeed, tr("News Feed"));
|
||||
newsFeed = new NewsFeed();
|
||||
int newsFeedTabIndex = ui.tabWidget->addTab(newsFeed, tr("News Feed"));
|
||||
|
||||
ui.tabWidget->hideCloseButton(0);
|
||||
ui.tabWidget->hideCloseButton(1);
|
||||
@ -805,6 +805,11 @@ void FriendsDialog::on_actionAdd_Group_activated()
|
||||
|
||||
void FriendsDialog::newsFeedChanged(int count)
|
||||
{
|
||||
int newsFeedTabIndex = ui.tabWidget->indexOf(newsFeed);
|
||||
if (newsFeedTabIndex < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (count) {
|
||||
ui.tabWidget->tabBar()->setTabText(newsFeedTabIndex, QString("%1 (%2)").arg(newsFeedText).arg(count));
|
||||
ui.tabWidget->tabBar()->setTabTextColor(newsFeedTabIndex, Qt::blue);
|
||||
|
@ -133,7 +133,7 @@ private:
|
||||
|
||||
QFont mCurrentFont; /* how the text will come out */
|
||||
|
||||
int newsFeedTabIndex;
|
||||
QWidget *newsFeed;
|
||||
QColor newsFeedTabColor;
|
||||
QString newsFeedText;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user