1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

[Preferences] Add button to open Search Engines Manager

Closes #1205
This commit is contained in:
David Rosca 2014-07-08 19:17:42 +02:00
parent c4e0646915
commit 857b020e85
3 changed files with 107 additions and 51 deletions

View File

@ -49,6 +49,7 @@
#include "profilemanager.h"
#include "html5permissions/html5permissionsdialog.h"
#include "pac/pacmanager.h"
#include "searchenginesdialog.h"
#include <QSettings>
#include <QInputDialog>
@ -488,6 +489,7 @@ Preferences::Preferences(BrowserWindow* window, QWidget* parent)
connect(ui->deleteHtml5storage, SIGNAL(clicked()), this, SLOT(deleteHtml5storage()));
connect(ui->uaManager, SIGNAL(clicked()), this, SLOT(openUserAgentManager()));
connect(ui->jsOptionsButton, SIGNAL(clicked()), this, SLOT(openJsOptions()));
connect(ui->searchEngines, SIGNAL(clicked()), this, SLOT(openSearchEnginesManager()));
connect(ui->listWidget, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(showStackedPage(QListWidgetItem*)));
ui->listWidget->setItemSelected(ui->listWidget->itemAt(5, 5), true);
@ -706,6 +708,12 @@ void Preferences::openJsOptions()
options.exec();
}
void Preferences::openSearchEnginesManager()
{
SearchEnginesDialog* dialog = new SearchEnginesDialog(this);
dialog->exec();
}
void Preferences::showAcceptLanguage()
{
AcceptLanguage a(this);

View File

@ -63,6 +63,7 @@ private slots:
void chooseExternalDownloadManager();
void openUserAgentManager();
void openJsOptions();
void openSearchEnginesManager();
void saveHistoryChanged(bool state);
void allowHtml5storageChanged(bool state);

View File

@ -2573,61 +2573,37 @@
<widget class="QWidget" name="otherPage">
<layout class="QGridLayout" name="gridLayout_13">
<item row="9" column="0" colspan="4">
<widget class="QLabel" name="label_66">
<property name="text">
<string>&lt;b&gt;Manage search engines&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="11" column="0" colspan="4">
<widget class="QLabel" name="label_9">
<property name="text">
<string>&lt;b&gt;Other&lt;/b&gt;</string>
<string>&lt;b&gt;User Style Sheet&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="10" column="0" colspan="4">
<item row="12" column="0" colspan="4">
<widget class="QLabel" name="label_15">
<property name="text">
<string>StyleSheet automatically loaded with all websites: </string>
<string>Style Sheet automatically loaded with all websites: </string>
</property>
</widget>
</item>
<item row="11" column="1">
<item row="13" column="1">
<widget class="QLineEdit" name="userStyleSheet"/>
</item>
<item row="11" column="2">
<item row="13" column="2">
<widget class="MacToolButton" name="chooseUserStylesheet">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QPushButton" name="preferredLanguages">
<property name="text">
<string>Languages</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<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>
<item row="4" column="0" colspan="4">
<widget class="QLabel" name="label_36">
<property name="text">
<string>&lt;b&gt;Preferred language for web sites&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="12" column="0">
<item row="14" column="0">
<spacer name="verticalSpacer_15">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -2640,21 +2616,12 @@
</property>
</spacer>
</item>
<item row="5" column="0">
<spacer name="horizontalSpacer_24">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="4" column="0" colspan="4">
<widget class="QLabel" name="label_36">
<property name="text">
<string>&lt;b&gt;Preferred language for web sites&lt;/b&gt;</string>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</widget>
</item>
<item row="5" column="3">
<spacer name="horizontalSpacer_6">
@ -2716,6 +2683,86 @@
</item>
</layout>
</item>
<item row="5" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<spacer name="horizontalSpacer_24">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="preferredLanguages">
<property name="text">
<string>Languages</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<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>
<item row="10" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<spacer name="horizontalSpacer_31">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="searchEngines">
<property name="text">
<string>Search Engines Manager</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_32">
<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>
</widget>