mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 22:07:26 -04:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc352e4913 | ||
|
|
903539bd30 | ||
|
|
af0b3142a0 | ||
|
|
6fe41e6f55 | ||
|
|
2a6ad67f77 | ||
|
|
5652284572 | ||
|
|
2eeeadfd10 | ||
|
|
0d5d2dbf5e | ||
|
|
606dbed4a0 | ||
|
|
301b20d19c | ||
|
|
f6196d48ab | ||
|
|
110b09efba | ||
|
|
0fdf81bc92 | ||
|
|
ea1fee2f5f | ||
|
|
ef54a32de0 | ||
|
|
cd3a0f85a6 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -103,6 +103,8 @@ jobs:
|
||||
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
||||
- name: build
|
||||
run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3'
|
||||
- name: sha256sum
|
||||
run: shasum -a256 /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
|
||||
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
||||
|
||||
set(VERSION_MAJOR "17")
|
||||
set(VERSION_MINOR "1")
|
||||
set(VERSION_REVISION "5")
|
||||
set(VERSION_REVISION "6")
|
||||
set(VERSION "0.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
|
||||
|
||||
option(STATIC "Link libraries statically, requires static Qt")
|
||||
|
||||
10
README.md
10
README.md
@@ -102,13 +102,14 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
\* `4` - number of CPU threads to use
|
||||
5. Monero GUI Windows static binaries will be placed in `monero-gui/build/x86_64-w64-mingw32/release/bin` directory
|
||||
|
||||
### Building Linux static binaries with Docker (any OS)
|
||||
### Building Reproducible Linux static binaries with Docker (any OS)
|
||||
|
||||
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||
2. Clone the repository
|
||||
```
|
||||
git clone --recursive https://github.com/monero-project/monero-gui.git
|
||||
git clone --branch master --recursive https://github.com/monero-project/monero-gui.git
|
||||
```
|
||||
\* `master` - replace with the desired version tag (e.g. `v0.17.1.5`) to build the release binaries.
|
||||
3. Prepare build environment
|
||||
```
|
||||
cd monero-gui
|
||||
@@ -123,6 +124,11 @@ Packaging for your favorite distribution would be a welcome contribution!
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
\* `4` - number of CPU threads to use
|
||||
5. Monero GUI Linux static binaries will be placed in `monero-gui/build/release/bin` directory
|
||||
6. (*Optional*) Compare `monero-wallet-gui` SHA-256 hash to the one obtained from a trusted source
|
||||
```
|
||||
docker run --rm -it -v <MONERO_GUI_DIR_FULL_PATH>:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'shasum -a 256 /monero-gui/build/release/bin/monero-wallet-gui'
|
||||
```
|
||||
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||
|
||||
### Building Android APK with Docker (any OS) *Experimental*
|
||||
- Minimum Android 9 Pie (API 28)
|
||||
|
||||
@@ -94,6 +94,7 @@ Item {
|
||||
|
||||
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
|
||||
|
||||
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||
onTextUpdated: {
|
||||
// check to remove placeholder text when there is content
|
||||
if(item.isEmpty()){
|
||||
@@ -234,6 +235,7 @@ Item {
|
||||
anchors.leftMargin: inlineIcon.visible ? 44 : 0
|
||||
font.pixelSize: item.fontSize
|
||||
font.bold: item.fontBold
|
||||
KeyNavigation.tab: item.KeyNavigation.tab
|
||||
onEditingFinished: item.editingFinished()
|
||||
onAccepted: item.accepted();
|
||||
onTextChanged: item.textUpdated()
|
||||
|
||||
@@ -94,6 +94,8 @@ ColumnLayout {
|
||||
signal inputLabelLinkActivated();
|
||||
signal editingFinished();
|
||||
|
||||
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||
|
||||
spacing: 0
|
||||
Rectangle {
|
||||
id: inputLabelRect
|
||||
@@ -159,8 +161,10 @@ ColumnLayout {
|
||||
id: input
|
||||
readOnly: false
|
||||
addressValidation: false
|
||||
KeyNavigation.priority: KeyNavigation.BeforeItem
|
||||
KeyNavigation.tab: item.KeyNavigation.tab
|
||||
Layout.fillWidth: true
|
||||
|
||||
|
||||
leftPadding: item.inputPaddingLeft
|
||||
rightPadding: item.inputPaddingRight
|
||||
topPadding: item.inputPaddingTop
|
||||
|
||||
@@ -68,7 +68,7 @@ Item {
|
||||
id: buttonRect
|
||||
anchors.fill: parent
|
||||
radius: 3
|
||||
border.width: parent.focus ? 1 : 0
|
||||
border.width: parent.focus && parent.enabled ? 1 : 0
|
||||
|
||||
state: button.enabled ? "active" : "disabled"
|
||||
Component.onCompleted: state = state
|
||||
@@ -76,7 +76,7 @@ Item {
|
||||
states: [
|
||||
State {
|
||||
name: "hover"
|
||||
when: buttonArea.containsMouse || button.focus
|
||||
when: button.enabled && (buttonArea.containsMouse || button.focus)
|
||||
PropertyChanges {
|
||||
target: buttonRect
|
||||
color: primary
|
||||
|
||||
@@ -45,20 +45,11 @@ Rectangle {
|
||||
radius: 10
|
||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||
border.width: 1
|
||||
focus: true
|
||||
Keys.enabled: true
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
Keys.onEnterPressed: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
}
|
||||
KeyNavigation.tab: doneButton
|
||||
|
||||
Clipboard { id: clipboard }
|
||||
@@ -72,7 +63,6 @@ Rectangle {
|
||||
function open(txid) {
|
||||
root.transactionID = txid;
|
||||
root.visible = true;
|
||||
root.forceActiveFocus();
|
||||
}
|
||||
|
||||
function close() {
|
||||
@@ -156,13 +146,6 @@ Rectangle {
|
||||
text: qsTr("Open folder") + translationManager.emptyString;
|
||||
width: 200
|
||||
KeyNavigation.tab: doneButton
|
||||
Keys.enabled: openFolderButton.visible
|
||||
Keys.onReturnPressed: openFolderButton.onClicked
|
||||
Keys.onEnterPressed: openFolderButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.fileUrl))
|
||||
}
|
||||
@@ -172,15 +155,8 @@ Rectangle {
|
||||
id: doneButton
|
||||
text: qsTr("Done") + translationManager.emptyString;
|
||||
width: 200
|
||||
focus: true
|
||||
focus: root.visible
|
||||
KeyNavigation.tab: openFolderButton
|
||||
Keys.enabled: doneButton.visible
|
||||
Keys.onReturnPressed: doneButton.onClicked
|
||||
Keys.onEnterPressed: doneButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
|
||||
@@ -45,33 +45,12 @@ Rectangle {
|
||||
radius: 10
|
||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||
border.width: 1
|
||||
focus: true
|
||||
Keys.enabled: true
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
root.rejected()
|
||||
}
|
||||
Keys.onEnterPressed: {
|
||||
if (root.state == "default") {
|
||||
root.close()
|
||||
root.accepted()
|
||||
} else if (root.state == "error") {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
root.rejected()
|
||||
}
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
if (root.state == "default") {
|
||||
root.close()
|
||||
root.accepted()
|
||||
} else if (root.state == "error") {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
root.rejected()
|
||||
}
|
||||
}
|
||||
KeyNavigation.tab: confirmButton
|
||||
|
||||
property var transactionAmount: ""
|
||||
@@ -101,7 +80,7 @@ Rectangle {
|
||||
PropertyChanges { target: bottomMessage; visible: false }
|
||||
PropertyChanges { target: buttons; visible: true }
|
||||
PropertyChanges { target: backButton; visible: true; primary: false }
|
||||
PropertyChanges { target: confirmButton; visible: true }
|
||||
PropertyChanges { target: confirmButton; visible: true; focus: true }
|
||||
}, State {
|
||||
// error message being displayed, show only back button
|
||||
name: "error";
|
||||
@@ -115,7 +94,7 @@ Rectangle {
|
||||
PropertyChanges { target: bottom; visible: true }
|
||||
PropertyChanges { target: bottomMessage; visible: false }
|
||||
PropertyChanges { target: buttons; visible: true }
|
||||
PropertyChanges { target: backButton; visible: true; primary: true }
|
||||
PropertyChanges { target: backButton; visible: true; primary: true; focus: true }
|
||||
PropertyChanges { target: confirmButton; visible: false }
|
||||
}, State {
|
||||
// creating or sending transaction, show tx details and don't show any button
|
||||
@@ -141,7 +120,6 @@ Rectangle {
|
||||
|
||||
//clean previous error message
|
||||
errorText.text = "";
|
||||
root.forceActiveFocus()
|
||||
}
|
||||
|
||||
function close() {
|
||||
@@ -422,17 +400,8 @@ Rectangle {
|
||||
id: backButton
|
||||
text: qsTr("Back") + translationManager.emptyString;
|
||||
width: 200
|
||||
focus: false
|
||||
primary: false
|
||||
KeyNavigation.tab: confirmButton
|
||||
Keys.enabled: backButton.visible
|
||||
Keys.onReturnPressed: backButton.onClicked
|
||||
Keys.onEnterPressed: backButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
@@ -445,16 +414,7 @@ Rectangle {
|
||||
text: qsTr("Confirm") + translationManager.emptyString;
|
||||
rightIcon: "qrc:///images/rightArrow.png"
|
||||
width: 200
|
||||
focus: false
|
||||
KeyNavigation.tab: backButton
|
||||
Keys.enabled: confirmButton.visible
|
||||
Keys.onReturnPressed: confirmButton.onClicked
|
||||
Keys.onEnterPressed: confirmButton.onClicked
|
||||
Keys.onEscapePressed: {
|
||||
root.close()
|
||||
root.clearFields()
|
||||
root.rejected()
|
||||
}
|
||||
onClicked: {
|
||||
root.close()
|
||||
root.accepted()
|
||||
|
||||
5
main.qml
5
main.qml
@@ -1332,6 +1332,11 @@ ApplicationWindow {
|
||||
appWindow.fiatApiRefresh();
|
||||
appWindow.fiatTimerStart();
|
||||
}
|
||||
|
||||
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
||||
persistentSettings.askDesktopShortcut = false;
|
||||
oshelper.createDesktopEntry();
|
||||
}
|
||||
}
|
||||
|
||||
MoneroSettings {
|
||||
|
||||
2
monero
2
monero
Submodule monero updated: 3942a1cd04...f7aa91f70d
@@ -170,6 +170,7 @@ Rectangle {
|
||||
|
||||
LineEditMulti {
|
||||
id: addressLine
|
||||
KeyNavigation.tab: amountLine
|
||||
spacing: 0
|
||||
inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60
|
||||
fontBold: true
|
||||
@@ -277,6 +278,7 @@ Rectangle {
|
||||
// Amount input
|
||||
LineEdit {
|
||||
id: amountLine
|
||||
KeyNavigation.tab: sendButton
|
||||
Layout.fillWidth: true
|
||||
inlineIcon: true
|
||||
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
||||
@@ -488,6 +490,7 @@ Rectangle {
|
||||
RowLayout {
|
||||
StandardButton {
|
||||
id: sendButton
|
||||
KeyNavigation.tab: addressLine
|
||||
rightIcon: "qrc:///images/rightArrow.png"
|
||||
rightIconInactive: "qrc:///images/rightArrowInactive.png"
|
||||
Layout.topMargin: 4
|
||||
|
||||
@@ -319,11 +319,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Desktop entry
|
||||
#ifdef Q_OS_LINUX
|
||||
registerXdgMime(app);
|
||||
#endif
|
||||
|
||||
IPC *ipc = new IPC(&app);
|
||||
QStringList posArgs = parser.positionalArguments();
|
||||
|
||||
|
||||
@@ -46,11 +46,13 @@
|
||||
#endif
|
||||
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||
#include <X11/XKBlib.h>
|
||||
#undef Bool
|
||||
#undef KeyPress
|
||||
#undef KeyRelease
|
||||
#undef FocusIn
|
||||
#undef FocusOut
|
||||
// #undef those Xlib #defines that conflict with QEvent::Type enum
|
||||
#include "qt/utils.h"
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
@@ -85,6 +87,13 @@ OSHelper::OSHelper(QObject *parent) : QObject(parent)
|
||||
|
||||
}
|
||||
|
||||
void OSHelper::createDesktopEntry() const
|
||||
{
|
||||
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||
registerXdgMime();
|
||||
#endif
|
||||
}
|
||||
|
||||
QString OSHelper::downloadLocation() const
|
||||
{
|
||||
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||
|
||||
@@ -41,6 +41,7 @@ class OSHelper : public QObject
|
||||
public:
|
||||
explicit OSHelper(QObject *parent = 0);
|
||||
|
||||
Q_INVOKABLE void createDesktopEntry() const;
|
||||
Q_INVOKABLE QString downloadLocation() const;
|
||||
Q_INVOKABLE bool openContainingFolder(const QString &filePath) const;
|
||||
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <QtCore>
|
||||
#include <QApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QMessageBox>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "TailsOS.h"
|
||||
@@ -88,7 +89,18 @@ QString getAccountName(){
|
||||
}
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
QString xdgMime(QApplication &app){
|
||||
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"
|
||||
"Name=Monero GUI\n"
|
||||
@@ -105,32 +117,34 @@ QString xdgMime(QApplication &app){
|
||||
"StartupNotify=true\n"
|
||||
"X-GNOME-Bugzilla-Bugzilla=GNOME\n"
|
||||
"X-GNOME-UsesNotifications=true\n"
|
||||
).arg(app.applicationFilePath());
|
||||
).arg(QCoreApplication::applicationFilePath());
|
||||
}
|
||||
|
||||
void registerXdgMime(QApplication &app){
|
||||
void registerXdgMime(){
|
||||
// Register desktop entry
|
||||
// - MacOS handled via Info.plist
|
||||
// - Windows handled in the installer by rbrunner7
|
||||
// - Linux written to `QStandardPaths::ApplicationsLocation`
|
||||
// - Tails written to persistent dotfiles
|
||||
QString mime = xdgMime(app);
|
||||
QString mime = xdgMime();
|
||||
QString appPath = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
|
||||
QString filePath = QString("%1/monero-gui.desktop").arg(appPath);
|
||||
|
||||
if (TailsOS::detect() && TailsOS::detectDotPersistence() && TailsOS::usePersistence) {
|
||||
TailsOS::persistXdgMime(filePath, mime);
|
||||
return;
|
||||
if (TailsOS::detect())
|
||||
{
|
||||
if (TailsOS::detectDotPersistence() && TailsOS::usePersistence)
|
||||
{
|
||||
TailsOS::persistXdgMime(filePath, mime);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (askInstallDesktopEntry())
|
||||
{
|
||||
QDir().mkpath(QFileInfo(filePath).path());
|
||||
fileWrite(filePath, mime);
|
||||
}
|
||||
}
|
||||
|
||||
QFileInfo file(filePath);
|
||||
QDir().mkpath(file.path()); // ensure directory exists
|
||||
|
||||
#ifdef QT_DEBUG
|
||||
qDebug() << "Writing xdg mime: " << filePath;
|
||||
#endif
|
||||
|
||||
fileWrite(filePath, mime);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ QByteArray fileOpen(QString path);
|
||||
bool fileWrite(QString path, QString data);
|
||||
QString getAccountName();
|
||||
#ifdef Q_OS_LINUX
|
||||
QString xdgMime(QApplication &app);
|
||||
void registerXdgMime(QApplication &app);
|
||||
QString xdgMime();
|
||||
void registerXdgMime();
|
||||
#endif
|
||||
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
||||
QString randomUserAgent();
|
||||
|
||||
@@ -50,10 +50,8 @@ Rectangle {
|
||||
if(wizardController.walletRestoreMode === "keys") {
|
||||
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
||||
} else if(wizardController.walletRestoreMode === "seed") {
|
||||
valid = wizardWalletInput.verify();
|
||||
if(!valid) return false;
|
||||
valid = Wizard.checkSeed(seedInput.text);
|
||||
return valid;
|
||||
seedInput.error = seedInput.text && !Wizard.checkSeed(seedInput.text);
|
||||
return wizardWalletInput.verify() && seedInput.text && Wizard.checkSeed(seedInput.text);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user