1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 14:57:52 +00:00

- Some more RSS polishing

This commit is contained in:
Christophe Dumez 2009-08-21 17:49:48 +00:00
parent 2cbbd6ef50
commit 538c028f8a
2 changed files with 11 additions and 4 deletions

View File

@ -597,6 +597,8 @@ short readDoc(const QDomDocument& doc) {
// All torrents are downloaded from this feed
BTSession->downloadUrlAndSkipDialog(item->getTorrentUrl());
}
// Item was downloaded, consider it as Read
item->setRead();
// Clean up
delete matching_filter;
}

View File

@ -187,8 +187,8 @@ void RSSImp::on_actionMark_all_as_read_triggered() {
feed->markAllAsRead();
item->setData(0, Qt::DisplayRole, feed->getAliasOrUrl()+ QString::fromUtf8(" (0)"));
}
if(selectedItems.size())
refreshNewsList(selectedItems.last());
/*if(selectedItems.size())
refreshNewsList(selectedItems.last());*/
}
//right-click somewhere, refresh all the streams
@ -258,7 +258,11 @@ void RSSImp::updateLastRefreshedTimeForStreams() {
// fills the newsList
void RSSImp::refreshNewsList(QTreeWidgetItem* item) {
if(!item) return;
if(!item) {
selectedFeedUrl = QString::null;
listNews->clear();
return;
}
selectedFeedUrl = item->text(1);
RssStream *stream = rssmanager->getFeed(selectedFeedUrl);
qDebug("Getting the list of news");
@ -359,6 +363,8 @@ void RSSImp::updateFeedInfos(QString url, QString aliasOrUrl, unsigned int nbUnr
RSSImp::RSSImp(bittorrent *BTSession) : QWidget(), BTSession(BTSession){
setupUi(this);
selectedFeedUrl = QString::null;
// icons of bottom buttons
addStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/subscribe.png")));
delStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/unsubscribe.png")));
@ -415,7 +421,6 @@ void RSSImp::selectFirstFeed(){
if(listStreams->topLevelItemCount()){
QTreeWidgetItem *first = listStreams->topLevelItem(0);
listStreams->setCurrentItem(first);
selectedFeedUrl = first->text(1);
}
}