mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-25 13:38:44 +01:00
Added mark everything read action.
This commit is contained in:
parent
ef06d21ef4
commit
b93df8aab3
@ -175,6 +175,8 @@ void FeedMessageViewer::createConnections() {
|
||||
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedSourceMessagesInternally()));
|
||||
connect(FormMain::getInstance()->m_ui->m_actionOpenSelectedMessagesInternally,
|
||||
SIGNAL(triggered()), m_messagesView, SLOT(openSelectedMessagesInternally()));
|
||||
connect(FormMain::getInstance()->m_ui->m_actionMarkAllFeedsRead,
|
||||
SIGNAL(triggered()), m_feedsView, SLOT(markAllFeedsRead()));
|
||||
connect(FormMain::getInstance()->m_ui->m_actionMarkFeedsAsRead,
|
||||
SIGNAL(triggered()), m_feedsView, SLOT(markSelectedFeedsRead()));
|
||||
connect(FormMain::getInstance()->m_ui->m_actionMarkFeedsAsUnread,
|
||||
|
@ -126,6 +126,17 @@ void FeedsView::markSelectedFeedsUnread() {
|
||||
markSelectedFeedsReadStatus(0);
|
||||
}
|
||||
|
||||
void FeedsView::markAllFeedsReadStatus(int read) {
|
||||
m_sourceModel->markFeedsRead(allFeeds(), read);
|
||||
updateCountsOfAllFeeds(false);
|
||||
|
||||
emit feedsNeedToBeReloaded(read);
|
||||
}
|
||||
|
||||
void FeedsView::markAllFeedsRead() {
|
||||
markAllFeedsReadStatus(1);
|
||||
}
|
||||
|
||||
void FeedsView::updateCountsOfSelectedFeeds(bool update_total_too) {
|
||||
foreach (FeedsModelFeed *feed, selectedFeeds()) {
|
||||
feed->updateCounts(update_total_too);
|
||||
@ -155,7 +166,7 @@ void FeedsView::initializeContextMenuCategoriesFeeds() {
|
||||
void FeedsView::initializeContextMenuEmptySpace() {
|
||||
m_contextMenuEmptySpace = new QMenu(tr("Context menu for feeds"), this);
|
||||
m_contextMenuEmptySpace->addActions(QList<QAction*>() <<
|
||||
FormMain::getInstance()->m_ui->m_actionAddNewFeed);
|
||||
FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds);
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,9 @@ class FeedsView : public QTreeView {
|
||||
void markSelectedFeedsRead();
|
||||
void markSelectedFeedsUnread();
|
||||
|
||||
void markAllFeedsReadStatus(int read);
|
||||
void markAllFeedsRead();
|
||||
|
||||
// Feed clearers.
|
||||
void setSelectedFeedsClearStatus(int clear);
|
||||
void clearSelectedFeeds();
|
||||
|
@ -223,6 +223,7 @@ void FormMain::setupIcons() {
|
||||
m_ui->m_actionAddNewCategory->setIcon(IconThemeFactory::getInstance()->fromTheme("document-new"));
|
||||
m_ui->m_actionAddNewFeed->setIcon(IconThemeFactory::getInstance()->fromTheme("document-new"));
|
||||
m_ui->m_actionEditSelectedFeedCategory->setIcon(IconThemeFactory::getInstance()->fromTheme("gnome-other"));
|
||||
m_ui->m_actionMarkAllFeedsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-not-junk"));
|
||||
m_ui->m_actionMarkFeedsAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-not-junk"));
|
||||
m_ui->m_actionMarkFeedsAsUnread->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-important"));
|
||||
m_ui->m_actionMarkFeedsAsRead->setIcon(IconThemeFactory::getInstance()->fromTheme("mail-mark-not-junk"));
|
||||
|
@ -102,6 +102,7 @@
|
||||
<addaction name="m_actionEditSelectedFeedCategory"/>
|
||||
<addaction name="m_actionDeleteSelectedFeedsCategories"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="m_actionMarkAllFeedsRead"/>
|
||||
<addaction name="m_actionMarkFeedsAsRead"/>
|
||||
<addaction name="m_actionMarkFeedsAsUnread"/>
|
||||
<addaction name="m_actionClearFeeds"/>
|
||||
@ -123,7 +124,7 @@
|
||||
<addaction name="m_menuTools"/>
|
||||
<addaction name="m_menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="m_statusBar"/>
|
||||
<widget class="StatusBar" name="m_statusBar"/>
|
||||
<action name="m_actionImport">
|
||||
<property name="text">
|
||||
<string>&Import</string>
|
||||
@ -383,6 +384,14 @@
|
||||
<string>No actions are available right now.</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="m_actionMarkAllFeedsRead">
|
||||
<property name="text">
|
||||
<string>Mark all &items read</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Mark all messages in all feeds read. This does not take message filters into account.</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
@ -391,6 +400,11 @@
|
||||
<header>tabwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>StatusBar</class>
|
||||
<extends>QStatusBar</extends>
|
||||
<header>statusbar.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user