From f1ab8ac5e9cf69056bf3a927f1d97843abd839e2 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 9 Oct 2015 16:11:40 +0200 Subject: [PATCH] Remove option to configure Click2Flash Click2Flash is no longer available --- src/lib/preferences/pluginslist.ui | 222 ++++++++----------------- src/lib/preferences/pluginsmanager.cpp | 55 ------ src/lib/preferences/pluginsmanager.h | 6 - 3 files changed, 67 insertions(+), 216 deletions(-) diff --git a/src/lib/preferences/pluginslist.ui b/src/lib/preferences/pluginslist.ui index 2e9648938..e24f50555 100644 --- a/src/lib/preferences/pluginslist.ui +++ b/src/lib/preferences/pluginslist.ui @@ -10,167 +10,79 @@ 462 - - + + + 0 + + + 0 + + + 0 + + 0 - - - 0 + + + Allow Application Extensions to be loaded - - - Application Extensions - - - - - - Allow Application Extensions to be loaded - - - - - - - - 0 - - - - - true - - - QAbstractItemView::ScrollPerPixel - - - true - - - true - - - - - - - - - false - - - - 0 - 0 - - - - Settings - - - - :/icons/preferences/preferences-desktop.png:/icons/preferences/preferences-desktop.png - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - - WebKit Plugins - - - - - - <b>Click To Flash Plugin</b> - - - - - - - Click To Flash is a plugin which blocks auto loading of Flash content at page. You can always load it manually by clicking on the Flash play icon. - - - true - - - - - - - - - true - - - - Whitelist - - - - - - - - Add - - - - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - Allow Click To Flash - - - - - + + + + true + + + QAbstractItemView::ScrollPerPixel + + + true + + + true + + + + + + + + + false + + + + 0 + 0 + + + + Settings + + + + :/icons/preferences/preferences-desktop.png:/icons/preferences/preferences-desktop.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + diff --git a/src/lib/preferences/pluginsmanager.cpp b/src/lib/preferences/pluginsmanager.cpp index 6133c4344..23ed9efa2 100644 --- a/src/lib/preferences/pluginsmanager.cpp +++ b/src/lib/preferences/pluginsmanager.cpp @@ -35,7 +35,6 @@ PluginsManager::PluginsManager(QWidget* parent) { ui->setupUi(this); ui->list->setLayoutDirection(Qt::LeftToRight); - ui->whitelist->setLayoutDirection(Qt::LeftToRight); //Application Extensions Settings settings; @@ -52,24 +51,6 @@ PluginsManager::PluginsManager(QWidget* parent) connect(ui->allowAppPlugins, SIGNAL(clicked(bool)), this, SLOT(allowAppPluginsChanged(bool))); ui->list->setItemDelegate(new PluginListDelegate(ui->list)); - - //WebKit Plugins - connect(ui->add, SIGNAL(clicked()), this, SLOT(addWhitelist())); - connect(ui->remove, SIGNAL(clicked()), this, SLOT(removeWhitelist())); - connect(ui->allowClick2Flash, SIGNAL(clicked(bool)), this, SLOT(allowC2FChanged(bool))); - - ui->whitelist->sortByColumn(-1); - - settings.beginGroup("ClickToFlash"); - QStringList whitelist = mApp->plugins()->c2f_getWhiteList(); - ui->allowClick2Flash->setChecked(settings.value("Enable", true).toBool()); - settings.endGroup(); - foreach (const QString &site, whitelist) { - QTreeWidgetItem* item = new QTreeWidgetItem(ui->whitelist); - item->setText(0, site); - } - - allowC2FChanged(ui->allowClick2Flash->isChecked()); } void PluginsManager::load() @@ -80,28 +61,6 @@ void PluginsManager::load() } } -void PluginsManager::addWhitelist() -{ - QString site = QInputDialog::getText(this, tr("Add site to whitelist"), tr("Server without http:// (ex. youtube.com)")); - if (site.isEmpty()) { - return; - } - - mApp->plugins()->c2f_addWhitelist(site); - ui->whitelist->insertTopLevelItem(0, new QTreeWidgetItem(QStringList(site))); -} - -void PluginsManager::removeWhitelist() -{ - QTreeWidgetItem* item = ui->whitelist->currentItem(); - if (!item) { - return; - } - - mApp->plugins()->c2f_removeWhitelist(item->text(0)); - delete item; -} - void PluginsManager::save() { if (!m_loaded) { @@ -147,20 +106,6 @@ void PluginsManager::allowAppPluginsChanged(bool state) refresh(); } -void PluginsManager::allowC2FChanged(bool state) -{ - Settings settings; - settings.beginGroup("ClickToFlash"); - settings.setValue("Enable", state); - settings.endGroup(); - - ui->whitelist->setEnabled(state); - ui->add->setEnabled(state); - ui->remove->setEnabled(state); - - mApp->plugins()->c2f_setEnabled(state); -} - void PluginsManager::refresh() { if (!ui->allowAppPlugins->isChecked()) { diff --git a/src/lib/preferences/pluginsmanager.h b/src/lib/preferences/pluginsmanager.h index 1395b16e1..521a78741 100644 --- a/src/lib/preferences/pluginsmanager.h +++ b/src/lib/preferences/pluginsmanager.h @@ -41,7 +41,6 @@ public: void save(); private slots: - //App extension void settingsClicked(); void currentChanged(QListWidgetItem* item); void itemChanged(QListWidgetItem* item); @@ -49,11 +48,6 @@ private slots: void refresh(); - //WebKit plugins - void addWhitelist(); - void removeWhitelist(); - void allowC2FChanged(bool state); - private: void sortItems();