2021-01-04 21:06:38 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import "../../../../../imports"
|
|
|
|
import "../../../../../shared"
|
|
|
|
import "../../../../../shared/status"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Search engine"
|
|
|
|
title: qsTrId("search-engine")
|
2021-01-04 21:06:38 +00:00
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
destroy()
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
spacing: Style.current.bigPadding
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: searchEnginGroup
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "None"
|
|
|
|
text: qsTrId("none")
|
2021-01-04 21:06:38 +00:00
|
|
|
ButtonGroup.group: searchEnginGroup
|
2021-03-16 16:24:35 +00:00
|
|
|
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineNone
|
2021-01-04 21:06:38 +00:00
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2021-03-16 16:24:35 +00:00
|
|
|
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineNone
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
text: "Google"
|
|
|
|
ButtonGroup.group: searchEnginGroup
|
2021-03-16 16:24:35 +00:00
|
|
|
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineGoogle
|
2021-01-04 21:06:38 +00:00
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2021-03-16 16:24:35 +00:00
|
|
|
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineGoogle
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
text: "Yahoo!"
|
|
|
|
ButtonGroup.group: searchEnginGroup
|
2021-03-16 16:24:35 +00:00
|
|
|
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineYahoo
|
2021-01-04 21:06:38 +00:00
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2021-03-16 16:24:35 +00:00
|
|
|
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineYahoo
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusRadioButton {
|
|
|
|
text: "DuckDuckGo"
|
|
|
|
ButtonGroup.group: searchEnginGroup
|
2021-03-16 16:24:35 +00:00
|
|
|
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
2021-01-04 21:06:38 +00:00
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
2021-03-16 16:24:35 +00:00
|
|
|
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|