From 031af3e4367eb257062c894497569202e0dda6c1 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sun, 9 Mar 2014 11:45:36 +0100 Subject: [PATCH] Fixed bug #9. --- .../graphics/icons/mini-kfaenza/web-flash.png | Bin 0 -> 3193 bytes .../icons/mini-kfaenza/web-javascript.png | Bin 0 -> 4637 bytes resources/text/CHANGELOG | 1 + src/core/webfactory.cpp | 61 ++++++++++++++++++ src/core/webfactory.h | 19 ++++++ src/gui/formmain.cpp | 21 ++++++ src/gui/formmain.ui | 46 +++++++++---- src/gui/formsettings.cpp | 8 +++ src/gui/formsettings.ui | 58 +++++++++++++---- 9 files changed, 191 insertions(+), 23 deletions(-) create mode 100644 resources/graphics/icons/mini-kfaenza/web-flash.png create mode 100644 resources/graphics/icons/mini-kfaenza/web-javascript.png diff --git a/resources/graphics/icons/mini-kfaenza/web-flash.png b/resources/graphics/icons/mini-kfaenza/web-flash.png new file mode 100644 index 0000000000000000000000000000000000000000..a1dbd06b462902505540478a9bfe869f5ab6bd04 GIT binary patch literal 3193 zcmV-<42JWGP)&=JR3A ztXXs0d!N&T+US?;%$l{F!J3iH(Yk(nw8%f8W>z#DVGKlJ=A}>K133?ZO?Di8}&WE z+55&f?s|IX4qzH^qjp=G3b5c?o7Qi<{nB+mSGDne|Hwh4*$8{41kY8(ze_oiQzg0g zYG9DknP(vj#%At+>D5nt``N#42PS|v#2hPN1X%X+E!RD~WMX`6d;hL@Fk9HDoKQe- zf~y|UBWYoZd)f~ruc>n7yo)%xVDYX?e*EZ-z+qqtkaE~w0tSGkORAM~-2;2#v6a$g zW$OwM6${i8I&$YNpNjNUFw40L6VU^OZSMZvEWZ58)xc6T0vdp4E1(}3W@@4$eh>>H z$*U5j@0CK*3V5geLo~b**t&}TiD_5Ks~_M@Pgc=Lj~u*FfC?+h;(1A7tgAwS;}`|# zHWiOR?=YV$iHJ2JU<;23DhLpTzE>)74P`5bKNa0XO4Ar#ms z!-DyID_ojPB%Fl9ZJ&wN>lohh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ript.png new file mode 100644 index 0000000000000000000000000000000000000000..03bf3b2d47dfa53ad5de1a782b5dd4649d2c4c7e GIT binary patch literal 4637 zcmWld2UOEs7=}xW&|+l^l_4z~WC|i+*)5}1MnME*RRI|a7ASiQ$X+sJZxq=gviEYJ z1uItBL#+r1hypVI{5dDNNzTd5&3nJ^z0a3;Q)7cOEPN~=5a^7NA%+07+W+rRCgAwY zjWh=|j6S+X7EoXdfjY$j*RcDB);>U^{{POf>6C#3Zl3eSTKSrLx%m1My`4e+{{C`q zo*q88iT9o5yu9z^|3dSDKpc5S7#)j%f^YdAN&GZ&L~k%1`+l?KtGCdU-Rq1Sp9Z~c zN3SElPJm$v+^%^q6sC|^7H-KXu#{=rsRZtru&)LzAHx%n+9#q%^Bs{KNbRU&H}kd> zG0_Ar>xA=79!3}3D!+M4^{5HFA6sYpHI`wUakUdSQ^AZ>O}*m(UTwF)hvE@UNI0P& z=e-!`yv8MF*>$1&aL!&;-!Qq72-9oqWW^vmXek4%k5M`7U!^D`xDR4mX`v9{6UU$n zWTnINM0X-|Y~diRbJp`@E$fE;zkK)ASpEtA)D&<30u9sA0{wC%ybnX{1@my9> z>FMt33b_a$+&#N8dWL{Ij}ExMytz17%=9uMmVm?Rn?ht9)ru)viWjy*d%8~)5-Vbf zhML9UU@N9)+Wea$Oom99YPPc&)49!^X)lq=p_lifkbN)j{rs!mVsmEtrL}{@ojZ4! zDcfm;-b-s~56xB&t}-g0=p);)#DKG%6)#^lXtEk230U5^F`=A%SLJHA z{T(;A__&E~`&3``WFkTl6{E{wN2{i-e)VpDycwdYm9C8%k|CU%kRno;L?bUPB+&yK zlFTDXTqh2ektAA0=Hse=;QMFWYBGP~eWRIlp#AI9t%~pmP8W?@r^TS)0R=!7nYRPm zXf$Pcyj1V*y?dpr>a(7_g9< zoFKp>fNtLH_&Uo$ivUy6ieKk^l7(Yt z@B@14)x!r!ZR(5oUH`2sn?(d^O`)?VKSFM(AA{P!cgJeMjRyA{XnIoE*6CAyFAq}6 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P2aw*aPDkrcX^Tm}+0Eoh zPVCIh*yW@@pOeOQZ24PY@tCOL;o-JRV(v}xNw%e?C9|HRft~gZqlbrRV2%C!5-4y; z!Xi*`#%oca1f(hh1qi^E0Orxi3B$M0ngn^u_A8fW(k;=Ss>MhKYRzCXyMSF{-}Bnf ztoSIBtfE=@uq5W$rTw)974^8mAAijb^&Mp(WfRYA>in9&tZBOI4~LKB91Rfp}jPnrEJ4!r`PY?R_bL34n{r zHnLFSXmC0YN56Xp%r~1%G@-^Qh(YK#dd!5D^q_xilfHJcP z>p#A?ncN}ouLSZd>`m_ZzBHKM92UasD>Sh-dhq&&T|z9>z@m@YwnCp>^JryN1%Bm# NjIhR-dR@n;{{Z7WxA*`6 literal 0 HcmV?d00001 diff --git a/resources/text/CHANGELOG b/resources/text/CHANGELOG index 85f73d58b..6b55bd1e9 100644 --- a/resources/text/CHANGELOG +++ b/resources/text/CHANGELOG @@ -8,6 +8,7 @@ Fixed: Added:
    +
  • User can enable/disable web browser javascript, external plugins and images auto-loading (bug #9).
  • Custom counts of messages in feed list (issue #14) are now changeable.
  • Feed list categories expand status is now persistent.
  • System-wide external web browser can now be used.
  • diff --git a/src/core/webfactory.cpp b/src/core/webfactory.cpp index cdfb12e06..bba6ea695 100644 --- a/src/core/webfactory.cpp +++ b/src/core/webfactory.cpp @@ -1,18 +1,67 @@ #include "core/webfactory.h" +#include "core/defs.h" +#include "core/settings.h" + #include #include +#include QPointer WebFactory::s_instance; WebFactory::WebFactory(QObject *parent) : QObject(parent) { + m_globalSettings = QWebSettings::globalSettings(); } WebFactory::~WebFactory() { qDebug("Destroying WebFactory instance."); } +void WebFactory::loadState() { + Settings *settings = Settings::instance(); + + switchJavascript(settings->value(APP_CFG_BROWSER, "enable_javascript", true).toBool(), + false); + switchImages(settings->value(APP_CFG_BROWSER, "enable_images", true).toBool(), + false); + switchPlugins(settings->value(APP_CFG_BROWSER, "enable_plugins", false).toBool(), + false); +} + +void WebFactory::switchJavascript(bool enable, bool save_settings) { + if (save_settings) { + Settings::instance()->setValue(APP_CFG_BROWSER, + "enable_javascript", + enable); + } + + m_globalSettings->setAttribute(QWebSettings::JavascriptEnabled, enable); + emit javascriptSwitched(enable); +} + +void WebFactory::switchPlugins(bool enable, bool save_settings) { + if (save_settings) { + Settings::instance()->setValue(APP_CFG_BROWSER, + "enable_plugins", + enable); + } + + m_globalSettings->setAttribute(QWebSettings::PluginsEnabled, enable); + emit pluginsSwitched(enable); +} + +void WebFactory::switchImages(bool enable, bool save_settings) { + if (save_settings) { + Settings::instance()->setValue(APP_CFG_BROWSER, + "enable_images", + enable); + } + + m_globalSettings->setAttribute(QWebSettings::AutoLoadImages, enable); + emit imagesLoadingSwitched(enable); +} + WebFactory *WebFactory::instance() { if (s_instance.isNull()) { s_instance = new WebFactory(qApp); @@ -21,6 +70,18 @@ WebFactory *WebFactory::instance() { return s_instance; } +bool WebFactory::javascriptEnabled() const { + return m_globalSettings->testAttribute(QWebSettings::JavascriptEnabled); +} + +bool WebFactory::pluginsEnabled() const { + return m_globalSettings->testAttribute(QWebSettings::PluginsEnabled); +} + +bool WebFactory::autoloadImages() const { + return m_globalSettings->testAttribute(QWebSettings::AutoLoadImages); +} + QString WebFactory::stripTags(QString text) { return text.remove(QRegExp("<[^>]*>")); } diff --git a/src/core/webfactory.h b/src/core/webfactory.h index c49206f75..a3f952459 100644 --- a/src/core/webfactory.h +++ b/src/core/webfactory.h @@ -6,6 +6,8 @@ #include +class QWebSettings; + class WebFactory : public QObject { Q_OBJECT @@ -13,6 +15,11 @@ class WebFactory : public QObject { // Destructor. virtual ~WebFactory(); + // Loads the web settings directly from + // application settings and notifies the rest of + // the world about current situation. + void loadState(); + // Strips "<....>" (HTML, XML) tags from given text. QString stripTags(QString text); @@ -24,6 +31,16 @@ class WebFactory : public QObject { // Singleton getter. static WebFactory *instance(); + public slots: + // Operations. + bool javascriptEnabled() const; + bool pluginsEnabled() const; + bool autoloadImages() const; + + void switchJavascript(bool enable, bool save_settings = true); + void switchPlugins(bool enable, bool save_settings = true); + void switchImages(bool enable, bool save_settings = true); + signals: void javascriptSwitched(bool enabled); void pluginsSwitched(bool enabled); @@ -37,6 +54,8 @@ class WebFactory : public QObject { QMap generetaEscapes(); QMap generateDeescapes(); + QWebSettings *m_globalSettings; + // Singleton. static QPointer s_instance; }; diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index eaea0c32f..3f10478b0 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -21,6 +21,7 @@ #include "core/settings.h" #include "core/systemfactory.h" #include "core/databasefactory.h" +#include "core/webfactory.h" #include "gui/formabout.h" #include "gui/formsettings.h" #include "gui/feedsview.h" @@ -71,8 +72,12 @@ FormMain::FormMain(QWidget *parent) // Prepare tabs. m_ui->m_tabWidget->initializeTabs(); + // Setup some appearance of the window. setupIcons(); loadSize(); + + // Initialize the web factory. + WebFactory::instance()->loadState(); } FormMain::~FormMain() { @@ -271,6 +276,10 @@ void FormMain::setupIcons() { m_ui->m_actionCloseCurrentTab->setIcon(icon_theme_factory->fromTheme("list-remove")); m_ui->m_actionCloseAllTabs->setIcon(icon_theme_factory->fromTheme("list-remove")); m_ui->m_menuCurrentTab->setIcon(icon_theme_factory->fromTheme("list-current")); + m_ui->m_menuWebSettings->setIcon(icon_theme_factory->fromTheme("application-settings")); + m_ui->m_actionWebAutoloadImages->setIcon(icon_theme_factory->fromTheme("image-generic")); + m_ui->m_actionWebEnableExternalPlugins->setIcon(icon_theme_factory->fromTheme("web-flash")); + m_ui->m_actionWebEnableJavascript->setIcon(icon_theme_factory->fromTheme("web-javascript")); // Feeds/messages. m_ui->m_menuAddItem->setIcon(icon_theme_factory->fromTheme("item-new")); @@ -381,6 +390,18 @@ void FormMain::createConnections() { m_ui->m_tabWidget, SLOT(addEmptyBrowser())); connect(m_ui->m_actionCloseAllTabs, SIGNAL(triggered()), m_ui->m_tabWidget, SLOT(closeAllTabsExceptCurrent())); + connect(WebFactory::instance(), SIGNAL(imagesLoadingSwitched(bool)), + m_ui->m_actionWebAutoloadImages, SLOT(setChecked(bool))); + connect(WebFactory::instance(), SIGNAL(javascriptSwitched(bool)), + m_ui->m_actionWebEnableJavascript, SLOT(setChecked(bool))); + connect(WebFactory::instance(), SIGNAL(pluginsSwitched(bool)), + m_ui->m_actionWebEnableExternalPlugins, SLOT(setChecked(bool))); + connect(m_ui->m_actionWebAutoloadImages, SIGNAL(toggled(bool)), + WebFactory::instance(), SLOT(switchImages(bool))); + connect(m_ui->m_actionWebEnableExternalPlugins, SIGNAL(toggled(bool)), + WebFactory::instance(), SLOT(switchPlugins(bool))); + connect(m_ui->m_actionWebEnableJavascript, SIGNAL(toggled(bool)), + WebFactory::instance(), SLOT(switchJavascript(bool))); } void FormMain::loadWebBrowserMenu(int index) { diff --git a/src/gui/formmain.ui b/src/gui/formmain.ui index 56dd12054..4b7949e53 100644 --- a/src/gui/formmain.ui +++ b/src/gui/formmain.ui @@ -15,16 +15,7 @@ - - 0 - - - 0 - - - 0 - - + 0 @@ -48,7 +39,7 @@ 0 0 979 - 21 + 20 @@ -90,10 +81,19 @@ &Current tab + + + Settings + + + + + + @@ -425,6 +425,30 @@ Hides or displays the main menu. + + + true + + + Enable JavaScript + + + + + true + + + Enable external plugins + + + + + true + + + Auto-load images + + diff --git a/src/gui/formsettings.cpp b/src/gui/formsettings.cpp index 24a33193e..db532800a 100755 --- a/src/gui/formsettings.cpp +++ b/src/gui/formsettings.cpp @@ -22,6 +22,7 @@ #include "core/databasefactory.h" #include "core/localization.h" #include "core/systemfactory.h" +#include "core/webfactory.h" #include "core/feeddownloader.h" #include "core/dynamicshortcuts.h" #include "core/webbrowsernetworkaccessmanager.h" @@ -362,6 +363,9 @@ void FormSettings::loadBrowser() { m_ui->m_grpCustomExternalBrowser->setChecked(settings->value(APP_CFG_BROWSER, "custom_external_browser", false).toBool()); + m_ui->m_checkAutoLoadImages->setChecked(WebFactory::instance()->autoloadImages()); + m_ui->m_checkEnableJavascript->setChecked(WebFactory::instance()->javascriptEnabled()); + m_ui->m_checkEnablePlugins->setChecked(WebFactory::instance()->pluginsEnabled()); } void FormSettings::saveBrowser() { @@ -384,6 +388,10 @@ void FormSettings::saveBrowser() { "queue_tabs", m_ui->m_checkQueueTabs->isChecked()); + WebFactory::instance()->switchImages(m_ui->m_checkAutoLoadImages->isChecked()); + WebFactory::instance()->switchJavascript(m_ui->m_checkEnableJavascript->isChecked()); + WebFactory::instance()->switchPlugins(m_ui->m_checkEnablePlugins->isChecked()); + settings->setValue(APP_CFG_BROWSER, "external_browser_executable", m_ui->m_txtExternalBrowserExecutable->text()); diff --git a/src/gui/formsettings.ui b/src/gui/formsettings.ui index 34c67bbd7..78a555bb8 100644 --- a/src/gui/formsettings.ui +++ b/src/gui/formsettings.ui @@ -17,7 +17,7 @@ - 6 + 0 @@ -286,8 +286,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 100 - 30 + 564 + 364 @@ -364,8 +364,8 @@ Authors of this application are NOT responsible for lost data. 0 0 - 209 - 245 + 560 + 336 @@ -643,15 +643,15 @@ Authors of this application are NOT responsible for lost data. QFormLayout::AllNonFixedFieldsGrow - + Mouse gestures work with middle mouse button. Possible gestures are: <ul> -<li>previous web page (drag mouse left)</li> -<li>next web page (drag mouse right)</li> -<li>reload current web page (drag mouse up)</li> -<li>open new web browser tab (drag mouse down)</li> +<li>previous web page (drag mouse left),</li> +<li>next web page (drag mouse right),</li> +<li>reload current web page (drag mouse up),</li> +<li>open new web browser tab (drag mouse down).</li> </ul> @@ -662,7 +662,7 @@ Authors of this application are NOT responsible for lost data. - + Enable mouse gestures @@ -706,6 +706,27 @@ Authors of this application are NOT responsible for lost data. + + + + Enable JavaScript + + + + + + + Enable external plugins based on NPAPI + + + + + + + Auto-load images + + + @@ -1049,13 +1070,26 @@ Authors of this application are NOT responsible for lost data. - Enter format for count of messages displayed next to each feed/category in feed list. Use "%all" and "%unread" placeholders. + true + + + + Enter format for count of messages displayed next to each feed/category in feed list. Use "%all" and "%unread" strings which are placeholders for the actual count of all (or unread) messages. + + + Qt::AlignCenter + + + true + + +