rename to wow

pull/7/head
wowario 4 years ago
parent f20e8504e8
commit 9ff63aaea6
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -74,7 +74,7 @@ Popup {
font.bold: true
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 18
text: qsTr("New Monero version v%1 is available.").arg(updateDialog.version)
text: qsTr("New Wownero version v%1 is available.").arg(updateDialog.version)
}
Text {

@ -1,18 +1,18 @@
; Monero Nitrogen Nebula GUI Wallet Installer for Windows
; Wownero App Installer for Windows
; Copyright (c) 2017-2020, The Monero Project
; See LICENSE
#define GuiVersion GetFileVersion("bin\wownero-app.exe")
[Setup]
AppName=Monero GUI Wallet
AppName=Wownero GUI Wallet
; For InnoSetup this is the property that uniquely identifies the application as such
; Thus it's important to keep this stable over releases
; With a different "AppName" InnoSetup would treat a mere update as a completely new application and thus mess up
AppVersion={#GuiVersion}
VersionInfoVersion={#GuiVersion}
DefaultDirName={commonpf}\Monero GUI Wallet
DefaultGroupName=Monero GUI Wallet
DefaultDirName={commonpf}\Wownero App
DefaultGroupName=Wownero App
UninstallDisplayIcon={app}\wownero-app.exe
PrivilegesRequired=admin
ArchitecturesInstallIn64BitMode=x64
@ -21,8 +21,8 @@ WizardSmallImageFile=WizardSmallImage.bmp
WizardImageFile=WelcomeImage.bmp
DisableWelcomePage=no
LicenseFile=LICENSE
AppPublisher=The Monero Developer Community
AppPublisherURL=https://getmonero.org
AppPublisher=The Wownero Developer Community
AppPublisherURL=https://wownero.org
TimeStampsInUTC=yes
CompressionThreads=1
@ -32,7 +32,7 @@ UsedUserAreasWarning=no
; are used by the script. Regardless of the version of Windows, if the installation is administrative then you should
; be careful about making any per-user area changes: such changes may not achieve what you are intending.
; Background info:
; This installer indeed asks for admin rights so the Monero files can be copied to a place where they have at least
; This installer indeed asks for admin rights so the Wownero files can be copied to a place where they have at least
; a minimum of protection against changes, e.g. by malware, plus it handles things for the currently logged-in user
; in the registry (GUI wallet per-user options) and for some of the icons. For reasons too complicated to fully explain
; here this does not work as intended if the installing user does not have admin rights and has to provide the password
@ -66,41 +66,41 @@ Name: "en"; MessagesFile: "compiler:Default.isl"
; copied again, even if already present with correct file date and identical content.
;
; Note that it would be very dangerous to use "ignoreversion" on files that may be shared with other
; applications somehow. Luckily this is no issue here because ALL files are "private" to Monero.
; applications somehow. Luckily this is no issue here because ALL files are "private" to Wownero.
Source: {#file AddBackslash(SourcePath) + "ReadMe.htm"}; DestDir: "{app}"; DestName: "ReadMe.htm"; Flags: ignoreversion
Source: "FinishImage.bmp"; Flags: dontcopy
Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion
; Monero GUI wallet exe and guide
; wownero GUI wallet exe and guide
Source: "bin\wownero-app.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\monero-gui-wallet-guide.pdf"; DestDir: "{app}"; Flags: ignoreversion
; Monero CLI wallet
Source: "bin\extras\monero-wallet-cli.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-gen-trusted-multisig.exe"; DestDir: "{app}"; Flags: ignoreversion
; Monero wallet RPC interface implementation
Source: "bin\extras\monero-wallet-rpc.exe"; DestDir: "{app}"; Flags: ignoreversion
; Monero daemon
Source: "bin\monerod.exe"; DestDir: "{app}"; Flags: ignoreversion
; Monero daemon wrapped in a batch file that stops before the text window closes, to see any error messages
Source: "monero-daemon.bat"; DestDir: "{app}"; Flags: ignoreversion;
; Monero blockchain utilities
Source: "bin\extras\monero-blockchain-export.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-import.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-mark-spent-outputs.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-usage.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-import.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-ancestry.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-depth.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-prune-known-spent-data.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-prune.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-blockchain-stats.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\monero-gen-ssl-cert.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\wownero-gui-wallet-guide.pdf"; DestDir: "{app}"; Flags: ignoreversion
; wownero CLI wallet
Source: "bin\extras\wownero-wallet-cli.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-gen-trusted-multisig.exe"; DestDir: "{app}"; Flags: ignoreversion
; wownero wallet RPC interface implementation
Source: "bin\extras\wownero-wallet-rpc.exe"; DestDir: "{app}"; Flags: ignoreversion
; wownero daemon
Source: "bin\wownerod.exe"; DestDir: "{app}"; Flags: ignoreversion
; wownero daemon wrapped in a batch file that stops before the text window closes, to see any error messages
Source: "wownero-daemon.bat"; DestDir: "{app}"; Flags: ignoreversion;
; wownero blockchain utilities
Source: "bin\extras\wownero-blockchain-export.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-import.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-mark-spent-outputs.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-usage.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-import.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-ancestry.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-depth.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-prune-known-spent-data.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-prune.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-blockchain-stats.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "bin\extras\wownero-gen-ssl-cert.exe"; DestDir: "{app}"; Flags: ignoreversion
; Qt Quick 2D Renderer fallback for systems / environments with "low-level graphics" i.e. without 3D support
Source: "bin\start-low-graphics-mode.bat"; DestDir: "{app}"; Flags: ignoreversion
@ -201,9 +201,9 @@ begin
WizardForm.WizardBitmapImage2.Bitmap.LoadFromFile(ExpandConstant('{tmp}\FinishImage.bmp'));
// Additional wizard page for entering a special blockchain location
blockChainDefaultDir := ExpandConstant('{commonappdata}\bitmonero');
s := 'The default folder to store the Monero blockchain is ' + blockChainDefaultDir;
s := s + '. As this will need more than 90 GB of free space, you may want to use a folder on a different drive.';
blockChainDefaultDir := ExpandConstant('{commonappdata}\wownero');
s := 'The default folder to store the Wownero blockchain is ' + blockChainDefaultDir;
s := s + '. As this will need more than 2 GB of free space, you may not need to use a folder on a different drive.';
s := s + ' If yes, specify that folder here.';
BlockChainDirPage := CreateInputDirPage(wpSelectDir,
@ -214,7 +214,7 @@ begin
// Evaluate proposal for the blockchain location
// In case of an update take the blockchain location from the actual setting in the registry
RegQueryStringValue(HKEY_CURRENT_USER, 'Software\monero-project\monero-core', 'blockchainDataDir', blockChainDir);
RegQueryStringValue(HKEY_CURRENT_USER, 'Software\wownero-project\wownero-core', 'blockchainDataDir', blockChainDir);
if blockChainDir = '' then begin
blockChainDir := GetPreviousData('BlockChainDir', '');
end;
@ -268,7 +268,7 @@ end;
function DaemonLog(Param: String) : String;
// Full filename of the log of the daemon
begin
Result := BlockChainDir('') + '\bitmonero.log';
Result := BlockChainDir('') + '\wownero.log';
// No quotes for filename with blanks as this is never used as part of a command line
end;
@ -295,12 +295,12 @@ procedure CurStepChanged(CurStep: TSetupStep);
var s: TArrayOfString;
begin
if CurStep = ssPostInstall then begin
// Re-build "monero-daemon.bat" according to actual install and blockchain directory used
// Re-build "wownero-daemon.bat" according to actual install and blockchain directory used
SetArrayLength(s, 3);
s[0] := 'REM Execute the Monero daemon and then stay with window open after it exits';
s[0] := 'REM Execute the Wownero daemon and then stay with window open after it exits';
s[1] := '"' + ExpandConstant('{app}\monerod.exe') + '" ' + DaemonFlags('');
s[2] := 'PAUSE';
SaveStringsToFile(ExpandConstant('{app}\monero-daemon.bat'), s, false);
SaveStringsToFile(ExpandConstant('{app}\wownero-daemon.bat'), s, false);
end;
end;
@ -316,30 +316,30 @@ end;
[Icons]
; Icons in the "Monero GUI Wallet" program group
; Icons in the "wownero GUI Wallet" program group
; Windows will almost always display icons in alphabetical order, per level, so specify the text accordingly
Name: "{group}\GUI Wallet"; Filename: "{app}\wownero-app.exe";
Name: "{group}\GUI Wallet Guide"; Filename: "{app}\monero-gui-wallet-guide.pdf"; IconFilename: "{app}\wownero-app.exe"
Name: "{group}\GUI Wallet Guide"; Filename: "{app}\wownero-gui-wallet-guide.pdf"; IconFilename: "{app}\wownero-app.exe"
Name: "{group}\Uninstall GUI Wallet"; Filename: "{uninstallexe}"
; Sub-folder "Utilities";
; Note that Windows 10, unlike Windows 7, ignores such sub-folders completely
; and insists on displaying ALL icons on one single level
Name: "{group}\Utilities\Monero Daemon"; Filename: "{app}\monerod.exe"; Parameters: {code:DaemonFlags}
Name: "{group}\Utilities\wownero Daemon"; Filename: "{app}\monerod.exe"; Parameters: {code:DaemonFlags}
Name: "{group}\Utilities\Read Me"; Filename: "{app}\ReadMe.htm"
; CLI wallet: Needs a working directory ("Start in:") set in the icon, because with no such directory set
; it tries to create new wallets without a path given in the probably non-writable program folder and will abort with an error
Name: "{group}\Utilities\Textual (CLI) Wallet"; Filename: "{app}\monero-wallet-cli.exe"; WorkingDir: "{userdocs}\Monero\wallets"
Name: "{group}\Utilities\Textual (CLI) Wallet"; Filename: "{app}\wownero-wallet-cli.exe"; WorkingDir: "{userdocs}\wownero\wallets"
; Icons for troubleshooting problems / testing / debugging
; To show that they are in some way different (not for everyday use), make them visually different
; from the others by text, and make them sort at the end by the help of "x" in front
Name: "{group}\Utilities\x (Check Default Blockchain Folder)"; Filename: "{win}\Explorer.exe"; Parameters: {code:BlockChainDir}
Name: "{group}\Utilities\x (Check Daemon Log)"; Filename: "Notepad"; Parameters: {code:DaemonLog}
Name: "{group}\Utilities\x (Check Default Wallet Folder)"; Filename: "{win}\Explorer.exe"; Parameters: """{userdocs}\Monero\wallets"""
Name: "{group}\Utilities\x (Check Default Wallet Folder)"; Filename: "{win}\Explorer.exe"; Parameters: """{userdocs}\wownero\wallets"""
Name: "{group}\Utilities\x (Check GUI Wallet Log)"; Filename: "Notepad"; Parameters: """{userappdata}\wownero-app\wownero-app.log"""
Name: "{group}\Utilities\x (Try Daemon, Exit Confirm)"; Filename: "{app}\monero-daemon.bat"
Name: "{group}\Utilities\x (Try Daemon, Exit Confirm)"; Filename: "{app}\wownero-daemon.bat"
Name: "{group}\Utilities\x (Try GUI Wallet Low Graphics Mode)"; Filename: "{app}\start-low-graphics-mode.bat"
Name: "{group}\Utilities\x (Try Kill Daemon)"; Filename: "Taskkill.exe"; Parameters: "/IM monerod.exe /T /F"
@ -351,20 +351,20 @@ Name: "{commondesktop}\GUI Wallet"; Filename: "{app}\wownero-app.exe"; Tasks: de
; Store any special flags for the daemon in the registry location where the GUI wallet will take it from
; So if the wallet is used to start the daemon instead of the separate icon the wallet will pass the correct flags
; Side effect, mostly positive: The uninstaller will clean the registry
Root: HKCU; Subkey: "Software\monero-project"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\monero-project\monero-core"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\monero-project\monero-core"; ValueType: string; ValueName: "blockchainDataDir"; ValueData: {code:BlockChainDirOrEmpty};
Root: HKCU; Subkey: "Software\wownero-project"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\wownero-project\wownero-core"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\wownero-project\wownero-core"; ValueType: string; ValueName: "blockchainDataDir"; ValueData: {code:BlockChainDirOrEmpty};
; Configure a custom URI scheme: Links starting with "monero:" will start the GUI wallet exe with the URI as command-line parameter
; Used to easily start payments; example URI: "monero://<address>?tx_amount=5.0"
Root: HKCR; Subkey: "monero"; ValueType: "string"; ValueData: "URL:Monero Payment Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "monero"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "monero\DefaultIcon"; ValueType: "string"; ValueData: "{app}\wownero-app.exe,0"
Root: HKCR; Subkey: "monero\shell\open\command"; ValueType: "string"; ValueData: """{app}\wownero-app.exe"" ""%1"""
; Configure a custom URI scheme: Links starting with "wownero:" will start the GUI wallet exe with the URI as command-line parameter
; Used to easily start payments; example URI: "wownero://<address>?tx_amount=5.0"
Root: HKCR; Subkey: "wownero"; ValueType: "string"; ValueData: "URL:wownero Payment Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "wownero"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "wownero\DefaultIcon"; ValueType: "string"; ValueData: "{app}\wownero-app.exe,0"
Root: HKCR; Subkey: "wownero\shell\open\command"; ValueType: "string"; ValueData: """{app}\wownero-app.exe"" ""%1"""
; Configure a custom URI scheme: Links starting with "moneroseed:" will start the GUI wallet exe with the URI as command-line parameter
; Used to easily hand over custom seed node info to the wallet, with an URI of the form "moneroseed://a.b.c.d:port"
Root: HKCR; Subkey: "moneroseed"; ValueType: "string"; ValueData: "URL:Monero Seed Node Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "moneroseed"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "moneroseed\DefaultIcon"; ValueType: "string"; ValueData: "{app}\wownero-app.exe,0"
Root: HKCR; Subkey: "moneroseed\shell\open\command"; ValueType: "string"; ValueData: """{app}\wownero-app.exe"" ""%1"""
Root: HKCR; Subkey: "wowneroseed"; ValueType: "string"; ValueData: "URL:wownero Seed Node Protocol"; Flags: uninsdeletekey
Root: HKCR; Subkey: "wowneroseed"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
Root: HKCR; Subkey: "wowneroseed\DefaultIcon"; ValueType: "string"; ValueData: "{app}\wownero-app.exe,0"
Root: HKCR; Subkey: "wowneroseed\shell\open\command"; ValueType: "string"; ValueData: """{app}\wownero-app.exe"" ""%1"""

@ -1,3 +1,3 @@
REM Execute the Monero daemon and then stay with window open after it exits
"C:\Program Files\Monero Core\wownerod.exe"
"C:\Program Files\Wownero Core\wownerod.exe"
PAUSE

@ -1373,7 +1373,7 @@ ApplicationWindow {
property string blockchainDataDir: ""
property bool useRemoteNode: false
property string remoteNodeAddress: ""
property string bootstrapNodeAddress: "node.wowne.ro:34568"
property string bootstrapNodeAddress: "so.wow.candy.surf:34568"
property bool segregatePreForkOutputs: false
property bool keyReuseMitigation2: false
property int segregationHeight: 0
@ -1388,8 +1388,8 @@ ApplicationWindow {
property bool autosave: true
property int autosaveMinutes: 10
property bool fiatPriceEnabled: false
property bool fiatPriceToggle: false
property bool fiatPriceEnabled: true
property bool fiatPriceToggle: true
property string fiatPriceProvider: "coingecko"
property string fiatPriceCurrency: "wowusd"

@ -350,7 +350,7 @@ Rectangle {
if (!sendButton.enabled || estimatedFee == null) {
return ""
}
return "%1: ~%2 XMR".arg(qsTr("Fee")).arg(estimatedFee) +
return "%1: ~%2 WOW".arg(qsTr("Fee")).arg(estimatedFee) +
estimatedFeeFiat +
translationManager.emptyString;
}
@ -586,7 +586,7 @@ Rectangle {
console.log("Transfer: submit tx clicked")
submitTxDialog.open();
}
helpTextLarge.text: qsTr("Spend XMR from a cold (offline) wallet") + translationManager.emptyString
helpTextLarge.text: qsTr("Spend WOW from a cold (offline) wallet") + translationManager.emptyString
helpTextSmall.text: {
var errorMessage = "";
if (appWindow.viewOnly && !pageRoot.checkInformation(amountLine.text, addressLine.text, appWindow.persistentSettings.nettype)){
@ -693,7 +693,7 @@ Rectangle {
informationPopup.open();
} else {
informationPopup.title = qsTr("Information") + translationManager.emptyString
informationPopup.text = qsTr("Monero sent successfully") + translationManager.emptyString
informationPopup.text = qsTr("Wownero sent successfully") + translationManager.emptyString
informationPopup.icon = StandardIcon.Information
informationPopup.onCloseCallback = null
informationPopup.open();

@ -140,7 +140,7 @@ Rectangle {
MoneroComponents.SettingsListItem {
iconText: FontAwesome.cashRegister
isLast: true
description: qsTr("Receive Monero for your business, easily.") + translationManager.emptyString
description: qsTr("Receive Wownero for your business, easily.") + translationManager.emptyString
title: qsTr("Enter merchant mode") + translationManager.emptyString
onClicked: {

@ -118,7 +118,7 @@ target_include_directories(wownero-app PUBLIC
${ZBAR_INCLUDE_DIR}
)
target_compile_definitions(wowneor-wallet-gui
target_compile_definitions(wownero-app
PUBLIC
${Qt5Widgets_DEFINITIONS}
${Qt5Qml_DEFINITIONS}

@ -57,7 +57,7 @@ signals:
private:
QLocalServer *m_server;
QString m_queuedCmd;
QFileInfo m_socketFile = QFileInfo(QString(QDir::tempPath() + "/xmr-gui_%2.sock").arg(getAccountName()));
QFileInfo m_socketFile = QFileInfo(QString(QDir::tempPath() + "/wow-gui_%2.sock").arg(getAccountName()));
};
#endif // IPC_H

@ -83,7 +83,7 @@ QString getAccountName(){
if (accountName.isEmpty())
accountName = qgetenv("USERNAME"); // Windows
if (accountName.isEmpty())
accountName = "My wownero Account";
accountName = "My Wownero Account";
return accountName;
}
@ -101,7 +101,7 @@ QString xdgMime(QApplication &app){
"Type=Application\n"
"Icon=monero\n"
"Categories=Network;GNOME;Qt;\n"
"MimeType=x-scheme-handler/monero;x-scheme-handler/moneroseed\n"
"MimeType=x-scheme-handler/monero;x-scheme-handler/wowneroseed\n"
"StartupNotify=true\n"
"X-GNOME-Bugzilla-Bugzilla=GNOME\n"
"X-GNOME-UsesNotifications=true\n"

@ -116,7 +116,7 @@ ColumnLayout {
}
Text {
text: qsTr("Additionally, you may specify a bootstrap node to use Monero immediately.") + translationManager.emptyString
text: qsTr("Additionally, you may specify a bootstrap node to use Wownero immediately.") + translationManager.emptyString
Layout.topMargin: 4
Layout.fillWidth: true

@ -1,233 +0,0 @@
// Copyright (c) 2014-2019, The Monero Project
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.9
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.2
import QtQuick.XmlListModel 2.0
import QtQuick.Controls 2.0
import "../js/Wizard.js" as Wizard
import "../components" as MoneroComponents
import "../components/effects/" as MoneroEffects
Rectangle {
id: langScreen
color: "transparent"
anchors.fill: parent
property int layoutScale: {
if(appWindow.width < 800){
return 1;
} else {
return 2;
}
}
MoneroEffects.GradientBackground {
anchors.fill: parent
fallBackColor: MoneroComponents.Style.middlePanelBackgroundColor
initialStartColor: MoneroComponents.Style.wizardBackgroundGradientStart
initialStopColor: MoneroComponents.Style.middlePanelBackgroundGradientStop
blackColorStart: MoneroComponents.Style._b_wizardBackgroundGradientStart
blackColorStop: MoneroComponents.Style._b_middlePanelBackgroundGradientStop
whiteColorStart: MoneroComponents.Style._w_wizardBackgroundGradientStart
whiteColorStop: MoneroComponents.Style._w_middlePanelBackgroundGradientStop
start: Qt.point(0, 0)
end: Qt.point(height, width)
}
ColumnLayout {
anchors.top: parent.top
anchors.topMargin: persistentSettings.customDecorations ? 65 : 15
width: parent.width - 100
anchors.horizontalCenter: parent.horizontalCenter;
Text {
text: qsTr("Language settings") + translationManager.emptyString
Layout.fillWidth: true
font.family: MoneroComponents.Style.fontRegular.name
color: MoneroComponents.Style.defaultFontColor
font.pixelSize: {
if(langScreen.layoutScale === 2 ){
return 34;
} else {
return 28;
}
}
wrapMode: Text.WordWrap
leftPadding: 0
topPadding: 0
bottomPadding: 0
}
Text {
Layout.fillWidth: true
visible: parent.subtitle !== ""
color: MoneroComponents.Style.dimmedFontColor
text: qsTr("Change the language of the Wownero App.") + translationManager.emptyString
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: {
if(langScreen.layoutScale === 2 ){
return 16;
} else {
return 14;
}
}
wrapMode: Text.WordWrap
leftPadding: 0
topPadding: 0
}
Flow {
id: flow
height: 800
Layout.fillWidth: true
Layout.topMargin: 20
spacing: 5
Repeater {
model: langModel
delegate: Rectangle {
id: item
color: "transparent"
width: {
var minimumWidth = img.width + langRect.width;
if(minimumWidth < 200) return 200;
return minimumWidth;
}
height: 48
Rectangle {
id: img
anchors.top: parent.top
color: "transparent"
width: 32
height: parent.height
Image {
source: flag
mipmap: true
smooth: true
width: 32
height: 32
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
}
Rectangle {
id: langRect
anchors.top: parent.top
anchors.left: img.right
color: "transparent"
height: parent.height
width: langText.width + 22
MoneroComponents.TextPlain {
id: langText
font.bold: true
font.pixelSize: 14
color: MoneroComponents.Style.defaultFontColor
text: display_name
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: {
var locale_spl = locale.split("_");
// reload active translations
console.log(locale_spl[0]);
translationManager.setLanguage(locale_spl[0]);
// set wizard language settings
wizard.language_locale = locale;
wizard.language_wallet = wallet_language;
wizard.language_language = display_name;
appWindow.showStatusMessage(qsTr("Language changed."), 3);
appWindow.toggleLanguageView();
}
hoverEnabled: true
onEntered: {
parent.opacity = 0.75
}
onExited: {
parent.opacity = 1
}
}
}
}
}
RowLayout {
Layout.fillWidth: true
Layout.topMargin: 32
spacing: 20
MoneroComponents.StandardButton {
small: true
text: qsTr("Close") + translationManager.emptyString
onClicked: {
appWindow.toggleLanguageView();
}
}
}
XmlListModel {
id: langModel
source: "/lang/languages.xml"
query: "/languages/language"
XmlRole { name: "display_name"; query: "@display_name/string()" }
XmlRole { name: "locale"; query: "@locale/string()" }
XmlRole { name: "wallet_language"; query: "@wallet_language/string()" }
XmlRole { name: "flag"; query: "@flag/string()" }
// TODO: XmlListModel is read only, we should store current language somewhere else
// and set current language accordingly
XmlRole { name: "isCurrent"; query: "@enabled/string()" }
onStatusChanged: {
if(status === XmlListModel.Ready){
console.log("languages available: ",count);
}
}
}
}
}