mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
parent
5b7ea0e611
commit
c48407e038
@ -503,7 +503,8 @@ void MainWindow::displayRSSTab(bool enable)
|
||||
// RSS tab
|
||||
if (!rssWidget) {
|
||||
rssWidget = new RSSImp(tabs);
|
||||
int index_tab = tabs->addTab(rssWidget, tr("RSS"));
|
||||
connect(rssWidget, SIGNAL(updateRSSCount(int)), this, SLOT(updateRSSTabLabel(int)));
|
||||
int index_tab = tabs->addTab(rssWidget, tr("RSS (%1)").arg(0));
|
||||
tabs->setTabIcon(index_tab, GuiIconProvider::instance()->getIcon("application-rss+xml"));
|
||||
}
|
||||
}
|
||||
@ -513,6 +514,11 @@ void MainWindow::displayRSSTab(bool enable)
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::updateRSSTabLabel(int count)
|
||||
{
|
||||
tabs->setTabText(tabs->indexOf(rssWidget), tr("RSS (%1)").arg(count));
|
||||
}
|
||||
|
||||
void MainWindow::displaySearchTab(bool enable)
|
||||
{
|
||||
Preferences::instance()->setSearchEnabled(enable);
|
||||
|
@ -138,6 +138,7 @@ protected slots:
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
void handleUpdateCheckFinished(bool update_available, QString new_version, bool invokedByUser);
|
||||
#endif
|
||||
void updateRSSTabLabel(int count);
|
||||
|
||||
protected:
|
||||
void dropEvent(QDropEvent *event);
|
||||
|
@ -637,8 +637,10 @@ void RSSImp::updateItemInfos(QTreeWidgetItem *item)
|
||||
return;
|
||||
|
||||
QString name;
|
||||
if (rss_item == m_rssManager)
|
||||
if (rss_item == m_rssManager) {
|
||||
name = tr("Unread");
|
||||
emit updateRSSCount(rss_item->unreadCount());
|
||||
}
|
||||
else
|
||||
name = rss_item->displayName();
|
||||
item->setText(0, name + QString::fromUtf8(" (") + QString::number(rss_item->unreadCount()) + QString(")"));
|
||||
|
@ -57,6 +57,9 @@ public slots:
|
||||
void deleteSelectedItems();
|
||||
void updateRefreshInterval(uint val);
|
||||
|
||||
signals:
|
||||
void updateRSSCount(int);
|
||||
|
||||
private slots:
|
||||
void on_newFeedButton_clicked();
|
||||
void refreshAllFeeds();
|
||||
|
Loading…
Reference in New Issue
Block a user