From 857b020e85108eb61f3ccf64420d68911553e52f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Tue, 8 Jul 2014 19:17:42 +0200 Subject: [PATCH] [Preferences] Add button to open Search Engines Manager Closes #1205 --- src/lib/preferences/preferences.cpp | 8 ++ src/lib/preferences/preferences.h | 1 + src/lib/preferences/preferences.ui | 149 ++++++++++++++++++---------- 3 files changed, 107 insertions(+), 51 deletions(-) diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index e88c0aee9..b5b2ae1b9 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -49,6 +49,7 @@ #include "profilemanager.h" #include "html5permissions/html5permissionsdialog.h" #include "pac/pacmanager.h" +#include "searchenginesdialog.h" #include #include @@ -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); diff --git a/src/lib/preferences/preferences.h b/src/lib/preferences/preferences.h index 12fd916f7..25de22d85 100644 --- a/src/lib/preferences/preferences.h +++ b/src/lib/preferences/preferences.h @@ -63,6 +63,7 @@ private slots: void chooseExternalDownloadManager(); void openUserAgentManager(); void openJsOptions(); + void openSearchEnginesManager(); void saveHistoryChanged(bool state); void allowHtml5storageChanged(bool state); diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 90dfa5b63..8a5aa2b19 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -2573,61 +2573,37 @@ + + + <b>Manage search engines</b> + + + + - <b>Other</b> + <b>User Style Sheet</b> - + - StyleSheet automatically loaded with all websites: + Style Sheet automatically loaded with all websites: - + - + ... - - - - - - Languages - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - <b>Preferred language for web sites</b> - - - - + Qt::Vertical @@ -2640,21 +2616,12 @@ - - - - Qt::Horizontal + + + + <b>Preferred language for web sites</b> - - QSizePolicy::Fixed - - - - 20 - 20 - - - + @@ -2716,6 +2683,86 @@ + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Languages + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Search Engines Manager + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + +