update default settings
This commit is contained in:
parent
9c404a1047
commit
9621230e6d
|
@ -107,8 +107,8 @@ Rectangle {
|
|||
Keys.onPressed: {
|
||||
// TODO: disable browsing local files? file://
|
||||
if (event.key === Qt.Key_Enter || event.key === Qt.Key_Return) {
|
||||
if (appSettings.browserEthereumExplorer !== Constants.browserEthereumExplorerNone && text.startsWith("0x")) {
|
||||
switch (appSettings.browserEthereumExplorer) {
|
||||
if (appSettings.useBrowserEthereumExplorer !== Constants.browserEthereumExplorerNone && text.startsWith("0x")) {
|
||||
switch (appSettings.useBrowserEthereumExplorer) {
|
||||
case Constants.browserEthereumExplorerEtherscan:
|
||||
if (text.length > 42) {
|
||||
currentWebView.url = "https://etherscan.io/tx/" + text; break;
|
||||
|
@ -130,8 +130,8 @@ Rectangle {
|
|||
}
|
||||
return
|
||||
}
|
||||
if (appSettings.browserSearchEngine !== Constants.browserSearchEngineNone && !Utils.isURL(text)) {
|
||||
switch (appSettings.browserSearchEngine) {
|
||||
if (appSettings.shouldShowBrowserSearchEngine !== Constants.browserSearchEngineNone && !Utils.isURL(text)) {
|
||||
switch (appSettings.shouldShowBrowserSearchEngine) {
|
||||
case Constants.browserSearchEngineGoogle: currentWebView.url = "https://www.google.com/search?q=" + text; break;
|
||||
case Constants.browserSearchEngineYahoo: currentWebView.url = "https://search.yahoo.com/search?p=" + text; break;
|
||||
case Constants.browserSearchEngineDuckDuckGo: currentWebView.url = "https://duckduckgo.com/?q=" + text; break;
|
||||
|
|
|
@ -59,7 +59,7 @@ Item {
|
|||
//% "Search engine used in the address bar"
|
||||
text: qsTrId("search-engine-used-in-the-address-bar")
|
||||
currentValue: {
|
||||
switch (appSettings.browserSearchEngine) {
|
||||
switch (appSettings.shouldShowBrowserSearchEngine) {
|
||||
case Constants.browserSearchEngineGoogle: return "Google"
|
||||
case Constants.browserSearchEngineYahoo: return "Yahoo!"
|
||||
case Constants.browserSearchEngineDuckDuckGo: return "DuckDuckGo"
|
||||
|
@ -76,7 +76,7 @@ Item {
|
|||
//% "Ethereum explorer used in the address bar"
|
||||
text: qsTrId("ethereum-explorer-used-in-the-address-bar")
|
||||
currentValue: {
|
||||
switch (appSettings.browserEthereumExplorer) {
|
||||
switch (appSettings.useBrowserEthereumExplorer) {
|
||||
case Constants.browserEthereumExplorerEtherscan: return "etherscan.io"
|
||||
case Constants.browserEthereumExplorerEthplorer: return "ethplorer.io"
|
||||
case Constants.browserEthereumExplorerBlockchair: return "blockchair.com"
|
||||
|
|
|
@ -26,10 +26,10 @@ ModalPopup {
|
|||
//% "None"
|
||||
text: qsTrId("none")
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserEthereumExplorer === Constants.browserEthereumExplorerNone
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerNone
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserEthereumExplorer = Constants.browserEthereumExplorerNone
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerNone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "etherscan.io"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserEthereumExplorer === Constants.browserEthereumExplorerEtherscan
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEtherscan
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserEthereumExplorer = Constants.browserEthereumExplorerEtherscan
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEtherscan
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "ethplorer.io"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserEthereumExplorer === Constants.browserEthereumExplorerEthplorer
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerEthplorer
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserEthereumExplorer = Constants.browserEthereumExplorerEthplorer
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerEthplorer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,10 +59,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "blockchair.com"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserEthereumExplorer === Constants.browserEthereumExplorerBlockchair
|
||||
checked: appSettings.useBrowserEthereumExplorer === Constants.browserEthereumExplorerBlockchair
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserEthereumExplorer = Constants.browserEthereumExplorerBlockchair
|
||||
appSettings.useBrowserEthereumExplorer = Constants.browserEthereumExplorerBlockchair
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,10 +26,10 @@ ModalPopup {
|
|||
//% "None"
|
||||
text: qsTrId("none")
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineNone
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineNone
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserSearchEngine = Constants.browserSearchEngineNone
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineNone
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "Google"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineGoogle
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineGoogle
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserSearchEngine = Constants.browserSearchEngineGoogle
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineGoogle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "Yahoo!"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineYahoo
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineYahoo
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserSearchEngine = Constants.browserSearchEngineYahoo
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineYahoo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,10 +59,10 @@ ModalPopup {
|
|||
StatusRadioButton {
|
||||
text: "DuckDuckGo"
|
||||
ButtonGroup.group: searchEnginGroup
|
||||
checked: appSettings.browserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
||||
checked: appSettings.shouldShowBrowserSearchEngine === Constants.browserSearchEngineDuckDuckGo
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
appSettings.browserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
||||
appSettings.shouldShowBrowserSearchEngine = Constants.browserSearchEngineDuckDuckGo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,8 +112,8 @@ RowLayout {
|
|||
property bool openLinksInStatus: true
|
||||
property bool shouldShowFavoritesBar: true
|
||||
property string browserHomepage: ""
|
||||
property int browserSearchEngine: Constants.browserSearchEngineNone
|
||||
property int browserEthereumExplorer: Constants.browserEthereumExplorerNone
|
||||
property int shouldShowBrowserSearchEngine: Constants.browserSearchEngineDuckDuckGo
|
||||
property int useBrowserEthereumExplorer: Constants.browserEthereumExplorerEtherscan
|
||||
property bool autoLoadImages: true
|
||||
property bool javaScriptEnabled: true
|
||||
property bool errorPageEnabled: true
|
||||
|
|
Loading…
Reference in New Issue