mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
parent
5b7ea0e611
commit
c48407e038
@ -503,7 +503,8 @@ void MainWindow::displayRSSTab(bool enable)
|
|||||||
// RSS tab
|
// RSS tab
|
||||||
if (!rssWidget) {
|
if (!rssWidget) {
|
||||||
rssWidget = new RSSImp(tabs);
|
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"));
|
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)
|
void MainWindow::displaySearchTab(bool enable)
|
||||||
{
|
{
|
||||||
Preferences::instance()->setSearchEnabled(enable);
|
Preferences::instance()->setSearchEnabled(enable);
|
||||||
|
@ -138,6 +138,7 @@ protected slots:
|
|||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
void handleUpdateCheckFinished(bool update_available, QString new_version, bool invokedByUser);
|
void handleUpdateCheckFinished(bool update_available, QString new_version, bool invokedByUser);
|
||||||
#endif
|
#endif
|
||||||
|
void updateRSSTabLabel(int count);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event);
|
||||||
|
@ -637,8 +637,10 @@ void RSSImp::updateItemInfos(QTreeWidgetItem *item)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QString name;
|
QString name;
|
||||||
if (rss_item == m_rssManager)
|
if (rss_item == m_rssManager) {
|
||||||
name = tr("Unread");
|
name = tr("Unread");
|
||||||
|
emit updateRSSCount(rss_item->unreadCount());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
name = rss_item->displayName();
|
name = rss_item->displayName();
|
||||||
item->setText(0, name + QString::fromUtf8(" (") + QString::number(rss_item->unreadCount()) + QString(")"));
|
item->setText(0, name + QString::fromUtf8(" (") + QString::number(rss_item->unreadCount()) + QString(")"));
|
||||||
|
@ -57,6 +57,9 @@ public slots:
|
|||||||
void deleteSelectedItems();
|
void deleteSelectedItems();
|
||||||
void updateRefreshInterval(uint val);
|
void updateRefreshInterval(uint val);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void updateRSSCount(int);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_newFeedButton_clicked();
|
void on_newFeedButton_clicked();
|
||||||
void refreshAllFeeds();
|
void refreshAllFeeds();
|
||||||
|
Loading…
Reference in New Issue
Block a user