mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
- FEATURE: Added 'Mark all as read' function for RSS feeds
This commit is contained in:
parent
563055e891
commit
07dc182053
2
TODO
2
TODO
@ -61,7 +61,6 @@
|
|||||||
- valgrind --tool=memcheck --leak-check=full src/qbittorrent (Looks ok)
|
- valgrind --tool=memcheck --leak-check=full src/qbittorrent (Looks ok)
|
||||||
- 128m 29m 16m S 4.8 2.9 0:02.28 qbittorrent
|
- 128m 29m 16m S 4.8 2.9 0:02.28 qbittorrent
|
||||||
* beta 7
|
* beta 7
|
||||||
- Add "Mark all as read" feature for RSS
|
|
||||||
- update doc for plugins (and add screenies)
|
- update doc for plugins (and add screenies)
|
||||||
- update doc for options
|
- update doc for options
|
||||||
- Review torrent content selection
|
- Review torrent content selection
|
||||||
@ -104,6 +103,7 @@ beta6->beta7 changelog:
|
|||||||
- FEATURE: Added an option to set the max number of uploads per torrent
|
- FEATURE: Added an option to set the max number of uploads per torrent
|
||||||
- FEATURE: Added an option to automatically delete torrents when they reach a given ratio (>= 1.0)
|
- FEATURE: Added an option to automatically delete torrents when they reach a given ratio (>= 1.0)
|
||||||
- FEATURE: Added an option to display current transfer speeds in title bar
|
- FEATURE: Added an option to display current transfer speeds in title bar
|
||||||
|
- FEATURE: Added "Mark all as read" function for RSS feeds
|
||||||
- BUGFIX: In torrent content, it is now easier to filter all torrents using right click menu
|
- BUGFIX: In torrent content, it is now easier to filter all torrents using right click menu
|
||||||
- BUGFIX: Updated man page / README / INSTALL
|
- BUGFIX: Updated man page / README / INSTALL
|
||||||
- BUGFIX: Paused torrents could be displayed as connected for a sec after checking
|
- BUGFIX: Paused torrents could be displayed as connected for a sec after checking
|
||||||
|
@ -242,6 +242,14 @@ class RssStream : public QObject{
|
|||||||
return listItem.size();
|
return listItem.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void markAllAsRead() {
|
||||||
|
RssItem *item;
|
||||||
|
foreach(item, listItem){
|
||||||
|
if(!item->isRead())
|
||||||
|
item->setRead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unsigned int getNbUnRead() const{
|
unsigned int getNbUnRead() const{
|
||||||
unsigned int nbUnread=0;
|
unsigned int nbUnread=0;
|
||||||
RssItem *item;
|
RssItem *item;
|
||||||
|
131
src/rss.ui
131
src/rss.ui
@ -13,28 +13,55 @@
|
|||||||
<string>Search</string>
|
<string>Search</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTreeWidget" name="listStreams" >
|
<widget class="QTreeWidget" name="listStreams" >
|
||||||
<property name="contextMenuPolicy" >
|
<property name="contextMenuPolicy" >
|
||||||
@ -60,12 +87,21 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
@ -87,18 +123,18 @@
|
|||||||
<height>32</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize" >
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Delete selected streams</string>
|
<string>Delete selected streams</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -109,18 +145,18 @@
|
|||||||
<height>32</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize" >
|
|
||||||
<size>
|
|
||||||
<width>32</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Refresh RSS streams</string>
|
<string>Refresh RSS streams</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>32</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -131,18 +167,18 @@
|
|||||||
<height>32</height>
|
<height>32</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize" >
|
|
||||||
<size>
|
|
||||||
<width>55</width>
|
|
||||||
<height>32</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip" >
|
<property name="toolTip" >
|
||||||
<string>Add a new RSS stream</string>
|
<string>Add a new RSS stream</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize" >
|
||||||
|
<size>
|
||||||
|
<width>55</width>
|
||||||
|
<height>32</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -164,12 +200,21 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" >
|
<layout class="QVBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="news_lbl" >
|
<widget class="QLabel" name="news_lbl" >
|
||||||
<property name="font" >
|
<property name="font" >
|
||||||
@ -198,12 +243,21 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -236,6 +290,11 @@
|
|||||||
<string>Refresh all streams</string>
|
<string>Refresh all streams</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionMark_all_as_read" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Mark all as read</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
QTreeWidgetItem* item = listStreams->itemAt(pos);
|
QTreeWidgetItem* item = listStreams->itemAt(pos);
|
||||||
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems();
|
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems();
|
||||||
if(item != 0) {
|
if(item != 0) {
|
||||||
|
myFinishedListMenu.addAction(actionMark_all_as_read);
|
||||||
myFinishedListMenu.addAction(actionDelete);
|
myFinishedListMenu.addAction(actionDelete);
|
||||||
if(selectedItems.size() == 1)
|
if(selectedItems.size() == 1)
|
||||||
myFinishedListMenu.addAction(actionRename);
|
myFinishedListMenu.addAction(actionRename);
|
||||||
@ -118,13 +119,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RSSImp::on_actionMark_all_as_read_triggered() {
|
||||||
|
QList<QTreeWidgetItem*> selectedItems = listStreams->selectedItems();
|
||||||
|
QTreeWidgetItem* item;
|
||||||
|
foreach(item, selectedItems){
|
||||||
|
QString url = item->text(1);
|
||||||
|
RssStream *feed = rssmanager->getFeed(url);
|
||||||
|
feed->markAllAsRead();
|
||||||
|
item->setData(0, Qt::DisplayRole, stream->getAliasOrUrl()+ QString::fromUtf8(" (0)"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//right-click somewhere, refresh all the streams
|
//right-click somewhere, refresh all the streams
|
||||||
void RSSImp::refreshAllStreams() {
|
void RSSImp::refreshAllStreams() {
|
||||||
textBrowser->clear();
|
textBrowser->clear();
|
||||||
listNews->clear();
|
listNews->clear();
|
||||||
unsigned int nbFeeds = listStreams->topLevelItemCount();
|
unsigned int nbFeeds = listStreams->topLevelItemCount();
|
||||||
for(unsigned int i=0; i<nbFeeds; ++i)
|
for(unsigned int i=0; i<nbFeeds; ++i)
|
||||||
listStreams->topLevelItem(i)->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
listStreams->topLevelItem(i)->setData(0,Qt::DecorationRole, QVariant(QIcon(":/Icons/loading.png")));
|
||||||
rssmanager->refreshAll();
|
rssmanager->refreshAll();
|
||||||
updateLastRefreshedTimeForStreams();
|
updateLastRefreshedTimeForStreams();
|
||||||
}
|
}
|
||||||
@ -253,6 +265,7 @@
|
|||||||
addStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/subscribe.png")));
|
addStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/subscribe.png")));
|
||||||
delStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/unsubscribe.png")));
|
delStream_button->setIcon(QIcon(QString::fromUtf8(":/Icons/unsubscribe.png")));
|
||||||
refreshAll_button->setIcon(QIcon(QString::fromUtf8(":/Icons/refresh.png")));
|
refreshAll_button->setIcon(QIcon(QString::fromUtf8(":/Icons/refresh.png")));
|
||||||
|
actionMark_all_as_read->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||||
// icons of right-click menu
|
// icons of right-click menu
|
||||||
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/unsubscribe16.png")));
|
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/unsubscribe16.png")));
|
||||||
actionRename->setIcon(QIcon(QString::fromUtf8(":/Icons/log.png")));
|
actionRename->setIcon(QIcon(QString::fromUtf8(":/Icons/log.png")));
|
||||||
|
@ -57,6 +57,7 @@ class RSSImp : public QWidget, public Ui::RSS{
|
|||||||
void selectFirstFeed();
|
void selectFirstFeed();
|
||||||
void selectFirstNews();
|
void selectFirstNews();
|
||||||
void updateFeedNbNews(QString url);
|
void updateFeedNbNews(QString url);
|
||||||
|
void on_actionMark_all_as_read_triggered();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RSSImp();
|
RSSImp();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user