diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-10-23 16:11:52 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-10-26 00:16:24 +0200 |
commit | f61c48d0e6058ebec3ff1d60ba800192d8bc1a4d (patch) | |
tree | de7050c0becf1a50120734570b1718900c37fcdf /src/settings/webkitwidget.cpp | |
parent | Clean up UrlBar code (diff) | |
download | rekonq-f61c48d0e6058ebec3ff1d60ba800192d8bc1a4d.tar.xz |
Improve rekonq WebKit settings
This patch changes WebKit Settings window removing the "unuseful"
stuffs and adding some news like WebGL or Frame Flattening
(probably useful also on netbook).
It also redesign/clean up the settings widget
Let us require QtWebKit 2.2.x, hence Qt 4.8.0 at least until someone
will explain me how I can check QtWebKit version number with cmake...
REVIEW:102920
Diffstat (limited to 'src/settings/webkitwidget.cpp')
-rw-r--r-- | src/settings/webkitwidget.cpp | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/settings/webkitwidget.cpp b/src/settings/webkitwidget.cpp index 04242af1..0f7a4b3d 100644 --- a/src/settings/webkitwidget.cpp +++ b/src/settings/webkitwidget.cpp @@ -28,12 +28,19 @@ #include "webkitwidget.h" #include "webkitwidget.moc" +// Auto Includes +#include "rekonq.h" + WebKitWidget::WebKitWidget(QWidget *parent) : QWidget(parent) , _changed(false) { setupUi(this); + setWebSettingsToolTips(); + + updateJavascriptSettings(ReKonfig::javascriptEnabled()); + connect(kcfg_javascriptEnabled, SIGNAL(clicked(bool)), this, SLOT(updateJavascriptSettings(bool))); } @@ -50,22 +57,30 @@ bool WebKitWidget::changed() void WebKitWidget::hasChanged() { + _changed = true; + emit changed(true); } void WebKitWidget::setWebSettingsToolTips() { - kcfg_autoLoadImages->setToolTip(i18n("Specifies whether images are automatically loaded in web pages.")); + kcfg_webGL->setToolTip(i18n("Enables WebGL technology")); + kcfg_spatialNavigation->setToolTip(i18n("Lets you navigating between focusable elements using arrow keys.")); + kcfg_frameFlattening->setToolTip(i18n("Flatten all the frames to become one scrollable page.")); kcfg_dnsPrefetch->setToolTip(i18n("Specifies whether WebKit will try to prefetch DNS entries to speed up browsing.")); + kcfg_printElementBackgrounds->setToolTip(i18n("If enabled, background colors and images are also drawn when the page is printed.")); kcfg_javascriptEnabled->setToolTip(i18n("Enables the execution of JavaScript programs.")); - kcfg_javaEnabled->setToolTip(i18n("Enables support for Java applets.")); - kcfg_pluginsEnabled->setToolTip(i18n("Enables support for plugins in web pages.")); kcfg_javascriptCanOpenWindows->setToolTip(i18n("If enabled, JavaScript programs are allowed to open new windows.")); kcfg_javascriptCanAccessClipboard->setToolTip(i18n("If enabled, JavaScript programs are allowed to read from and to write to the clipboard.")); - kcfg_linksIncludedInFocusChain->setToolTip(i18n("If enabled, hyperlinks are included in the keyboard focus chain.")); - kcfg_zoomTextOnly->setToolTip(i18n("If enabled, the zoom factor on a frame is only applied to the text.")); - kcfg_printElementBackgrounds->setToolTip(i18n("If enabled, background colors and images are also drawn when the page is printed.")); + kcfg_javaEnabled->setToolTip(i18n("Enables support for Java applets.")); kcfg_offlineStorageDatabaseEnabled->setToolTip(i18n("Enables support for the HTML 5 offline storage feature.")); kcfg_offlineWebApplicationCacheEnabled->setToolTip(i18n("Enables support for the HTML 5 web application cache feature.")); kcfg_localStorageEnabled->setToolTip(i18n("Enables support for the HTML 5 local storage feature.")); } + + +void WebKitWidget::updateJavascriptSettings(bool b) +{ + kcfg_javascriptCanAccessClipboard->setEnabled(b); + kcfg_javascriptCanOpenWindows->setEnabled(b); +} |