1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 23:07:59 +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 // All torrents are downloaded from this feed
BTSession->downloadUrlAndSkipDialog(item->getTorrentUrl()); BTSession->downloadUrlAndSkipDialog(item->getTorrentUrl());
} }
// Item was downloaded, consider it as Read
item->setRead();
// Clean up // Clean up
delete matching_filter; delete matching_filter;
} }

View File

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