diff --git a/README.md b/README.md index 37548cb09..9a4cd3622 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ RSS Guard is simple, light and easy-to-use RSS/ATOM feed aggregator developed us * [Nextcloud News](https://apps.nextcloud.com/apps/news), * [Gmail API](https://developers.google.com/gmail/api). +Application icon was kindly contributed by Siddharth Yadav - @Siddharth_yd (Instagram), illustrationdesignsid@gmail.com (e-mail). + Development builds can be downloaded [here for Windows](https://bintray.com/martinrotter/rssguard/Development/Windows) and [here for Linux/Mac](https://bintray.com/martinrotter/rssguard/Development/LinuxMacOs). Documentation is [here](https://github.com/martinrotter/rssguard/blob/master/resources/docs/Documentation.md). diff --git a/resources/docs/Message-filters.md b/resources/docs/Message-filters.md index 55936fc79..78f7192a7 100755 --- a/resources/docs/Message-filters.md +++ b/resources/docs/Message-filters.md @@ -48,6 +48,19 @@ function filterMessage() { return MSG_ACCEPT; } ``` + +Make sure that your receive only one message with particular URL and all other messages with same URL are subsequently ignored. +```js +function filterMessage() { + if (msg.isDuplicateWithAttribute(2)) { + return MSG_IGNORE; + } + else { + return MSG_ACCEPT; + } +} +``` + ## `Message filters` dialog The dialog is accessible from menu `Messages -> Message filters` and is the central place for message filters management within RSS Guard. It allows you to: * add or remove message filters, diff --git a/resources/docs/images/rssguard.png b/resources/docs/images/rssguard.png index 9ff1a62b5..ac35cca0e 100755 Binary files a/resources/docs/images/rssguard.png and b/resources/docs/images/rssguard.png differ diff --git a/resources/graphics/original_sizes/rssguard.png b/resources/graphics/original_sizes/rssguard.png new file mode 100755 index 000000000..c7024b47c Binary files /dev/null and b/resources/graphics/original_sizes/rssguard.png differ diff --git a/resources/graphics/original_sizes/rssguard_mono.png b/resources/graphics/original_sizes/rssguard_mono.png new file mode 100755 index 000000000..c9e0ad699 Binary files /dev/null and b/resources/graphics/original_sizes/rssguard_mono.png differ diff --git a/resources/graphics/original_sizes/rssguard_plain.png b/resources/graphics/original_sizes/rssguard_plain.png new file mode 100755 index 000000000..b901a1637 Binary files /dev/null and b/resources/graphics/original_sizes/rssguard_plain.png differ diff --git a/resources/graphics/original_sizes/rssguard_plain_mono.png b/resources/graphics/original_sizes/rssguard_plain_mono.png new file mode 100755 index 000000000..d705a10a0 Binary files /dev/null and b/resources/graphics/original_sizes/rssguard_plain_mono.png differ diff --git a/resources/graphics/rssguard.ico b/resources/graphics/rssguard.ico old mode 100644 new mode 100755 index 41353f181..be7fb19c4 Binary files a/resources/graphics/rssguard.ico and b/resources/graphics/rssguard.ico differ diff --git a/resources/graphics/rssguard.png b/resources/graphics/rssguard.png old mode 100644 new mode 100755 index 9ff1a62b5..ac35cca0e Binary files a/resources/graphics/rssguard.png and b/resources/graphics/rssguard.png differ diff --git a/resources/graphics/rssguard_mono.png b/resources/graphics/rssguard_mono.png index cad2dd806..1ac6e9220 100755 Binary files a/resources/graphics/rssguard_mono.png and b/resources/graphics/rssguard_mono.png differ diff --git a/resources/graphics/rssguard_plain.png b/resources/graphics/rssguard_plain.png old mode 100644 new mode 100755 index 350cc3a58..1e5b8be13 Binary files a/resources/graphics/rssguard_plain.png and b/resources/graphics/rssguard_plain.png differ diff --git a/resources/graphics/rssguard_plain_mono.png b/resources/graphics/rssguard_plain_mono.png index 74da83479..c1d2d1b48 100755 Binary files a/resources/graphics/rssguard_plain_mono.png and b/resources/graphics/rssguard_plain_mono.png differ diff --git a/resources/macosx/rssguard.icns b/resources/macosx/rssguard.icns old mode 100644 new mode 100755 index 02bdf3c4b..b90713fce Binary files a/resources/macosx/rssguard.icns and b/resources/macosx/rssguard.icns differ diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 7291ac9bd..cd82749e0 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -1,3 +1,17 @@ +3.8.1 +————— + +Added: +▪ New applications icons. Contributed by Siddharth Yadav: + ▪ @Siddharth_yd (Instagram) + ▪ illustrationdesignsid@gmail.com (e-mail) +▪ +▪ + +Fixed/changed: +▪ +▪ + 3.8.0 ————— diff --git a/src/librssguard/gui/dialogs/formmain.cpp b/src/librssguard/gui/dialogs/formmain.cpp index b821e72f0..9a67497a5 100755 --- a/src/librssguard/gui/dialogs/formmain.cpp +++ b/src/librssguard/gui/dialogs/formmain.cpp @@ -159,6 +159,7 @@ QList FormMain::allActions() const { actions << m_ui->m_actionClearAllItems; actions << m_ui->m_actionShowOnlyUnreadItems; actions << m_ui->m_actionShowTreeBranches; + actions << m_ui->m_actionAutoExpandItemsWhenSelected; actions << m_ui->m_actionShowOnlyUnreadMessages; actions << m_ui->m_actionMarkSelectedMessagesAsRead; actions << m_ui->m_actionMarkSelectedMessagesAsUnread; @@ -596,6 +597,8 @@ void FormMain::loadSize() { SETTING(Feeds::ShowOnlyUnreadFeeds)).toBool()); m_ui->m_actionShowTreeBranches->setChecked(settings->value(GROUP(Feeds), SETTING(Feeds::ShowTreeBranches)).toBool()); + m_ui->m_actionAutoExpandItemsWhenSelected->setChecked(settings->value(GROUP(Feeds), + SETTING(Feeds::AutoExpandOnSelection)).toBool()); m_ui->m_actionShowOnlyUnreadMessages->setChecked(settings->value(GROUP(Messages), SETTING(Messages::ShowOnlyUnreadMessages)).toBool()); m_ui->m_actionAlternateColorsInLists->setChecked(settings->value(GROUP(GUI), @@ -763,6 +766,8 @@ void FormMain::createConnections() { tabWidget()->feedMessageViewer(), &FeedMessageViewer::toggleShowOnlyUnreadFeeds); connect(m_ui->m_actionShowTreeBranches, &QAction::toggled, tabWidget()->feedMessageViewer(), &FeedMessageViewer::toggleShowFeedTreeBranches); + connect(m_ui->m_actionAutoExpandItemsWhenSelected, &QAction::toggled, + tabWidget()->feedMessageViewer(), &FeedMessageViewer::toggleItemsAutoExpandingOnSelection); connect(m_ui->m_actionAlternateColorsInLists, &QAction::toggled, tabWidget()->feedMessageViewer(), &FeedMessageViewer::alternateRowColorsInLists); connect(m_ui->m_actionShowOnlyUnreadMessages, &QAction::toggled, diff --git a/src/librssguard/gui/dialogs/formmain.ui b/src/librssguard/gui/dialogs/formmain.ui index f4cda084b..9db597b8b 100755 --- a/src/librssguard/gui/dialogs/formmain.ui +++ b/src/librssguard/gui/dialogs/formmain.ui @@ -116,6 +116,7 @@ + @@ -784,6 +785,14 @@ Alternate row colors in lists + + + true + + + Automatically &expand items when selected + + diff --git a/src/librssguard/gui/feedmessageviewer.cpp b/src/librssguard/gui/feedmessageviewer.cpp index 320f18539..4ae294661 100644 --- a/src/librssguard/gui/feedmessageviewer.cpp +++ b/src/librssguard/gui/feedmessageviewer.cpp @@ -188,6 +188,12 @@ void FeedMessageViewer::toggleShowFeedTreeBranches() { qApp->settings()->setValue(GROUP(Feeds), Feeds::ShowTreeBranches, origin->isChecked()); } +void FeedMessageViewer::toggleItemsAutoExpandingOnSelection() { + const QAction* origin = qobject_cast(sender()); + + qApp->settings()->setValue(GROUP(Feeds), Feeds::AutoExpandOnSelection, origin->isChecked()); +} + void FeedMessageViewer::alternateRowColorsInLists() { const QAction* origin = qobject_cast(sender()); diff --git a/src/librssguard/gui/feedmessageviewer.h b/src/librssguard/gui/feedmessageviewer.h index 2b19749fb..822f0fb2a 100644 --- a/src/librssguard/gui/feedmessageviewer.h +++ b/src/librssguard/gui/feedmessageviewer.h @@ -66,6 +66,7 @@ class RSSGUARD_DLLSPEC FeedMessageViewer : public TabContent { void toggleShowOnlyUnreadMessages(); void toggleShowOnlyUnreadFeeds(); void toggleShowFeedTreeBranches(); + void toggleItemsAutoExpandingOnSelection(); void alternateRowColorsInLists(); private slots: diff --git a/src/librssguard/gui/feedsview.cpp b/src/librssguard/gui/feedsview.cpp index 2b232fd1d..84fd28876 100755 --- a/src/librssguard/gui/feedsview.cpp +++ b/src/librssguard/gui/feedsview.cpp @@ -713,6 +713,11 @@ void FeedsView::selectionChanged(const QItemSelection& selected, const QItemSele emit itemSelected(selected_item); m_proxyModel->invalidateReadFeedsFilter(); + + if (!selectedIndexes().isEmpty() && + qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::AutoExpandOnSelection)).toBool()) { + expand(selectedIndexes().first()); + } } void FeedsView::keyPressEvent(QKeyEvent* event) { diff --git a/src/librssguard/gui/systemtrayicon.cpp b/src/librssguard/gui/systemtrayicon.cpp index 91232acec..5e26de222 100644 --- a/src/librssguard/gui/systemtrayicon.cpp +++ b/src/librssguard/gui/systemtrayicon.cpp @@ -124,26 +124,26 @@ void SystemTrayIcon::setNumber(int number, bool any_new_message) { // Numbers with more than 2 digits won't be readable, display // infinity symbol in that case. if (number > 999) { - m_font.setPixelSize(100); + m_font.setPixelSize(background.width() * 0.78); tray_painter.setFont(m_font); - tray_painter.drawText(QRect(0, 0, 128, 128), Qt::AlignVCenter | Qt::AlignCenter, QChar(8734)); + tray_painter.drawText(background.rect(), Qt::AlignVCenter | Qt::AlignCenter, QChar(8734)); } else { // Smaller number if it has 3 digits. if (number > 99) { - m_font.setPixelSize(55); + m_font.setPixelSize(background.width() * 0.43); } else if (number > 9) { - m_font.setPixelSize(80); + m_font.setPixelSize(background.width() * 0.56); } // Bigger number if it has just one digit. else { - m_font.setPixelSize(100); + m_font.setPixelSize(background.width() * 0.78); } tray_painter.setFont(m_font); - tray_painter.drawText(QRect(0, 0, 128, 128), + tray_painter.drawText(background.rect(), Qt::AlignmentFlag::AlignVCenter | Qt::AlignmentFlag::AlignCenter, QString::number(number)); } diff --git a/src/librssguard/miscellaneous/databasequeries.cpp b/src/librssguard/miscellaneous/databasequeries.cpp index 3e8d23d0e..69078b6c5 100755 --- a/src/librssguard/miscellaneous/databasequeries.cpp +++ b/src/librssguard/miscellaneous/databasequeries.cpp @@ -888,9 +888,9 @@ int DatabaseQueries::updateMessages(QSqlDatabase db, } int id_existing_message = -1; - qint64 date_existing_message; - bool is_read_existing_message; - bool is_important_existing_message; + qint64 date_existing_message = 0; + bool is_read_existing_message = false; + bool is_important_existing_message = false; QString contents_existing_message; QString feed_id_existing_message; @@ -973,19 +973,22 @@ int DatabaseQueries::updateMessages(QSqlDatabase db, // Message is already in the DB. // // Now, we update it if at least one of next conditions is true: - // 1) Message has custom ID AND (its date OR read status OR starred status are changed). + // 1) Message has custom ID AND (its date OR read status OR starred status are changed or message + // was moved from one feed to another - this can particularly happen in Gmail feeds). + // // 2) Message has its date fetched from feed AND its date is different from date in DB and contents is changed. if (/* 1 */ (!message.m_customId.isEmpty() && (message.m_created.toMSecsSinceEpoch() != date_existing_message || message.m_isRead != is_read_existing_message || message.m_isImportant != is_important_existing_message || - message.m_feedId != feed_id_existing_message)) || + message.m_feedId != feed_id_existing_message || + message.m_contents != contents_existing_message)) || /* 2 */ (message.m_createdFromFeed && message.m_created.toMSecsSinceEpoch() != date_existing_message && message.m_contents != contents_existing_message)) { // Message exists, it is changed, update it. query_update.bindValue(QSL(":title"), unnulifyString(message.m_title)); - query_update.bindValue(QSL(":is_read"), (int) message.m_isRead); - query_update.bindValue(QSL(":is_important"), (int) message.m_isImportant); + query_update.bindValue(QSL(":is_read"), int(message.m_isRead)); + query_update.bindValue(QSL(":is_important"), int(message.m_isImportant)); query_update.bindValue(QSL(":url"), unnulifyString(message.m_url)); query_update.bindValue(QSL(":author"), unnulifyString(message.m_author)); query_update.bindValue(QSL(":date_created"), message.m_created.toMSecsSinceEpoch()); @@ -1019,8 +1022,8 @@ int DatabaseQueries::updateMessages(QSqlDatabase db, // Message with this URL is not fetched in this feed yet. query_insert.bindValue(QSL(":feed"), unnulifyString(feed_custom_id)); query_insert.bindValue(QSL(":title"), unnulifyString(message.m_title)); - query_insert.bindValue(QSL(":is_read"), (int) message.m_isRead); - query_insert.bindValue(QSL(":is_important"), (int) message.m_isImportant); + query_insert.bindValue(QSL(":is_read"), int(message.m_isRead)); + query_insert.bindValue(QSL(":is_important"), int(message.m_isImportant)); query_insert.bindValue(QSL(":url"), unnulifyString( message.m_url)); query_insert.bindValue(QSL(":author"), unnulifyString(message.m_author)); query_insert.bindValue(QSL(":date_created"), message.m_created.toMSecsSinceEpoch()); diff --git a/src/librssguard/miscellaneous/settings.cpp b/src/librssguard/miscellaneous/settings.cpp index a86b4ebe2..477dfcad0 100755 --- a/src/librssguard/miscellaneous/settings.cpp +++ b/src/librssguard/miscellaneous/settings.cpp @@ -60,6 +60,9 @@ DVALUE(bool) Feeds::ShowOnlyUnreadFeedsDef = false; DKEY Feeds::ShowTreeBranches = "show_tree_branches"; DVALUE(bool) Feeds::ShowTreeBranchesDef = true; +DKEY Feeds::AutoExpandOnSelection = "auto_expand_on_selection"; +DVALUE(bool) Feeds::AutoExpandOnSelectionDef = false; + DKEY Feeds::ListFont = "list_font"; // Messages. diff --git a/src/librssguard/miscellaneous/settings.h b/src/librssguard/miscellaneous/settings.h index f10bd7bc7..18bbd939d 100644 --- a/src/librssguard/miscellaneous/settings.h +++ b/src/librssguard/miscellaneous/settings.h @@ -79,6 +79,9 @@ namespace Feeds { KEY ShowTreeBranches; VALUE(bool) ShowTreeBranchesDef; + KEY AutoExpandOnSelection; + VALUE(bool) AutoExpandOnSelectionDef; + KEY ListFont; } diff --git a/src/librssguard/services/standard/standardfeed.cpp b/src/librssguard/services/standard/standardfeed.cpp index 432d38f81..9b9aaa99c 100644 --- a/src/librssguard/services/standard/standardfeed.cpp +++ b/src/librssguard/services/standard/standardfeed.cpp @@ -435,7 +435,6 @@ QList StandardFeed::obtainNewMessages(bool* error_during_obtaining) { QList> headers; headers << NetworkFactory::generateBasicAuthHeader(username(), password()); - m_networkError = NetworkFactory::performNetworkOperation(url(), download_timeout, QByteArray(),