mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
- Updated number of unread news of RSS folders after a feed is moved from one folder to another
This commit is contained in:
parent
48b14d1066
commit
f2d2e70967
4 changed files with 34 additions and 4 deletions
|
@ -396,6 +396,17 @@ void RSSImp::restoreSlidersPosition() {
|
|||
}
|
||||
}
|
||||
|
||||
void RSSImp::updateItemsInfos(QList<QTreeWidgetItem *> items) {
|
||||
foreach(QTreeWidgetItem* item, items) {
|
||||
updateItemInfos(item);
|
||||
}
|
||||
}
|
||||
|
||||
void RSSImp::updateItemInfos(QTreeWidgetItem *item) {
|
||||
RssFile *rss_item = listStreams->getRSSItem(item);
|
||||
item->setText(0, rss_item->getName() + QString::fromUtf8(" (") + QString::number(rss_item->getNbUnRead(), 10)+ QString(")"));
|
||||
}
|
||||
|
||||
void RSSImp::updateFeedIcon(QString url, QString icon_path){
|
||||
QTreeWidgetItem *item = listStreams->getTreeItemFromUrl(url);
|
||||
item->setData(0,Qt::DecorationRole, QVariant(QIcon(icon_path)));
|
||||
|
@ -447,6 +458,8 @@ RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){
|
|||
connect(actionDownload_torrent, SIGNAL(triggered()), this, SLOT(downloadTorrent()));
|
||||
|
||||
connect(listStreams, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), this, SLOT(refreshNewsList(QTreeWidgetItem*)));
|
||||
connect(listStreams, SIGNAL(foldersAltered(QList<QTreeWidgetItem*>)), this, SLOT(updateItemsInfos(QList<QTreeWidgetItem*>)));
|
||||
|
||||
connect(listNews, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(refreshTextBrowser(QListWidgetItem *)));
|
||||
connect(listNews, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(downloadTorrent()));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue