diff --git a/resources/scripts/adblock/adblock-server.js b/resources/scripts/adblock/adblock-server.js index 4eb1f24d2..5555402d7 100644 --- a/resources/scripts/adblock/adblock-server.js +++ b/resources/scripts/adblock/adblock-server.js @@ -1,10 +1,8 @@ // Simple local HTTP server providing ad-blocking functionality via https://github.com/cliqz-oss/adblocker // // How to install: -// npm i -g @cliqz/adblocker -// npm i -g concat-stream // npm i -g tldts-experimental -// npm i -g node-fetch +// npm i -g @cliqz/adblocker // // How to run: // NODE_PATH="C:\Users\\AppData\Roaming\npm\node_modules" node ./adblock-server.js "" "" @@ -23,9 +21,6 @@ const fs = require('fs'); const tldts = require('tldts-experimental'); const adblock = require('@cliqz/adblocker') const http = require('http'); -const concat = require('concat-stream'); -const constants = require('node:http2'); -const fetch = require("node-fetch"); const cluster = require('cluster'); const numCPUs = require('os').cpus().length; diff --git a/src/librssguard/gui/reusable/labelwithstatus.cpp b/src/librssguard/gui/reusable/labelwithstatus.cpp index 2b2a51acc..50c2558cd 100644 --- a/src/librssguard/gui/reusable/labelwithstatus.cpp +++ b/src/librssguard/gui/reusable/labelwithstatus.cpp @@ -18,6 +18,8 @@ LabelWithStatus::LabelWithStatus(QWidget* parent) // Compose the layout. m_layout->addWidget(m_wdgInput); m_layout->addWidget(m_btnStatus); + + setLayoutDirection(Qt::LayoutDirection::RightToLeft); } void LabelWithStatus::setStatus(WidgetWithStatus::StatusType status, diff --git a/src/librssguard/gui/reusable/widgetwithstatus.cpp b/src/librssguard/gui/reusable/widgetwithstatus.cpp index fc50c9079..6f1d7da62 100644 --- a/src/librssguard/gui/reusable/widgetwithstatus.cpp +++ b/src/librssguard/gui/reusable/widgetwithstatus.cpp @@ -17,6 +17,7 @@ WidgetWithStatus::WidgetWithStatus(QWidget* parent) m_iconWarning = qApp->icons()->fromTheme(QSL("dialog-warning")); m_iconError = qApp->icons()->fromTheme(QSL("dialog-error")); m_iconOk = qApp->icons()->fromTheme(QSL("dialog-yes")); + m_iconQuestion = qApp->icons()->fromTheme(QSL("dialog-question")); // Set layout properties. m_layout->setContentsMargins({}); @@ -49,6 +50,10 @@ void WidgetWithStatus::setStatus(WidgetWithStatus::StatusType status, const QStr m_btnStatus->setIcon(m_iconOk); break; + case StatusType::Question: + m_btnStatus->setIcon(m_iconQuestion); + break; + default: break; } diff --git a/src/librssguard/gui/reusable/widgetwithstatus.h b/src/librssguard/gui/reusable/widgetwithstatus.h index 7c1ac752e..c7c0d360e 100644 --- a/src/librssguard/gui/reusable/widgetwithstatus.h +++ b/src/librssguard/gui/reusable/widgetwithstatus.h @@ -18,7 +18,8 @@ class WidgetWithStatus : public QWidget { Warning, Error, Ok, - Progress + Progress, + Question }; explicit WidgetWithStatus(QWidget* parent); @@ -36,6 +37,7 @@ class WidgetWithStatus : public QWidget { QIcon m_iconWarning; QIcon m_iconError; QIcon m_iconOk; + QIcon m_iconQuestion; }; inline WidgetWithStatus::StatusType WidgetWithStatus::status() const { diff --git a/src/librssguard/librssguard.pro b/src/librssguard/librssguard.pro index cc29683c6..6bebf9faa 100644 --- a/src/librssguard/librssguard.pro +++ b/src/librssguard/librssguard.pro @@ -64,6 +64,7 @@ HEADERS += core/feeddownloader.h \ gui/notifications/notificationseditor.h \ gui/notifications/singlenotificationeditor.h \ gui/reusable/baselineedit.h \ + gui/reusable/helpspoiler.h \ gui/reusable/progressbarwithtext.h \ gui/reusable/resizablestackedwidget.h \ gui/settings/settingsnotifications.h \ @@ -245,6 +246,7 @@ SOURCES += core/feeddownloader.cpp \ gui/notifications/notificationseditor.cpp \ gui/notifications/singlenotificationeditor.cpp \ gui/reusable/baselineedit.cpp \ + gui/reusable/helpspoiler.cpp \ gui/reusable/progressbarwithtext.cpp \ gui/reusable/resizablestackedwidget.cpp \ gui/settings/settingsnotifications.cpp \ diff --git a/src/librssguard/services/greader/gui/greaderaccountdetails.cpp b/src/librssguard/services/greader/gui/greaderaccountdetails.cpp index 54994d9b0..2f47946ad 100644 --- a/src/librssguard/services/greader/gui/greaderaccountdetails.cpp +++ b/src/librssguard/services/greader/gui/greaderaccountdetails.cpp @@ -29,8 +29,6 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent), m_ui.m_dateNewerThan->setMinimumDate(QDate(2000, 1, 1)); m_ui.m_dateNewerThan->setMaximumDate(QDate::currentDate()); - - //m_ui.m_dateNewerThan->setDate(QDate::currentDate().addYears(-1)); m_ui.m_dateNewerThan->setDisplayFormat(qApp->localization()->loadedLocale().dateFormat()); m_ui.m_lblTestResult->label()->setWordWrap(true); @@ -42,33 +40,31 @@ GreaderAccountDetails::GreaderAccountDetails(QWidget* parent) : QWidget(parent), tr("No test done yet."), tr("Here, results of connection test are shown.")); - m_ui.m_lblLimitMessages->setText(tr("Some feeds might contain tens of thousands of articles " - "and downloading all of them could take great amount of time, " - "so sometimes it is good to download " - "only certain amount of newest messages.")); + m_ui.m_lblLimitMessages->setHelpText(tr("Some feeds might contain tens of thousands of articles " + "and downloading all of them could take great amount of time, " + "so sometimes it is good to download " + "only certain amount of newest messages."), + true); - GuiUtilities::setLabelAsNotice(*m_ui.m_lblLimitMessages, true); - - m_ui.m_lblNewAlgorithm->setText(tr("If you select intelligent synchronization, then only not-yet-fetched " - "or updated articles are downloaded. Network usage is greatly reduced and " - "overall synchronization speed is greatly improved, but " - "first feed fetching could be slow anyway if your feed contains " - "huge number of articles.")); - - GuiUtilities::setLabelAsNotice(*m_ui.m_lblNewAlgorithm, false); + m_ui.m_lblNewAlgorithm->setHelpText(tr("If you select intelligent synchronization, then only not-yet-fetched " + "or updated articles are downloaded. Network usage is greatly reduced and " + "overall synchronization speed is greatly improved, but " + "first feed fetching could be slow anyway if your feed contains " + "huge number of articles."), + false); #if defined(INOREADER_OFFICIAL_SUPPORT) - m_ui.m_lblInfo->setText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your " - "client ID/secret, but it is strongly recommended to obtain your " - "own as preconfigured tokens have limited global usage quota. If you wish " - "to use preconfigured tokens, simply leave all above fields to their default values even " - "if they are empty.")); + m_ui.m_lblInfo->setHelpText(tr("There are some preconfigured OAuth tokens so you do not have to fill in your " + "client ID/secret, but it is strongly recommended to obtain your " + "own as preconfigured tokens have limited global usage quota. If you wish " + "to use preconfigured tokens, simply leave all above fields to their default values even " + "if they are empty."), + true); #else - m_ui.m_lblInfo->setText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL.")); + m_ui.m_lblInfo->setHelpText(tr("You have to fill in your client ID/secret and also fill in correct redirect URL."), + true); #endif - GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true); - connect(m_ui.m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onPasswordChanged); connect(m_ui.m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onUsernameChanged); connect(m_ui.m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &GreaderAccountDetails::onUrlChanged); diff --git a/src/librssguard/services/greader/gui/greaderaccountdetails.ui b/src/librssguard/services/greader/gui/greaderaccountdetails.ui index 9cc33f2e6..5ced96f5f 100644 --- a/src/librssguard/services/greader/gui/greaderaccountdetails.ui +++ b/src/librssguard/services/greader/gui/greaderaccountdetails.ui @@ -250,20 +250,7 @@ - - - - 0 - 1 - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - + @@ -292,9 +279,6 @@ 0 - - Qt::RightToLeft - @@ -313,18 +297,10 @@ - - - true - - + - - - true - - + @@ -352,6 +328,12 @@
resizablestackedwidget.h
1 + + HelpSpoiler + QWidget +
helpspoiler.h
+ 1 +
m_cmbService