mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
Small changes in JsOptionsDialog
This commit is contained in:
parent
993c4edc04
commit
151bba6293
|
@ -65,19 +65,25 @@ void PopupWebPage::slotGeometryChangeRequested(const QRect &rect)
|
||||||
|
|
||||||
void PopupWebPage::slotMenuBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotMenuBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
if (!qzSettings->allowJsHideMenuBar) return;
|
if (!qzSettings->allowJsHideMenuBar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_menuBarVisible = visible;
|
m_menuBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupWebPage::slotStatusBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotStatusBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
if (!qzSettings->allowJsHideStatusBar) return;
|
if (!qzSettings->allowJsHideStatusBar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_statusBarVisible = visible;
|
m_statusBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupWebPage::slotToolBarVisibilityChangeRequested(bool visible)
|
void PopupWebPage::slotToolBarVisibilityChangeRequested(bool visible)
|
||||||
{
|
{
|
||||||
if (!qzSettings->allowJsHideToolBar) return;
|
if (!qzSettings->allowJsHideToolBar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_toolBarVisible = visible;
|
m_toolBarVisible = visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,6 @@ JsOptions::JsOptions(QWidget* parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::JsOptions)
|
, ui(new Ui::JsOptions)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
Settings settings;
|
Settings settings;
|
||||||
|
@ -39,8 +38,6 @@ JsOptions::JsOptions(QWidget* parent)
|
||||||
ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool());
|
ui->jscanHideTool->setChecked(settings.value("allowJavaScriptHideToolBar", true).toBool());
|
||||||
ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool());
|
ui->jscanAccessClipboard->setChecked(settings.value("allowJavaScriptAccessClipboard", false).toBool());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
connect(ui->jsoptsbbox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JsOptions::accept()
|
void JsOptions::accept()
|
||||||
|
|
|
@ -31,15 +31,14 @@ class QT_QUPZILLA_EXPORT JsOptions : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public slots:
|
|
||||||
void accept();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit JsOptions(QWidget* parent = 0);
|
explicit JsOptions(QWidget* parent = 0);
|
||||||
~JsOptions();
|
~JsOptions();
|
||||||
|
|
||||||
private:
|
public slots:
|
||||||
|
void accept();
|
||||||
|
|
||||||
|
private:
|
||||||
Ui::JsOptions* ui;
|
Ui::JsOptions* ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -252,10 +252,6 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent)
|
||||||
ui->defaultZoom->setValue(settings.value("DefaultZoom", 100).toInt());
|
ui->defaultZoom->setValue(settings.value("DefaultZoom", 100).toInt());
|
||||||
ui->xssAuditing->setChecked(settings.value("XSSAuditing", false).toBool());
|
ui->xssAuditing->setChecked(settings.value("XSSAuditing", false).toBool());
|
||||||
|
|
||||||
if (!ui->allowJavaScript->isChecked()) {
|
|
||||||
ui->jsOptionsButton->setEnabled(false);
|
|
||||||
}
|
|
||||||
connect(ui->allowJavaScript, SIGNAL(toggled(bool)), this, SLOT(allowJavaScriptChanged(bool)));
|
|
||||||
//Cache
|
//Cache
|
||||||
ui->pagesInCache->setValue(settings.value("maximumCachedPages", 3).toInt());
|
ui->pagesInCache->setValue(settings.value("maximumCachedPages", 3).toInt());
|
||||||
connect(ui->pagesInCache, SIGNAL(valueChanged(int)), this, SLOT(pageCacheValueChanged(int)));
|
connect(ui->pagesInCache, SIGNAL(valueChanged(int)), this, SLOT(pageCacheValueChanged(int)));
|
||||||
|
@ -602,11 +598,6 @@ void Preferences::setManualProxyConfigurationEnabled(bool state)
|
||||||
ui->useHttpsProxy->setEnabled(state);
|
ui->useHttpsProxy->setEnabled(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::allowJavaScriptChanged(bool state)
|
|
||||||
{
|
|
||||||
ui->jsOptionsButton->setEnabled(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Preferences::saveHistoryChanged(bool stat)
|
void Preferences::saveHistoryChanged(bool stat)
|
||||||
{
|
{
|
||||||
ui->deleteHistoryOnClose->setEnabled(stat);
|
ui->deleteHistoryOnClose->setEnabled(stat);
|
||||||
|
@ -639,8 +630,8 @@ void Preferences::openSslManager()
|
||||||
|
|
||||||
void Preferences::openJsOptions()
|
void Preferences::openJsOptions()
|
||||||
{
|
{
|
||||||
JsOptions* m = new JsOptions(this);
|
JsOptions options(this);
|
||||||
m->show();
|
options.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::showAcceptLanguage()
|
void Preferences::showAcceptLanguage()
|
||||||
|
|
|
@ -63,7 +63,6 @@ private slots:
|
||||||
void openUserAgentManager();
|
void openUserAgentManager();
|
||||||
void openJsOptions();
|
void openJsOptions();
|
||||||
|
|
||||||
void allowJavaScriptChanged(bool state);
|
|
||||||
void saveHistoryChanged(bool state);
|
void saveHistoryChanged(bool state);
|
||||||
void saveCookiesChanged(bool state);
|
void saveCookiesChanged(bool state);
|
||||||
void allowHtml5storageChanged(bool state);
|
void allowHtml5storageChanged(bool state);
|
||||||
|
|
|
@ -39,7 +39,7 @@ RecoveryWidget::RecoveryWidget(WebView* view, QupZilla* mainClass)
|
||||||
const RestoreManager::WindowData &wd = data.at(i);
|
const RestoreManager::WindowData &wd = data.at(i);
|
||||||
|
|
||||||
QTreeWidgetItem* root = new QTreeWidgetItem(ui->treeWidget);
|
QTreeWidgetItem* root = new QTreeWidgetItem(ui->treeWidget);
|
||||||
root->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsEnabled|Qt::ItemIsTristate);
|
root->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsTristate);
|
||||||
root->setText(0, tr("Window %1").arg((i + 1)));
|
root->setText(0, tr("Window %1").arg((i + 1)));
|
||||||
root->setCheckState(0, Qt::Checked);
|
root->setCheckState(0, Qt::Checked);
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ RecoveryWidget::RecoveryWidget(WebView* view, QupZilla* mainClass)
|
||||||
const WebTab::SavedTab &st = wd.tabsState.at(tab);
|
const WebTab::SavedTab &st = wd.tabsState.at(tab);
|
||||||
|
|
||||||
QTreeWidgetItem* child = new QTreeWidgetItem(root);
|
QTreeWidgetItem* child = new QTreeWidgetItem(root);
|
||||||
child->setFlags(Qt::ItemIsUserCheckable|Qt::ItemIsEnabled);
|
child->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
|
||||||
child->setCheckState(0, Qt::Checked);
|
child->setCheckState(0, Qt::Checked);
|
||||||
child->setIcon(0, st.icon);
|
child->setIcon(0, st.icon);
|
||||||
child->setText(0, st.title);
|
child->setText(0, st.title);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user