diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index 53ed80383..6e293c665 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -49,10 +49,6 @@ void QzSettings::loadSettings() loadTabsOnActivation = settings.value("LoadTabsOnActivation", true).toBool(); autoOpenProtocols = settings.value("AutomaticallyOpenProtocols", QStringList()).toStringList(); blockedProtocols = settings.value("BlockOpeningProtocols", QStringList()).toStringList(); - allowJsGeometryChange = settings.value("allowJavaScriptGeometryChange", true).toBool(); - allowJsHideMenuBar = settings.value("allowJavaScriptHideMenuBar", true).toBool(); - allowJsHideStatusBar = settings.value("allowJavaScriptHideStatusBar", true).toBool(); - allowJsHideToolBar = settings.value("allowJavaScriptHideToolBar", true).toBool(); settings.endGroup(); settings.beginGroup("Browser-Tabs-Settings"); diff --git a/src/lib/other/qzsettings.h b/src/lib/other/qzsettings.h index 6d720d7ea..c435a6992 100644 --- a/src/lib/other/qzsettings.h +++ b/src/lib/other/qzsettings.h @@ -49,10 +49,6 @@ public: // Web-Browser-Settings int defaultZoomLevel; bool loadTabsOnActivation; - bool allowJsGeometryChange; - bool allowJsHideMenuBar; - bool allowJsHideStatusBar; - bool allowJsHideToolBar; QStringList autoOpenProtocols; QStringList blockedProtocols; diff --git a/src/lib/popupwindow/popupwindow.cpp b/src/lib/popupwindow/popupwindow.cpp index bc32cf79a..35e8ab4de 100644 --- a/src/lib/popupwindow/popupwindow.cpp +++ b/src/lib/popupwindow/popupwindow.cpp @@ -220,9 +220,8 @@ void PopupWindow::titleChanged() void PopupWindow::setWindowGeometry(QRect newRect) { - if (!qzSettings->allowJsGeometryChange) { + if (!Settings().value("allowJavaScriptGeometryChange", true).toBool()) return; - } // left/top was set while width/height not if (!newRect.topLeft().isNull() && newRect.size().isNull()) { @@ -243,20 +242,3 @@ void PopupWindow::setWindowGeometry(QRect newRect) } } } - -void PopupWindow::setStatusBarVisibility(bool visible) -{ - m_statusBar->setVisible(qzSettings->allowJsHideStatusBar ? visible : true); -} - -void PopupWindow::setMenuBarVisibility(bool visible) -{ - m_menuBar->setVisible(qzSettings->allowJsHideMenuBar ? visible : true); -} - -void PopupWindow::setToolBarVisibility(bool visible) -{ - // Does nothing now - // m_toolBar->setVisible(qzSettings->allowJsHideToolBar ? visible : true); - Q_UNUSED(visible) -} diff --git a/src/lib/popupwindow/popupwindow.h b/src/lib/popupwindow/popupwindow.h index a714d97a8..8df471e93 100644 --- a/src/lib/popupwindow/popupwindow.h +++ b/src/lib/popupwindow/popupwindow.h @@ -46,9 +46,6 @@ public: public slots: void setWindowGeometry(QRect newRect); - void setStatusBarVisibility(bool visible); - void setMenuBarVisibility(bool visible); - void setToolBarVisibility(bool visible); private slots: void titleChanged(); diff --git a/src/lib/preferences/jsoptions.cpp b/src/lib/preferences/jsoptions.cpp index c0ab5b8fe..f5cd925c6 100644 --- a/src/lib/preferences/jsoptions.cpp +++ b/src/lib/preferences/jsoptions.cpp @@ -21,9 +21,6 @@ #include "mainapplication.h" #include "settings.h" -#include // QTWEBKIT_VERSION_CHECK macro -#include - JsOptions::JsOptions(QWidget* parent) : QDialog(parent) , ui(new Ui::JsOptions) @@ -34,29 +31,18 @@ JsOptions::JsOptions(QWidget* parent) Settings settings; settings.beginGroup("Web-Browser-Settings"); - ui->jscanCloseWindow->setChecked(settings.value("allowJavaScriptCloseWindow", false).toBool()); ui->jscanOpenWindow->setChecked(settings.value("allowJavaScriptOpenWindow", false).toBool()); ui->jscanChangeSize->setChecked(settings.value("allowJavaScriptGeometryChange", true).toBool()); - ui->jscanHideMenu->setChecked(settings.value("allowJavaScriptHideMenuBar", true).toBool()); - ui->jscanHideStatus->setChecked(settings.value("allowJavaScriptHideStatusBar", true).toBool()); - ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool()); ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool()); settings.endGroup(); - -// Disable for now, as it does not do anything (yet) - ui->jscanHideTool->setHidden(true); } void JsOptions::accept() { Settings settings; settings.beginGroup("Web-Browser-Settings"); - settings.setValue("allowJavaScriptCloseWindow", ui->jscanCloseWindow->isChecked()); settings.setValue("allowJavaScriptOpenWindow", ui->jscanOpenWindow->isChecked()); settings.setValue("allowJavaScriptGeometryChange", ui->jscanChangeSize->isChecked()); - settings.setValue("allowJavaScriptHideMenuBar", ui->jscanHideMenu->isChecked()); - settings.setValue("allowJavaScriptHideStatusBar", ui->jscanHideStatus->isChecked()); - settings.setValue("allowJavaScriptHideToolBar", ui->jscanHideTool->isChecked()); settings.setValue("allowJavaScriptAccessClipboard", ui->jscanAccessClipboard->isChecked()); settings.endGroup(); diff --git a/src/lib/preferences/jsoptions.ui b/src/lib/preferences/jsoptions.ui index 1c826c302..2813a6f63 100644 --- a/src/lib/preferences/jsoptions.ui +++ b/src/lib/preferences/jsoptions.ui @@ -7,7 +7,7 @@ 0 0 214 - 261 + 193 @@ -23,26 +23,6 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Close windows - - - @@ -57,27 +37,6 @@ - - - - Hide menu bar - - - - - - - Hide status bar - - - - - - - Hide tool bar - - -