mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 22:07:26 -04:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e6a2cde0f | ||
|
|
c34d4ee97c | ||
|
|
0194cf8f22 | ||
|
|
ad06fcc79e | ||
|
|
7d4b82c691 | ||
|
|
69f989d617 | ||
|
|
0f3df860e3 | ||
|
|
3f0bbfb6aa | ||
|
|
ba4d6993b7 | ||
|
|
772b828b67 | ||
|
|
78f5360af2 | ||
|
|
a1fdffcabe | ||
|
|
fed00a5662 | ||
|
|
79f2843b09 | ||
|
|
14a477748e | ||
|
|
cebb78979c | ||
|
|
df771470c2 | ||
|
|
e359c60f00 | ||
|
|
53335a8487 | ||
|
|
3f64312283 | ||
|
|
897946af13 | ||
|
|
e90626e05a | ||
|
|
90e9968dcb | ||
|
|
841d0e01dc | ||
|
|
2feee9e956 | ||
|
|
486ba05526 | ||
|
|
ae8394e5f8 | ||
|
|
fa79e609e1 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: continuous-integration/gh-actions/gui
|
||||
name: ci/gh-actions/gui
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.10
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: docker-linux-static-{hash}
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
- uses: satackey/action-docker-layer-caching@v0.0.10
|
||||
continue-on-error: true
|
||||
with:
|
||||
key: docker-windows-static-{hash}
|
||||
|
||||
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "17")
|
||||
set(VERSION_MINOR "1")
|
||||
set(VERSION_REVISION "6")
|
||||
set(VERSION_REVISION "8")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
|
||||
@@ -30,30 +30,26 @@ import QtQuick 2.9
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import FontAwesome 1.0
|
||||
|
||||
import "." as MoneroComponents
|
||||
import "./effects/" as MoneroEffects
|
||||
|
||||
Item {
|
||||
id: inlineButton
|
||||
height: parent.height
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
property bool small: false
|
||||
property string shadowPressedColor: "#B32D00"
|
||||
property string shadowReleasedColor: "#FF4304"
|
||||
property string pressedColor: "#FF4304"
|
||||
property string releasedColor: "#FF6C3C"
|
||||
property string icon: ""
|
||||
property string textColor: MoneroComponents.Style.inlineButtonTextColor
|
||||
property int fontSize: small ? 14 : 16
|
||||
property int rectHeight: small ? 24 : 24
|
||||
property int rectHMargin: small ? 16 : 22
|
||||
property alias text: inlineText.text
|
||||
property alias fontPixelSize: inlineText.font.pixelSize
|
||||
property alias fontFamily: inlineText.font.family
|
||||
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
||||
property alias buttonColor: rect.color
|
||||
property alias buttonHeight: rect.height
|
||||
|
||||
Layout.rightMargin: isFontAwesomeIcon ? 0 : 4
|
||||
height: isFontAwesomeIcon ? 30 : 24
|
||||
width: isFontAwesomeIcon ? height : inlineText.width + 16
|
||||
|
||||
signal clicked()
|
||||
|
||||
function doClick() {
|
||||
@@ -64,20 +60,16 @@ Item {
|
||||
|
||||
Rectangle{
|
||||
id: rect
|
||||
anchors.fill: parent
|
||||
color: MoneroComponents.Style.buttonInlineBackgroundColor
|
||||
height: 24
|
||||
width: inlineText.text ? (inlineText.width + 16) : inlineButton.icon ? (inlineImage.width + 16) : rect.height
|
||||
radius: 4
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
id: inlineText
|
||||
font.family: MoneroComponents.Style.fontBold.name
|
||||
font.bold: true
|
||||
font.pixelSize: inlineButton.fontSize
|
||||
font.pixelSize: inlineButton.isFontAwesomeIcon ? 22 : inlineButton.small ? 14 : 16
|
||||
color: inlineButton.textColor
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
@@ -90,13 +82,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: inlineImage
|
||||
visible: inlineButton.icon !== ""
|
||||
anchors.centerIn: parent
|
||||
source: inlineButton.icon
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: buttonArea
|
||||
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
|
||||
@@ -29,11 +29,15 @@
|
||||
import FontAwesome 1.0
|
||||
import QtQuick 2.9
|
||||
import QtGraphicalEffects 1.0
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import "../components" as MoneroComponents
|
||||
|
||||
Item {
|
||||
id: item
|
||||
|
||||
default property alias content: inlineButtons.children
|
||||
|
||||
property alias input: input
|
||||
property alias text: input.text
|
||||
|
||||
@@ -53,8 +57,6 @@ Item {
|
||||
property alias validator: input.validator
|
||||
property alias readOnly : input.readOnly
|
||||
property alias cursorPosition: input.cursorPosition
|
||||
property alias inlineButton: inlineButtonId
|
||||
property alias inlineButtonText: inlineButtonId.text
|
||||
property alias inlineIcon: inlineIcon.visible
|
||||
property bool copyButton: false
|
||||
property alias copyButtonText: copyButtonId.text
|
||||
@@ -239,6 +241,7 @@ Item {
|
||||
onEditingFinished: item.editingFinished()
|
||||
onAccepted: item.accepted();
|
||||
onTextChanged: item.textUpdated()
|
||||
rightPadding: inlineButtons.width + 14
|
||||
topPadding: 10
|
||||
bottomPadding: 10
|
||||
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
||||
@@ -262,13 +265,15 @@ Item {
|
||||
onClicked: passwordToggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
id: inlineButtonId
|
||||
visible: item.inlineButtonText ? true : false
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
RowLayout {
|
||||
id: inlineButtons
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.margins: 4
|
||||
spacing: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,13 +36,15 @@ ColumnLayout {
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
default property alias content: inlineButtons.children
|
||||
|
||||
property alias text: input.text
|
||||
property alias labelText: inputLabel.text
|
||||
property alias labelButtonText: labelButton.text
|
||||
property alias placeholderText: placeholderLabel.text
|
||||
|
||||
property int inputPaddingLeft: 10
|
||||
property int inputPaddingRight: 10
|
||||
property alias inputPaddingRight: input.rightPadding
|
||||
property int inputPaddingTop: 10
|
||||
property int inputPaddingBottom: 10
|
||||
property int inputRadius: 4
|
||||
@@ -85,11 +87,6 @@ ColumnLayout {
|
||||
property alias addressValidation: input.addressValidation
|
||||
property string backgroundColor: "" // mock
|
||||
|
||||
property alias inlineButton: inlineButtonId
|
||||
property bool inlineButtonVisible: false
|
||||
property alias inlineButton2: inlineButton2Id
|
||||
property bool inlineButton2Visible: false
|
||||
|
||||
signal labelButtonClicked();
|
||||
signal inputLabelLinkActivated();
|
||||
signal editingFinished();
|
||||
@@ -166,7 +163,7 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
leftPadding: item.inputPaddingLeft
|
||||
rightPadding: item.inputPaddingRight
|
||||
rightPadding: inlineButtons.width + 14
|
||||
topPadding: item.inputPaddingTop
|
||||
bottomPadding: item.inputPaddingBottom
|
||||
|
||||
@@ -202,18 +199,12 @@ ColumnLayout {
|
||||
visible: !item.borderDisabled
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
id: inlineButtonId
|
||||
visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false
|
||||
RowLayout {
|
||||
id: inlineButtons
|
||||
anchors.top: parent.top
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
id: inlineButton2Id
|
||||
visible: (inlineButton2Id.text || inlineButton2Id.icon) && inlineButton2Visible ? true : false
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: inlineButtonVisible ? 48 : 8
|
||||
anchors.margins: 4
|
||||
spacing: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,5 +113,5 @@ function capitalize(s){
|
||||
}
|
||||
|
||||
function removeTrailingZeros(value) {
|
||||
return (value + '').replace(/(\.\d*[1-9])0+$/, '$1');
|
||||
return (value + '').replace(/\.?0*$/, '');
|
||||
}
|
||||
|
||||
19
main.qml
19
main.qml
@@ -952,10 +952,12 @@ ApplicationWindow {
|
||||
// Store to file
|
||||
transaction.setFilename(path);
|
||||
}
|
||||
appWindow.showProcessingSplash(qsTr("Sending transaction ..."));
|
||||
currentWallet.commitTransactionAsync(transaction);
|
||||
}
|
||||
|
||||
function onTransactionCommitted(success, transaction, txid) {
|
||||
hideProcessingSplash();
|
||||
if (!success) {
|
||||
console.log("Error committing transaction: " + transaction.errorString);
|
||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
||||
@@ -1335,7 +1337,21 @@ ApplicationWindow {
|
||||
|
||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
||||
persistentSettings.askDesktopShortcut = false;
|
||||
oshelper.createDesktopEntry();
|
||||
|
||||
if (isTails) {
|
||||
oshelper.createDesktopEntry();
|
||||
} else if (isLinux) {
|
||||
confirmationDialog.title = qsTr("Desktop entry") + translationManager.emptyString;
|
||||
confirmationDialog.text = qsTr("Would you like to register Monero GUI Desktop entry?") + translationManager.emptyString;
|
||||
confirmationDialog.icon = StandardIcon.Question;
|
||||
confirmationDialog.cancelText = qsTr("No") + translationManager.emptyString;
|
||||
confirmationDialog.okText = qsTr("Yes") + translationManager.emptyString;
|
||||
confirmationDialog.onAcceptedCallback = function() {
|
||||
oshelper.createDesktopEntry();
|
||||
};
|
||||
confirmationDialog.onRejectedCallback = null;
|
||||
confirmationDialog.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1347,6 +1363,7 @@ ApplicationWindow {
|
||||
return "";
|
||||
}
|
||||
|
||||
property bool askDesktopShortcut: isLinux
|
||||
property string language: 'English (US)'
|
||||
property string language_wallet: 'English'
|
||||
property string locale: 'en_US'
|
||||
|
||||
2
monero
2
monero
Submodule monero updated: f7aa91f70d...36dfd41e01
@@ -314,16 +314,16 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
inlineButton.text: FontAwesome.qrcode
|
||||
inlineButton.fontPixelSize: 22
|
||||
inlineButton.fontFamily: FontAwesome.fontFamily
|
||||
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
|
||||
inlineButton.buttonColor: MoneroComponents.Style.orange
|
||||
inlineButton.onClicked: {
|
||||
cameraUi.state = "Capture"
|
||||
cameraUi.qrcode_decoded.connect(root.updateFromQrCode)
|
||||
MoneroComponents.InlineButton {
|
||||
buttonColor: MoneroComponents.Style.orange
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
text: FontAwesome.qrcode
|
||||
visible : appWindow.qrScannerEnabled && !addressLine.text
|
||||
onClicked: {
|
||||
cameraUi.state = "Capture"
|
||||
cameraUi.qrcode_decoded.connect(root.updateFromQrCode)
|
||||
}
|
||||
}
|
||||
inlineButtonVisible : appWindow.qrScannerEnabled && !addressLine.text
|
||||
}
|
||||
|
||||
MoneroComponents.StandardButton {
|
||||
|
||||
@@ -98,7 +98,7 @@ Rectangle {
|
||||
addressLine.text = address
|
||||
setPaymentId(payment_id);
|
||||
amountLine.text = amount
|
||||
setDescription(recipient_name + " " + tx_description);
|
||||
setDescription((recipient_name ? recipient_name + " " : "") + tx_description);
|
||||
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
||||
}
|
||||
|
||||
@@ -172,7 +172,6 @@ Rectangle {
|
||||
id: addressLine
|
||||
KeyNavigation.tab: amountLine
|
||||
spacing: 0
|
||||
inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60
|
||||
fontBold: true
|
||||
labelText: qsTr("Address") + translationManager.emptyString
|
||||
labelButtonText: qsTr("Resolve") + translationManager.emptyString
|
||||
@@ -196,27 +195,25 @@ Rectangle {
|
||||
setDescription(parsed.tx_description);
|
||||
}
|
||||
}
|
||||
inlineButton.text: FontAwesome.addressBook
|
||||
inlineButton.buttonHeight: 30
|
||||
inlineButton.fontPixelSize: 22
|
||||
inlineButton.fontFamily: FontAwesome.fontFamily
|
||||
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
|
||||
inlineButton.onClicked: {
|
||||
middlePanel.addressBookView.selectAndSend = true;
|
||||
appWindow.showPageRequest("AddressBook");
|
||||
}
|
||||
inlineButtonVisible: true
|
||||
|
||||
inlineButton2.text: FontAwesome.qrcode
|
||||
inlineButton2.buttonHeight: 30
|
||||
inlineButton2.fontPixelSize: 22
|
||||
inlineButton2.fontFamily: FontAwesome.fontFamily
|
||||
inlineButton2.textColor: MoneroComponents.Style.defaultFontColor
|
||||
inlineButton2.onClicked: {
|
||||
cameraUi.state = "Capture"
|
||||
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
||||
}
|
||||
inlineButton2Visible: appWindow.qrScannerEnabled
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
text: FontAwesome.addressBook
|
||||
onClicked: {
|
||||
middlePanel.addressBookView.selectAndSend = true;
|
||||
appWindow.showPageRequest("AddressBook");
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
fontFamily: FontAwesome.fontFamily
|
||||
text: FontAwesome.qrcode
|
||||
visible: appWindow.qrScannerEnabled
|
||||
onClicked: {
|
||||
cameraUi.state = "Capture"
|
||||
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,10 +292,8 @@ Rectangle {
|
||||
placeholderText: "0.00"
|
||||
width: 100
|
||||
fontBold: true
|
||||
inlineButtonText: qsTr("All") + translationManager.emptyString
|
||||
inlineButton.onClicked: amountLine.text = "(all)"
|
||||
onTextChanged: {
|
||||
amountLine.text = amountLine.text.replace(",", ".");
|
||||
amountLine.text = amountLine.text.trim().replace(",", ".");
|
||||
const match = amountLine.text.match(/^0+(\d.*)/);
|
||||
if (match) {
|
||||
const cursorPosition = amountLine.cursorPosition;
|
||||
@@ -312,10 +307,14 @@ Rectangle {
|
||||
}
|
||||
amountLine.error = walletManager.amountFromString(amountLine.text) > appWindow.getUnlockedBalance()
|
||||
}
|
||||
|
||||
validator: RegExpValidator {
|
||||
regExp: /^(\d{1,8})?([\.,]\d{1,12})?$/
|
||||
regExp: /^\s*(\d{1,8})?([\.,]\d{1,12})?\s*$/
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
text: qsTr("All") + translationManager.emptyString
|
||||
onClicked: amountLine.text = "(all)"
|
||||
}
|
||||
}
|
||||
|
||||
MoneroComponents.TextPlain {
|
||||
|
||||
@@ -137,6 +137,14 @@ target_compile_definitions(monero-wallet-gui
|
||||
${Qt5Qml_DEFINITIONS}
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
if(NOT ICU_ROOT)
|
||||
execute_process(COMMAND brew --prefix icu4c OUTPUT_VARIABLE ICU_ROOT OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
find_package(ICU REQUIRED COMPONENTS data i18n uc)
|
||||
target_link_directories(monero-wallet-gui PRIVATE ${ICU_ROOT}/lib)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
|
||||
target_link_libraries(monero-wallet-gui
|
||||
|
||||
@@ -104,10 +104,7 @@ void Wallet::updateConnectionStatusAsync()
|
||||
setConnectionStatus(ConnectionStatus_Connecting);
|
||||
}
|
||||
ConnectionStatus newStatus = static_cast<ConnectionStatus>(m_walletImpl->connected());
|
||||
if (newStatus != m_connectionStatus || !m_initialized) {
|
||||
m_initialized = true;
|
||||
setConnectionStatus(newStatus);
|
||||
}
|
||||
setConnectionStatus(newStatus);
|
||||
// Release lock
|
||||
m_connectionStatusRunning = false;
|
||||
});
|
||||
@@ -115,8 +112,13 @@ void Wallet::updateConnectionStatusAsync()
|
||||
|
||||
Wallet::ConnectionStatus Wallet::connected(bool forceCheck)
|
||||
{
|
||||
if (!m_initialized)
|
||||
{
|
||||
return ConnectionStatus_Connecting;
|
||||
}
|
||||
|
||||
// cache connection status
|
||||
if (forceCheck || !m_initialized || (m_connectionStatusTime.elapsed() / 1000 > m_connectionStatusTtl && !m_connectionStatusRunning) || m_connectionStatusTime.elapsed() > 30000) {
|
||||
if (forceCheck || (m_connectionStatusTime.elapsed() / 1000 > m_connectionStatusTtl && !m_connectionStatusRunning) || m_connectionStatusTime.elapsed() > 30000) {
|
||||
qDebug() << "Checking connection status";
|
||||
m_connectionStatusRunning = true;
|
||||
m_connectionStatusTime.restart();
|
||||
@@ -277,14 +279,25 @@ void Wallet::initAsync(
|
||||
{
|
||||
qDebug() << "initAsync: " + daemonAddress;
|
||||
const auto future = m_scheduler.run([this, daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight, proxyAddress] {
|
||||
bool success = init(daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight, proxyAddress);
|
||||
if (success)
|
||||
m_initialized = init(
|
||||
daemonAddress,
|
||||
trustedDaemon,
|
||||
upperTransactionLimit,
|
||||
isRecovering,
|
||||
isRecoveringFromDevice,
|
||||
restoreHeight,
|
||||
proxyAddress);
|
||||
if (m_initialized)
|
||||
{
|
||||
emit walletCreationHeightChanged();
|
||||
qDebug() << "init async finished - starting refresh";
|
||||
connected(true);
|
||||
startRefresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
qCritical() << "Failed to initialize the wallet";
|
||||
}
|
||||
});
|
||||
if (future.first)
|
||||
{
|
||||
@@ -1054,6 +1067,7 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||
, m_connectionStatus(Wallet::ConnectionStatus_Disconnected)
|
||||
, m_connectionStatusTtl(WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS)
|
||||
, m_disconnected(true)
|
||||
, m_initialized(false)
|
||||
, m_currentSubaddressAccount(0)
|
||||
, m_subaddress(nullptr)
|
||||
, m_subaddressModel(nullptr)
|
||||
@@ -1074,7 +1088,6 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||
m_connectionStatusTime.start();
|
||||
m_daemonBlockChainHeightTime.start();
|
||||
m_daemonBlockChainTargetHeightTime.start();
|
||||
m_initialized = false;
|
||||
m_connectionStatusRunning = false;
|
||||
m_daemonUsername = "";
|
||||
m_daemonPassword = "";
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#ifndef WALLET_H
|
||||
#define WALLET_H
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include <QElapsedTimer>
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
@@ -444,7 +446,7 @@ private:
|
||||
int m_connectionStatusTtl;
|
||||
mutable QElapsedTimer m_connectionStatusTime;
|
||||
bool m_disconnected;
|
||||
mutable bool m_initialized;
|
||||
std::atomic<bool> m_initialized;
|
||||
uint32_t m_currentSubaddressAccount;
|
||||
Subaddress * m_subaddress;
|
||||
mutable SubaddressModel * m_subaddressModel;
|
||||
|
||||
@@ -194,15 +194,7 @@ int main(int argc, char *argv[])
|
||||
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
||||
#endif
|
||||
|
||||
if (MoneroSettings::portableConfigExists())
|
||||
{
|
||||
const QString cacheDir(MoneroSettings::portableFolderName() + QDir::separator() + ".cache");
|
||||
if (!qputenv("QML_DISK_CACHE_PATH", cacheDir.toUtf8()))
|
||||
{
|
||||
qCritical() << "Error: failed to set QML disk cache path";
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
qputenv("QML_DISABLE_DISK_CACHE", "1");
|
||||
|
||||
MainApp app(argc, argv);
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <QtCore>
|
||||
#include <QCoreApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "TailsOS.h"
|
||||
@@ -89,17 +88,6 @@ QString getAccountName(){
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
bool askInstallDesktopEntry()
|
||||
{
|
||||
QMessageBox msgBox(
|
||||
QMessageBox::Question,
|
||||
QObject::tr("Monero GUI"),
|
||||
QObject::tr("Would you like to register Monero GUI Desktop entry?"),
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
msgBox.setDefaultButton(QMessageBox::Yes);
|
||||
return msgBox.exec() == QMessageBox::Yes;
|
||||
}
|
||||
|
||||
QString xdgMime(){
|
||||
return QString(
|
||||
"[Desktop Entry]\n"
|
||||
@@ -139,11 +127,8 @@ void registerXdgMime(){
|
||||
}
|
||||
else
|
||||
{
|
||||
if (askInstallDesktopEntry())
|
||||
{
|
||||
QDir().mkpath(QFileInfo(filePath).path());
|
||||
fileWrite(filePath, mime);
|
||||
}
|
||||
QDir().mkpath(QFileInfo(filePath).path());
|
||||
fileWrite(filePath, mime);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -81,13 +81,16 @@ ColumnLayout {
|
||||
placeholderText: qsTr("Default") + translationManager.emptyString
|
||||
placeholderFontSize: 15
|
||||
text: persistentSettings.blockchainDataDir
|
||||
inlineButton.small: true
|
||||
inlineButtonText: qsTr("Browse") + translationManager.emptyString
|
||||
inlineButton.onClicked: {
|
||||
if(persistentSettings.blockchainDataDir != "");
|
||||
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir;
|
||||
blockchainFileDialog.open();
|
||||
blockchainFolder.focus = true;
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
small: true
|
||||
text: qsTr("Browse") + translationManager.emptyString
|
||||
onClicked: {
|
||||
if(persistentSettings.blockchainDataDir != "");
|
||||
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir;
|
||||
blockchainFileDialog.open();
|
||||
blockchainFolder.focus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -208,7 +208,7 @@ Rectangle {
|
||||
anchors.margins: 8
|
||||
anchors.leftMargin: 10
|
||||
font.family: MoneroComponents.Style.fontRegular.name
|
||||
text: qsTr("Enter your 25 (or 24) word mnemonic seed") + translationManager.emptyString
|
||||
text: qsTr("Enter your 25 word mnemonic seed") + translationManager.emptyString
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
visible: !seedInput.text
|
||||
}
|
||||
|
||||
@@ -89,16 +89,19 @@ GridLayout {
|
||||
placeholderText: "..."
|
||||
placeholderFontSize: 16
|
||||
text: appWindow.accountsDir + "/"
|
||||
inlineButton.small: true
|
||||
inlineButtonText: qsTr("Browse") + translationManager.emptyString
|
||||
inlineButton.onClicked: {
|
||||
fileWalletDialog.folder = walletManager.localPathToUrl(walletLocation.text)
|
||||
fileWalletDialog.open()
|
||||
walletLocation.focus = true
|
||||
}
|
||||
onTextChanged: {
|
||||
walletLocation.error = walletLocation.text === "";
|
||||
}
|
||||
|
||||
MoneroComponents.InlineButton {
|
||||
small: true
|
||||
text: qsTr("Browse") + translationManager.emptyString
|
||||
onClicked: {
|
||||
fileWalletDialog.folder = walletManager.localPathToUrl(walletLocation.text)
|
||||
fileWalletDialog.open()
|
||||
walletLocation.focus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
|
||||
Reference in New Issue
Block a user