mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-11 15:57:26 -04:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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]
|
on: [push, pull_request]
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
- uses: satackey/action-docker-layer-caching@v0.0.10
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
key: docker-linux-static-{hash}
|
key: docker-linux-static-{hash}
|
||||||
@@ -118,7 +118,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: satackey/action-docker-layer-caching@v0.0.8
|
- uses: satackey/action-docker-layer-caching@v0.0.10
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
key: docker-windows-static-{hash}
|
key: docker-windows-static-{hash}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
|||||||
|
|
||||||
set(VERSION_MAJOR "17")
|
set(VERSION_MAJOR "17")
|
||||||
set(VERSION_MINOR "1")
|
set(VERSION_MINOR "1")
|
||||||
set(VERSION_REVISION "6")
|
set(VERSION_REVISION "7")
|
||||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||||
|
|
||||||
option(STATIC "Link libraries statically, requires static Qt")
|
option(STATIC "Link libraries statically, requires static Qt")
|
||||||
|
|||||||
@@ -113,5 +113,5 @@ function capitalize(s){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function removeTrailingZeros(value) {
|
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
|
// Store to file
|
||||||
transaction.setFilename(path);
|
transaction.setFilename(path);
|
||||||
}
|
}
|
||||||
|
appWindow.showProcessingSplash(qsTr("Sending transaction ..."));
|
||||||
currentWallet.commitTransactionAsync(transaction);
|
currentWallet.commitTransactionAsync(transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onTransactionCommitted(success, transaction, txid) {
|
function onTransactionCommitted(success, transaction, txid) {
|
||||||
|
hideProcessingSplash();
|
||||||
if (!success) {
|
if (!success) {
|
||||||
console.log("Error committing transaction: " + transaction.errorString);
|
console.log("Error committing transaction: " + transaction.errorString);
|
||||||
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
informationPopup.title = qsTr("Error") + translationManager.emptyString
|
||||||
@@ -1335,7 +1337,21 @@ ApplicationWindow {
|
|||||||
|
|
||||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
||||||
persistentSettings.askDesktopShortcut = false;
|
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 "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
property bool askDesktopShortcut: isLinux
|
||||||
property string language: 'English (US)'
|
property string language: 'English (US)'
|
||||||
property string language_wallet: 'English'
|
property string language_wallet: 'English'
|
||||||
property string locale: 'en_US'
|
property string locale: 'en_US'
|
||||||
|
|||||||
2
monero
2
monero
Submodule monero updated: f7aa91f70d...54a4071473
@@ -104,10 +104,7 @@ void Wallet::updateConnectionStatusAsync()
|
|||||||
setConnectionStatus(ConnectionStatus_Connecting);
|
setConnectionStatus(ConnectionStatus_Connecting);
|
||||||
}
|
}
|
||||||
ConnectionStatus newStatus = static_cast<ConnectionStatus>(m_walletImpl->connected());
|
ConnectionStatus newStatus = static_cast<ConnectionStatus>(m_walletImpl->connected());
|
||||||
if (newStatus != m_connectionStatus || !m_initialized) {
|
setConnectionStatus(newStatus);
|
||||||
m_initialized = true;
|
|
||||||
setConnectionStatus(newStatus);
|
|
||||||
}
|
|
||||||
// Release lock
|
// Release lock
|
||||||
m_connectionStatusRunning = false;
|
m_connectionStatusRunning = false;
|
||||||
});
|
});
|
||||||
@@ -115,8 +112,13 @@ void Wallet::updateConnectionStatusAsync()
|
|||||||
|
|
||||||
Wallet::ConnectionStatus Wallet::connected(bool forceCheck)
|
Wallet::ConnectionStatus Wallet::connected(bool forceCheck)
|
||||||
{
|
{
|
||||||
|
if (!m_initialized)
|
||||||
|
{
|
||||||
|
return ConnectionStatus_Connecting;
|
||||||
|
}
|
||||||
|
|
||||||
// cache connection status
|
// 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";
|
qDebug() << "Checking connection status";
|
||||||
m_connectionStatusRunning = true;
|
m_connectionStatusRunning = true;
|
||||||
m_connectionStatusTime.restart();
|
m_connectionStatusTime.restart();
|
||||||
@@ -277,14 +279,25 @@ void Wallet::initAsync(
|
|||||||
{
|
{
|
||||||
qDebug() << "initAsync: " + daemonAddress;
|
qDebug() << "initAsync: " + daemonAddress;
|
||||||
const auto future = m_scheduler.run([this, daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight, proxyAddress] {
|
const auto future = m_scheduler.run([this, daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight, proxyAddress] {
|
||||||
bool success = init(daemonAddress, trustedDaemon, upperTransactionLimit, isRecovering, isRecoveringFromDevice, restoreHeight, proxyAddress);
|
m_initialized = init(
|
||||||
if (success)
|
daemonAddress,
|
||||||
|
trustedDaemon,
|
||||||
|
upperTransactionLimit,
|
||||||
|
isRecovering,
|
||||||
|
isRecoveringFromDevice,
|
||||||
|
restoreHeight,
|
||||||
|
proxyAddress);
|
||||||
|
if (m_initialized)
|
||||||
{
|
{
|
||||||
emit walletCreationHeightChanged();
|
emit walletCreationHeightChanged();
|
||||||
qDebug() << "init async finished - starting refresh";
|
qDebug() << "init async finished - starting refresh";
|
||||||
connected(true);
|
connected(true);
|
||||||
startRefresh();
|
startRefresh();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
qCritical() << "Failed to initialize the wallet";
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (future.first)
|
if (future.first)
|
||||||
{
|
{
|
||||||
@@ -1054,6 +1067,7 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
, m_connectionStatus(Wallet::ConnectionStatus_Disconnected)
|
, m_connectionStatus(Wallet::ConnectionStatus_Disconnected)
|
||||||
, m_connectionStatusTtl(WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS)
|
, m_connectionStatusTtl(WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS)
|
||||||
, m_disconnected(true)
|
, m_disconnected(true)
|
||||||
|
, m_initialized(false)
|
||||||
, m_currentSubaddressAccount(0)
|
, m_currentSubaddressAccount(0)
|
||||||
, m_subaddress(nullptr)
|
, m_subaddress(nullptr)
|
||||||
, m_subaddressModel(nullptr)
|
, m_subaddressModel(nullptr)
|
||||||
@@ -1074,7 +1088,6 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
m_connectionStatusTime.start();
|
m_connectionStatusTime.start();
|
||||||
m_daemonBlockChainHeightTime.start();
|
m_daemonBlockChainHeightTime.start();
|
||||||
m_daemonBlockChainTargetHeightTime.start();
|
m_daemonBlockChainTargetHeightTime.start();
|
||||||
m_initialized = false;
|
|
||||||
m_connectionStatusRunning = false;
|
m_connectionStatusRunning = false;
|
||||||
m_daemonUsername = "";
|
m_daemonUsername = "";
|
||||||
m_daemonPassword = "";
|
m_daemonPassword = "";
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
#ifndef WALLET_H
|
#ifndef WALLET_H
|
||||||
#define WALLET_H
|
#define WALLET_H
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
@@ -444,7 +446,7 @@ private:
|
|||||||
int m_connectionStatusTtl;
|
int m_connectionStatusTtl;
|
||||||
mutable QElapsedTimer m_connectionStatusTime;
|
mutable QElapsedTimer m_connectionStatusTime;
|
||||||
bool m_disconnected;
|
bool m_disconnected;
|
||||||
mutable bool m_initialized;
|
std::atomic<bool> m_initialized;
|
||||||
uint32_t m_currentSubaddressAccount;
|
uint32_t m_currentSubaddressAccount;
|
||||||
Subaddress * m_subaddress;
|
Subaddress * m_subaddress;
|
||||||
mutable SubaddressModel * m_subaddressModel;
|
mutable SubaddressModel * m_subaddressModel;
|
||||||
|
|||||||
@@ -194,15 +194,7 @@ int main(int argc, char *argv[])
|
|||||||
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (MoneroSettings::portableConfigExists())
|
qputenv("QML_DISABLE_DISK_CACHE", "1");
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MainApp app(argc, argv);
|
MainApp app(argc, argv);
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#include "TailsOS.h"
|
#include "TailsOS.h"
|
||||||
@@ -89,17 +88,6 @@ QString getAccountName(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#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(){
|
QString xdgMime(){
|
||||||
return QString(
|
return QString(
|
||||||
"[Desktop Entry]\n"
|
"[Desktop Entry]\n"
|
||||||
@@ -139,11 +127,8 @@ void registerXdgMime(){
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (askInstallDesktopEntry())
|
QDir().mkpath(QFileInfo(filePath).path());
|
||||||
{
|
fileWrite(filePath, mime);
|
||||||
QDir().mkpath(QFileInfo(filePath).path());
|
|
||||||
fileWrite(filePath, mime);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user