2021-01-04 21:06:38 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.popups 1.0
|
|
|
|
import shared.controls 1.0
|
2021-01-04 21:06:38 +00:00
|
|
|
|
2021-10-06 09:16:39 +00:00
|
|
|
// TODO: replace with StatusModal
|
2021-01-04 21:06:38 +00:00
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
|
2022-10-25 13:57:04 +00:00
|
|
|
property var accountSettings
|
|
|
|
|
2022-04-04 11:26:30 +00:00
|
|
|
title: qsTr("Search engine")
|
2021-01-04 21:06:38 +00:00
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
destroy()
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
2021-03-19 10:25:29 +00:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
spacing: 0
|
2021-01-04 21:06:38 +00:00
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: searchEnginGroup
|
|
|
|
}
|
|
|
|
|
2021-10-27 09:37:58 +00:00
|
|
|
RadioButtonSelector {
|
2022-04-04 11:26:30 +00:00
|
|
|
title: qsTr("None")
|
2021-03-19 10:25:29 +00:00
|
|
|
buttonGroup: searchEnginGroup
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineNone
|
2021-10-27 09:37:58 +00:00
|
|
|
onCheckedChanged: {
|
2021-01-04 21:06:38 +00:00
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineNone
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-27 09:37:58 +00:00
|
|
|
RadioButtonSelector {
|
|
|
|
title: "Google"
|
2021-03-19 10:25:29 +00:00
|
|
|
buttonGroup: searchEnginGroup
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineGoogle
|
2021-10-27 09:37:58 +00:00
|
|
|
onCheckedChanged: {
|
2021-01-04 21:06:38 +00:00
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineGoogle
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-27 09:37:58 +00:00
|
|
|
RadioButtonSelector {
|
|
|
|
title: "Yahoo!"
|
2021-03-19 10:25:29 +00:00
|
|
|
buttonGroup: searchEnginGroup
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineYahoo
|
2021-10-27 09:37:58 +00:00
|
|
|
onCheckedChanged: {
|
2021-01-04 21:06:38 +00:00
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineYahoo
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-27 09:37:58 +00:00
|
|
|
RadioButtonSelector {
|
|
|
|
title: "DuckDuckGo"
|
2021-03-19 10:25:29 +00:00
|
|
|
buttonGroup: searchEnginGroup
|
2022-10-25 13:57:04 +00:00
|
|
|
checked: accountSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
2021-10-27 09:37:58 +00:00
|
|
|
onCheckedChanged: {
|
2021-01-04 21:06:38 +00:00
|
|
|
if (checked) {
|
2022-10-25 13:57:04 +00:00
|
|
|
accountSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
2021-01-04 21:06:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|