mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
JavaScript privacy options, update, part2
This commit is contained in:
parent
03d5b48538
commit
bba5d3680d
@ -46,6 +46,10 @@ void QzSettings::loadSettings()
|
|||||||
loadTabsOnActivation = settings.value("LoadTabsOnActivation", false).toBool();
|
loadTabsOnActivation = settings.value("LoadTabsOnActivation", false).toBool();
|
||||||
autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList();
|
autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList();
|
||||||
blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList();
|
blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList();
|
||||||
|
allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", false).toBool();
|
||||||
|
allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", false).toBool();
|
||||||
|
allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", false).toBool();
|
||||||
|
allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", false).toBool();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("Browser-Tabs-Settings");
|
settings.beginGroup("Browser-Tabs-Settings");
|
||||||
|
@ -47,6 +47,10 @@ public:
|
|||||||
// Web-Browser-Settings
|
// Web-Browser-Settings
|
||||||
int defaultZoom;
|
int defaultZoom;
|
||||||
bool loadTabsOnActivation;
|
bool loadTabsOnActivation;
|
||||||
|
bool allowJsGeometryChange;
|
||||||
|
bool allowJsHideMenuBar;
|
||||||
|
bool allowJsHideStatusBar;
|
||||||
|
bool allowJsHideToolBar;
|
||||||
|
|
||||||
QStringList autoOpenProtocols;
|
QStringList autoOpenProtocols;
|
||||||
QStringList blockedProtocols;
|
QStringList blockedProtocols;
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "qupzilla.h"
|
#include "qupzilla.h"
|
||||||
#include "tabwidget.h"
|
#include "tabwidget.h"
|
||||||
#include "tabbedwebview.h"
|
#include "tabbedwebview.h"
|
||||||
|
#include "qzsettings.h"
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
@ -56,7 +57,7 @@ PopupWebPage::PopupWebPage(QWebPage::WebWindowType type, QupZilla* mainClass)
|
|||||||
|
|
||||||
void PopupWebPage::slotGeometryChangeRequested(const QRect &rect)
|
void PopupWebPage::slotGeometryChangeRequested(const QRect &rect)
|
||||||
{
|
{
|
||||||
if (rect.isValid()) {
|
if (rect.isValid() && qzSettings->allowJsGeometryChange) {
|
||||||
m_geometry = rect;
|
m_geometry = rect;
|
||||||
m_createNewWindow = true;
|
m_createNewWindow = true;
|
||||||
}
|
}
|
||||||
@ -64,16 +65,19 @@ void PopupWebPage::slotGeometryChangeRequested(const QRect &rect)
|
|||||||
|
|
||||||
void PopupWebPage::slotMenuBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotMenuBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
|
if (!qzSettings->allowJsHideMenuBar) return;
|
||||||
m_menuBarVisible = visible;
|
m_menuBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupWebPage::slotStatusBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotStatusBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
|
if (!qzSettings->allowJsHideStatusBar) return;
|
||||||
m_statusBarVisible = visible;
|
m_statusBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupWebPage::slotToolBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotToolBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
|
if (!qzSettings->allowJsHideToolBar) return;
|
||||||
m_toolBarVisible = visible;
|
m_toolBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user