mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Remove option to configure Click2Flash
Click2Flash is no longer available
This commit is contained in:
parent
b39809bfae
commit
f1ab8ac5e9
@ -10,167 +10,79 @@
|
|||||||
<height>462</height>
|
<height>462</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QCheckBox" name="allowAppPlugins">
|
||||||
<property name="currentIndex">
|
<property name="text">
|
||||||
<number>0</number>
|
<string>Allow Application Extensions to be loaded</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Application Extensions</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="allowAppPlugins">
|
|
||||||
<property name="text">
|
|
||||||
<string>Allow Application Extensions to be loaded</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="verticalFrame">
|
|
||||||
<layout class="QVBoxLayout" name="appExtensionFrame">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QListWidget" name="list">
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="uniformItemSizes">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="butSettings">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Settings</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../data/icons.qrc">
|
|
||||||
<normaloff>:/icons/preferences/preferences-desktop.png</normaloff>:/icons/preferences/preferences-desktop.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_2">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>WebKit Plugins</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string><b>Click To Flash Plugin</b></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>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.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="2">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0" rowspan="3">
|
|
||||||
<widget class="QTreeWidget" name="whitelist">
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Whitelist</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="add">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="remove">
|
|
||||||
<property name="text">
|
|
||||||
<string>Remove</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="allowClick2Flash">
|
|
||||||
<property name="text">
|
|
||||||
<string>Allow Click To Flash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QListWidget" name="list">
|
||||||
|
<property name="alternatingRowColors">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="verticalScrollMode">
|
||||||
|
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="uniformItemSizes">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="butSettings">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Settings</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../data/icons.qrc">
|
||||||
|
<normaloff>:/icons/preferences/preferences-desktop.png</normaloff>:/icons/preferences/preferences-desktop.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
@ -35,7 +35,6 @@ PluginsManager::PluginsManager(QWidget* parent)
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->list->setLayoutDirection(Qt::LeftToRight);
|
ui->list->setLayoutDirection(Qt::LeftToRight);
|
||||||
ui->whitelist->setLayoutDirection(Qt::LeftToRight);
|
|
||||||
|
|
||||||
//Application Extensions
|
//Application Extensions
|
||||||
Settings settings;
|
Settings settings;
|
||||||
@ -52,24 +51,6 @@ PluginsManager::PluginsManager(QWidget* parent)
|
|||||||
connect(ui->allowAppPlugins, SIGNAL(clicked(bool)), this, SLOT(allowAppPluginsChanged(bool)));
|
connect(ui->allowAppPlugins, SIGNAL(clicked(bool)), this, SLOT(allowAppPluginsChanged(bool)));
|
||||||
|
|
||||||
ui->list->setItemDelegate(new PluginListDelegate(ui->list));
|
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()
|
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()
|
void PluginsManager::save()
|
||||||
{
|
{
|
||||||
if (!m_loaded) {
|
if (!m_loaded) {
|
||||||
@ -147,20 +106,6 @@ void PluginsManager::allowAppPluginsChanged(bool state)
|
|||||||
refresh();
|
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()
|
void PluginsManager::refresh()
|
||||||
{
|
{
|
||||||
if (!ui->allowAppPlugins->isChecked()) {
|
if (!ui->allowAppPlugins->isChecked()) {
|
||||||
|
@ -41,7 +41,6 @@ public:
|
|||||||
void save();
|
void save();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
//App extension
|
|
||||||
void settingsClicked();
|
void settingsClicked();
|
||||||
void currentChanged(QListWidgetItem* item);
|
void currentChanged(QListWidgetItem* item);
|
||||||
void itemChanged(QListWidgetItem* item);
|
void itemChanged(QListWidgetItem* item);
|
||||||
@ -49,11 +48,6 @@ private slots:
|
|||||||
|
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
||||||
//WebKit plugins
|
|
||||||
void addWhitelist();
|
|
||||||
void removeWhitelist();
|
|
||||||
void allowC2FChanged(bool state);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sortItems();
|
void sortItems();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user