diff --git a/ui/app/AppLayouts/Browser/BrowserHeader.qml b/ui/app/AppLayouts/Browser/BrowserHeader.qml index b79f9f2e19..38d67f35c4 100644 --- a/ui/app/AppLayouts/Browser/BrowserHeader.qml +++ b/ui/app/AppLayouts/Browser/BrowserHeader.qml @@ -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; diff --git a/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml b/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml index ac2b1fe6a9..7cc153682d 100644 --- a/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/BrowserContainer.qml @@ -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" diff --git a/ui/app/AppLayouts/Profile/Sections/BrowserModals/EthereumExplorerModal.qml b/ui/app/AppLayouts/Profile/Sections/BrowserModals/EthereumExplorerModal.qml index 20edd24da4..dd15321a28 100644 --- a/ui/app/AppLayouts/Profile/Sections/BrowserModals/EthereumExplorerModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/BrowserModals/EthereumExplorerModal.qml @@ -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 } } } diff --git a/ui/app/AppLayouts/Profile/Sections/BrowserModals/SearchEngineModal.qml b/ui/app/AppLayouts/Profile/Sections/BrowserModals/SearchEngineModal.qml index a659aab893..86bdcfc135 100644 --- a/ui/app/AppLayouts/Profile/Sections/BrowserModals/SearchEngineModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/BrowserModals/SearchEngineModal.qml @@ -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 } } } diff --git a/ui/app/AppMain.qml b/ui/app/AppMain.qml index 4ab810d9d9..bf3cc765a5 100644 --- a/ui/app/AppMain.qml +++ b/ui/app/AppMain.qml @@ -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