diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index 00d9b4180..89af71717 100644 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -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, diff --git a/src/gui/feedsview.cpp b/src/gui/feedsview.cpp index 21b97c5d4..1f305c014 100644 --- a/src/gui/feedsview.cpp +++ b/src/gui/feedsview.cpp @@ -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() << - FormMain::getInstance()->m_ui->m_actionAddNewFeed); + FormMain::getInstance()->m_ui->m_actionUpdateAllFeeds); } diff --git a/src/gui/feedsview.h b/src/gui/feedsview.h index 13af204d9..ab0409d4d 100644 --- a/src/gui/feedsview.h +++ b/src/gui/feedsview.h @@ -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(); diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index 42379804c..71c65aa3d 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -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")); diff --git a/src/gui/formmain.ui b/src/gui/formmain.ui index c0364f490..22af37c41 100644 --- a/src/gui/formmain.ui +++ b/src/gui/formmain.ui @@ -102,6 +102,7 @@ + @@ -123,7 +124,7 @@ - + &Import @@ -383,6 +384,14 @@ No actions are available right now. + + + Mark all &items read + + + Mark all messages in all feeds read. This does not take message filters into account. + + @@ -391,6 +400,11 @@
tabwidget.h
1
+ + StatusBar + QStatusBar +
statusbar.h
+