forked from Public/monero-gui
Compare commits
72 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 | ||
|
|
cc352e4913 | ||
|
|
903539bd30 | ||
|
|
af0b3142a0 | ||
|
|
6fe41e6f55 | ||
|
|
2a6ad67f77 | ||
|
|
5652284572 | ||
|
|
2eeeadfd10 | ||
|
|
0d5d2dbf5e | ||
|
|
606dbed4a0 | ||
|
|
301b20d19c | ||
|
|
f6196d48ab | ||
|
|
110b09efba | ||
|
|
0fdf81bc92 | ||
|
|
ea1fee2f5f | ||
|
|
ef54a32de0 | ||
|
|
96f9c11320 | ||
|
|
4a5b191f7f | ||
|
|
148d487988 | ||
|
|
7b137f7682 | ||
|
|
2e81ea2c09 | ||
|
|
5150945414 | ||
|
|
ec8cd137cc | ||
|
|
d5365298d2 | ||
|
|
30bf63b4b8 | ||
|
|
e8ee55a502 | ||
|
|
212fa083e2 | ||
|
|
3daf16e65d | ||
|
|
abfaac9772 | ||
|
|
28e6558a48 | ||
|
|
2d20bfd7ac | ||
|
|
45bfcfd2e9 | ||
|
|
46cea8db6b | ||
|
|
b4c0cb65de | ||
|
|
56e611480a | ||
|
|
ff201af778 | ||
|
|
ef2be82c21 | ||
|
|
6fce5c7a84 | ||
|
|
157166269b | ||
|
|
caa273afea | ||
|
|
d58ce3f599 | ||
|
|
19a6f399f3 | ||
|
|
18c964afca | ||
|
|
cd3a0f85a6 | ||
|
|
56722e4747 |
55
.github/workflows/build.yml
vendored
55
.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]
|
||||||
|
|
||||||
@@ -58,13 +58,42 @@ jobs:
|
|||||||
- name: test qml
|
- name: test qml
|
||||||
run: build/release/bin/monero-wallet-gui --test-qml
|
run: build/release/bin/monero-wallet-gui --test-qml
|
||||||
|
|
||||||
|
macos-bundle:
|
||||||
|
runs-on: macOS-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: install dependencies
|
||||||
|
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf pkg-config python3 p7zip
|
||||||
|
- name: install dependencies
|
||||||
|
run: pip3 install requests semantic_version lxml
|
||||||
|
- name: download qt
|
||||||
|
run: |
|
||||||
|
curl -O https://raw.githubusercontent.com/engnr/qt-downloader/master/qt-downloader
|
||||||
|
chmod +x qt-downloader
|
||||||
|
./qt-downloader macos desktop 5.15.2 clang_64
|
||||||
|
working-directory: ../
|
||||||
|
- name: build
|
||||||
|
run: CMAKE_PREFIX_PATH=/Users/runner/work/monero-gui/5.15.2/clang_64 make release -j3
|
||||||
|
- name: deploy
|
||||||
|
run: make deploy
|
||||||
|
working-directory: build/release
|
||||||
|
- name: create .tar
|
||||||
|
run: tar -cf monero-wallet-gui.tar monero-wallet-gui.app
|
||||||
|
working-directory: build/release/bin
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ github.job }}
|
||||||
|
path: build/release/bin/monero-wallet-gui.tar
|
||||||
|
|
||||||
docker-linux-static:
|
docker-linux-static:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- 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}
|
||||||
@@ -74,6 +103,8 @@ jobs:
|
|||||||
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux .
|
||||||
- name: build
|
- 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'
|
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
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ github.job }}
|
||||||
@@ -87,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}
|
||||||
@@ -118,3 +149,21 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ github.job }}
|
name: ${{ github.job }}
|
||||||
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
path: /home/runner/work/monero-gui/monero-gui/build/Android/release/android-build/monero-gui.apk
|
||||||
|
|
||||||
|
source-archive:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: archive
|
||||||
|
run: |
|
||||||
|
pip install git-archive-all
|
||||||
|
export VERSION="monero-gui-$(git describe)"
|
||||||
|
export OUTPUT="$VERSION.tar"
|
||||||
|
echo "OUTPUT=$OUTPUT" >> $GITHUB_ENV
|
||||||
|
/home/runner/.local/bin/git-archive-all --prefix "$VERSION/" --force-submodules "$OUTPUT"
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.OUTPUT }}
|
||||||
|
path: /home/runner/work/monero-gui/monero-gui/${{ env.OUTPUT }}
|
||||||
|
|||||||
@@ -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 "3")
|
set(VERSION_REVISION "8")
|
||||||
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")
|
||||||
@@ -178,7 +178,10 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
|
|||||||
|
|
||||||
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
||||||
set(CMAKE_SKIP_RPATH ON)
|
set(CMAKE_SKIP_RPATH ON)
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES_PREV ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
|
||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_PREV})
|
||||||
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
message(STATUS "X11_FOUND = ${X11_FOUND}")
|
||||||
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
|
||||||
message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
|
message(STATUS "X11_LIBRARIES = ${X11_LIBRARIES}")
|
||||||
@@ -229,11 +232,6 @@ if(UNIX)
|
|||||||
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_PREFIX_PATH)
|
|
||||||
include_directories(${CMAKE_PREFIX_PATH}/include)
|
|
||||||
set(CMAKE_BUILD_RPATH "${CMAKE_PREFIX_PATH}/lib")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
@@ -265,6 +263,13 @@ else()
|
|||||||
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES_ABI})
|
pkg_check_modules(QT5_PKG_CONFIG REQUIRED ${QT5_LIBRARIES_ABI})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
get_target_property(QMAKE_IMPORTED_LOCATION Qt5::qmake IMPORTED_LOCATION)
|
||||||
|
get_filename_component(QT_INSTALL_PREFIX "${QMAKE_IMPORTED_LOCATION}/../.." ABSOLUTE)
|
||||||
|
|
||||||
|
if(APPLE AND NOT STATIC)
|
||||||
|
set(CMAKE_BUILD_RPATH "${QT_INSTALL_PREFIX}/lib")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(QT5_PKG_CONFIG_FOUND)
|
if(QT5_PKG_CONFIG_FOUND)
|
||||||
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
set(QT5_PKG_CONFIG "QT5_PKG_CONFIG")
|
||||||
if(STATIC)
|
if(STATIC)
|
||||||
@@ -276,10 +281,10 @@ if(QT5_PKG_CONFIG_FOUND)
|
|||||||
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
list(JOIN ${QT5_PKG_CONFIG}_LDFLAGS_OTHER " " ${QT5_PKG_CONFIG}_LDFLAGS_OTHER)
|
||||||
endif()
|
endif()
|
||||||
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
# temporal workaround for https://bugreports.qt.io/browse/QTBUG-80922
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LDFLAGS_OTHER "${${QT5_PKG_CONFIG}_LDFLAGS_OTHER}")
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LIBRARIES "${${QT5_PKG_CONFIG}_LIBRARIES}")
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_INCLUDE_DIRS "${${QT5_PKG_CONFIG}_INCLUDE_DIRS}")
|
||||||
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${CMAKE_PREFIX_PATH}" ${QT5_PKG_CONFIG}_LIBRARY_DIRS "${${QT5_PKG_CONFIG}_LIBRARY_DIRS}")
|
STRING(REPLACE "${QT5_PKG_CONFIG_Qt5Core_PREFIX}" "${QT_INSTALL_PREFIX}" ${QT5_PKG_CONFIG}_LIBRARY_DIRS "${${QT5_PKG_CONFIG}_LIBRARY_DIRS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
set(QT5_LIBRARIES ${${QT5_PKG_CONFIG}_LIBRARIES} ${${QT5_PKG_CONFIG}_LDFLAGS_OTHER})
|
||||||
@@ -385,8 +390,10 @@ if(STATIC)
|
|||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
pkg_check_modules(X11XCB_XCBGLX_FONTCONFIG REQUIRED x11-xcb xcb-glx fontconfig)
|
pkg_check_modules(X11XCB_XCBGLX REQUIRED x11-xcb xcb-glx)
|
||||||
list(APPEND QT5_LIBRARIES ${X11XCB_XCBGLX_FONTCONFIG_STATIC_LIBRARIES})
|
list(APPEND QT5_LIBRARIES ${X11XCB_XCBGLX_LIBRARIES})
|
||||||
|
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
|
||||||
|
list(APPEND QT5_LIBRARIES ${FONTCONFIG_STATIC_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -413,7 +420,7 @@ message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}")
|
|||||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
||||||
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt;winmm)
|
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
||||||
if(DEPENDS)
|
if(DEPENDS)
|
||||||
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
|
set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv)
|
||||||
else()
|
else()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ ARG ANDROID_NDK_REVISION=21d
|
|||||||
ARG ANDROID_NDK_HASH=bcf4023eb8cb6976a4c7cff0a8a8f145f162bf4d
|
ARG ANDROID_NDK_HASH=bcf4023eb8cb6976a4c7cff0a8a8f145f162bf4d
|
||||||
ARG ANDROID_SDK_REVISION=4333796
|
ARG ANDROID_SDK_REVISION=4333796
|
||||||
ARG ANDROID_SDK_HASH=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9
|
ARG ANDROID_SDK_HASH=92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9
|
||||||
ARG QT_VERSION=5.15
|
ARG QT_VERSION=5.15.2
|
||||||
|
|
||||||
WORKDIR /opt/android
|
WORKDIR /opt/android
|
||||||
ENV WORKDIR=/opt/android
|
ENV WORKDIR=/opt/android
|
||||||
@@ -19,7 +19,6 @@ ENV ANDROID_SDK_ROOT=${WORKDIR}/tools
|
|||||||
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
||||||
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
ENV PATH=${JAVA_HOME}/bin:${PATH}
|
||||||
ENV PREFIX=${WORKDIR}/prefix
|
ENV PREFIX=${WORKDIR}/prefix
|
||||||
ENV QT_PREFIX=${WORKDIR}/Qt-${QT_VERSION}
|
|
||||||
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
ENV TOOLCHAIN_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
@@ -66,7 +65,7 @@ RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 \
|
|||||||
-no-sql-mysql \
|
-no-sql-mysql \
|
||||||
-opensource -confirm-license \
|
-opensource -confirm-license \
|
||||||
-android-arch arm64-v8a \
|
-android-arch arm64-v8a \
|
||||||
-prefix ${QT_PREFIX} \
|
-prefix ${PREFIX} \
|
||||||
-nomake tools -nomake tests -nomake examples \
|
-nomake tools -nomake tests -nomake examples \
|
||||||
-skip qtwebengine \
|
-skip qtwebengine \
|
||||||
-skip qtserialport \
|
-skip qtserialport \
|
||||||
@@ -201,15 +200,15 @@ CMD set -ex \
|
|||||||
&& cd build/Android/release \
|
&& cd build/Android/release \
|
||||||
&& cmake \
|
&& cmake \
|
||||||
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
|
||||||
-DCMAKE_PREFIX_PATH="${PREFIX};${QT_PREFIX}" \
|
-DCMAKE_PREFIX_PATH="${PREFIX}" \
|
||||||
-DCMAKE_FIND_ROOT_PATH="${PREFIX};${QT_PREFIX}" \
|
-DCMAKE_FIND_ROOT_PATH="${PREFIX}" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DARCH="armv8-a" \
|
-DARCH="armv8-a" \
|
||||||
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \
|
-DANDROID_NATIVE_API_LEVEL=${ANDROID_NATIVE_API_LEVEL} \
|
||||||
-DANDROID_ABI="arm64-v8a" \
|
-DANDROID_ABI="arm64-v8a" \
|
||||||
-DANDROID_TOOLCHAIN=clang \
|
-DANDROID_TOOLCHAIN=clang \
|
||||||
-DBoost_USE_STATIC_RUNTIME=ON \
|
-DBoost_USE_STATIC_RUNTIME=ON \
|
||||||
-DLRELEASE_PATH="${QT_PREFIX}/bin" \
|
-DLRELEASE_PATH="${PREFIX}/bin" \
|
||||||
-DQT_ANDROID_APPLICATION_BINARY="monero-wallet-gui" \
|
-DQT_ANDROID_APPLICATION_BINARY="monero-wallet-gui" \
|
||||||
-DWITH_SCANNER=ON \
|
-DWITH_SCANNER=ON \
|
||||||
../../.. \
|
../../.. \
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ ARG THREADS=1
|
|||||||
ARG QT_VERSION=5.15.2
|
ARG QT_VERSION=5.15.2
|
||||||
|
|
||||||
ENV CFLAGS="-fPIC"
|
ENV CFLAGS="-fPIC"
|
||||||
|
ENV CPPFLAGS="-fPIC"
|
||||||
ENV CXXFLAGS="-fPIC"
|
ENV CXXFLAGS="-fPIC"
|
||||||
ENV SOURCE_DATE_EPOCH=1397818193
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ RUN apt install -y libtool-bin && \
|
|||||||
git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
git clone -b libXau-1.0.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxau && \
|
||||||
cd libxau && \
|
cd libxau && \
|
||||||
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
git reset --hard d9443b2c57b512cfb250b35707378654d86c7dea && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -39,9 +40,14 @@ RUN apt install -y libpthread-stubs0-dev && \
|
|||||||
git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb && \
|
||||||
cd libxcb && \
|
cd libxcb && \
|
||||||
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
git reset --hard d34785a34f28fa6a00f8ce00d87e3132ff0f6467 && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
|
make -j$THREADS clean && \
|
||||||
|
rm /usr/local/lib/libxcb-xinerama.so && \
|
||||||
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
|
make -j$THREADS && \
|
||||||
|
cp src/.libs/libxcb-xinerama.a /usr/local/lib/ && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-util && \
|
RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-util && \
|
||||||
@@ -50,7 +56,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -61,7 +67,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -72,7 +78,7 @@ RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -83,7 +89,7 @@ RUN git clone -b 0.3.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -94,16 +100,16 @@ RUN git clone -b 0.4.1 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
git submodule init && \
|
git submodule init && \
|
||||||
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \
|
||||||
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y bison &&\
|
RUN apt install -y bison && \
|
||||||
git clone -b xkbcommon-0.5.0 --depth 1 https://github.com/xkbcommon/libxkbcommon && \
|
git clone -b xkbcommon-0.5.0 --depth 1 https://github.com/xkbcommon/libxkbcommon && \
|
||||||
cd libxkbcommon && \
|
cd libxkbcommon && \
|
||||||
git reset --hard c43c3c866eb9d52cd8f61e75cbef1c30d07f3a28 && \
|
git reset --hard c43c3c866eb9d52cd8f61e75cbef1c30d07f3a28 && \
|
||||||
./autogen.sh --prefix=/usr --disable-shared --enable-static --enable-x11 --disable-docs && \
|
./autogen.sh --prefix=/usr --enable-shared --disable-static --enable-x11 --disable-docs && \
|
||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
@@ -172,6 +178,9 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
|||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \
|
RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \
|
||||||
|
rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
||||||
|
rm /usr/lib/x86_64-linux-gnu/libXext.a && \
|
||||||
|
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.a && \
|
||||||
git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
|
||||||
cd qt5 && \
|
cd qt5 && \
|
||||||
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
|
git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \
|
||||||
@@ -227,22 +236,6 @@ RUN git clone -b hidapi-0.9.0 --depth 1 https://github.com/libusb/hidapi && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN git clone -b libX11-1.6.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libx11 && \
|
|
||||||
cd libx11 && \
|
|
||||||
git reset --hard db7cca17ad7807e92a928da9d4c68a00f4836da2 && \
|
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
|
||||||
make -j$THREADS && \
|
|
||||||
make -j$THREADS install && \
|
|
||||||
rm -rf $(pwd)
|
|
||||||
|
|
||||||
RUN git clone -b libXext-1.3.4 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxext && \
|
|
||||||
cd libxext && \
|
|
||||||
git reset --hard ebb167f34a3514783966775fb12573c4ed209625 && \
|
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
|
||||||
make -j$THREADS && \
|
|
||||||
make -j$THREADS install && \
|
|
||||||
rm -rf $(pwd)
|
|
||||||
|
|
||||||
RUN apt install -y libsodium-dev && \
|
RUN apt install -y libsodium-dev && \
|
||||||
git clone -b v4.3.2 --depth 1 https://github.com/zeromq/libzmq && \
|
git clone -b v4.3.2 --depth 1 https://github.com/zeromq/libzmq && \
|
||||||
cd libzmq && \
|
cd libzmq && \
|
||||||
|
|||||||
19
Makefile
19
Makefile
@@ -6,15 +6,20 @@ ifneq ($(dotgit), .git/config)
|
|||||||
USE_SINGLE_BUILDDIR=1
|
USE_SINGLE_BUILDDIR=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`)
|
builddir := build
|
||||||
|
topdir := ../..
|
||||||
ifeq ($(USE_SINGLE_BUILDDIR), OFF)
|
ifeq ($(USE_SINGLE_BUILDDIR), OFF)
|
||||||
builddir := build/"$(subbuilddir)"
|
os := $(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`)
|
||||||
topdir := ../../../..
|
builddir := $(builddir)/$(os)
|
||||||
deldirs := $(builddir)
|
topdir := $(topdir)/..
|
||||||
|
|
||||||
|
branch:=$(shell git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g')
|
||||||
|
builddir := $(builddir)/$(branch)
|
||||||
|
topdir := $(topdir)/..
|
||||||
|
|
||||||
|
deldirs := $(builddir)
|
||||||
else
|
else
|
||||||
builddir := build
|
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
||||||
topdir := ../..
|
|
||||||
deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
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
|
\* `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
|
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/)
|
1. Install Docker [https://docs.docker.com/engine/install/](https://docs.docker.com/engine/install/)
|
||||||
2. Clone the repository
|
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
|
3. Prepare build environment
|
||||||
```
|
```
|
||||||
cd monero-gui
|
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
|
\* `<MONERO_GUI_DIR_FULL_PATH>` - absolute path to `monero-gui` directory
|
||||||
\* `4` - number of CPU threads to use
|
\* `4` - number of CPU threads to use
|
||||||
5. Monero GUI Linux static binaries will be placed in `monero-gui/build/release/bin` directory
|
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*
|
### Building Android APK with Docker (any OS) *Experimental*
|
||||||
- Minimum Android 9 Pie (API 28)
|
- Minimum Android 9 Pie (API 28)
|
||||||
|
|||||||
@@ -30,30 +30,26 @@ import QtQuick 2.9
|
|||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
import "." as MoneroComponents
|
import "." as MoneroComponents
|
||||||
import "./effects/" as MoneroEffects
|
import "./effects/" as MoneroEffects
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: inlineButton
|
id: inlineButton
|
||||||
height: parent.height
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
|
|
||||||
property bool small: false
|
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 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 text: inlineText.text
|
||||||
property alias fontPixelSize: inlineText.font.pixelSize
|
property alias fontPixelSize: inlineText.font.pixelSize
|
||||||
property alias fontFamily: inlineText.font.family
|
property alias fontFamily: inlineText.font.family
|
||||||
|
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
||||||
property alias buttonColor: rect.color
|
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()
|
signal clicked()
|
||||||
|
|
||||||
function doClick() {
|
function doClick() {
|
||||||
@@ -64,20 +60,16 @@ Item {
|
|||||||
|
|
||||||
Rectangle{
|
Rectangle{
|
||||||
id: rect
|
id: rect
|
||||||
|
anchors.fill: parent
|
||||||
color: MoneroComponents.Style.buttonInlineBackgroundColor
|
color: MoneroComponents.Style.buttonInlineBackgroundColor
|
||||||
height: 24
|
|
||||||
width: inlineText.text ? (inlineText.width + 16) : inlineButton.icon ? (inlineImage.width + 16) : rect.height
|
|
||||||
radius: 4
|
radius: 4
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 4
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: inlineText
|
id: inlineText
|
||||||
font.family: MoneroComponents.Style.fontBold.name
|
font.family: MoneroComponents.Style.fontBold.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: inlineButton.fontSize
|
font.pixelSize: inlineButton.isFontAwesomeIcon ? 22 : inlineButton.small ? 14 : 16
|
||||||
color: inlineButton.textColor
|
color: inlineButton.textColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -90,13 +82,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
|
||||||
id: inlineImage
|
|
||||||
visible: inlineButton.icon !== ""
|
|
||||||
anchors.centerIn: parent
|
|
||||||
source: inlineButton.icon
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: buttonArea
|
id: buttonArea
|
||||||
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
cursorShape: rect.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
|
|||||||
@@ -131,9 +131,9 @@ Drawer {
|
|||||||
translationManager.setLanguage(locale_spl[0]);
|
translationManager.setLanguage(locale_spl[0]);
|
||||||
|
|
||||||
// set wizard language settings
|
// set wizard language settings
|
||||||
wizard.language_locale = locale;
|
persistentSettings.locale = locale;
|
||||||
wizard.language_wallet = wallet_language;
|
persistentSettings.language = display_name;
|
||||||
wizard.language_language = display_name;
|
persistentSettings.language_wallet = wallet_language;
|
||||||
|
|
||||||
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
appWindow.showStatusMessage(qsTr("Language changed."), 3);
|
||||||
appWindow.toggleLanguageView();
|
appWindow.toggleLanguageView();
|
||||||
|
|||||||
@@ -29,11 +29,15 @@
|
|||||||
import FontAwesome 1.0
|
import FontAwesome 1.0
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: item
|
id: item
|
||||||
|
|
||||||
|
default property alias content: inlineButtons.children
|
||||||
|
|
||||||
property alias input: input
|
property alias input: input
|
||||||
property alias text: input.text
|
property alias text: input.text
|
||||||
|
|
||||||
@@ -53,8 +57,6 @@ Item {
|
|||||||
property alias validator: input.validator
|
property alias validator: input.validator
|
||||||
property alias readOnly : input.readOnly
|
property alias readOnly : input.readOnly
|
||||||
property alias cursorPosition: input.cursorPosition
|
property alias cursorPosition: input.cursorPosition
|
||||||
property alias inlineButton: inlineButtonId
|
|
||||||
property alias inlineButtonText: inlineButtonId.text
|
|
||||||
property alias inlineIcon: inlineIcon.visible
|
property alias inlineIcon: inlineIcon.visible
|
||||||
property bool copyButton: false
|
property bool copyButton: false
|
||||||
property alias copyButtonText: copyButtonId.text
|
property alias copyButtonText: copyButtonId.text
|
||||||
@@ -94,6 +96,7 @@ Item {
|
|||||||
|
|
||||||
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
|
height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
|
||||||
|
|
||||||
|
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||||
onTextUpdated: {
|
onTextUpdated: {
|
||||||
// check to remove placeholder text when there is content
|
// check to remove placeholder text when there is content
|
||||||
if(item.isEmpty()){
|
if(item.isEmpty()){
|
||||||
@@ -234,9 +237,11 @@ Item {
|
|||||||
anchors.leftMargin: inlineIcon.visible ? 44 : 0
|
anchors.leftMargin: inlineIcon.visible ? 44 : 0
|
||||||
font.pixelSize: item.fontSize
|
font.pixelSize: item.fontSize
|
||||||
font.bold: item.fontBold
|
font.bold: item.fontBold
|
||||||
|
KeyNavigation.tab: item.KeyNavigation.tab
|
||||||
onEditingFinished: item.editingFinished()
|
onEditingFinished: item.editingFinished()
|
||||||
onAccepted: item.accepted();
|
onAccepted: item.accepted();
|
||||||
onTextChanged: item.textUpdated()
|
onTextChanged: item.textUpdated()
|
||||||
|
rightPadding: inlineButtons.width + 14
|
||||||
topPadding: 10
|
topPadding: 10
|
||||||
bottomPadding: 10
|
bottomPadding: 10
|
||||||
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
echoMode: isPasswordHidden() ? TextInput.Password : TextInput.Normal
|
||||||
@@ -260,13 +265,15 @@ Item {
|
|||||||
onClicked: passwordToggle()
|
onClicked: passwordToggle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
RowLayout {
|
||||||
id: inlineButtonId
|
id: inlineButtons
|
||||||
visible: item.inlineButtonText ? true : false
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.top: parent.top
|
||||||
anchors.rightMargin: 8
|
anchors.right: parent.right
|
||||||
|
anchors.margins: 4
|
||||||
|
spacing: 4
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,13 +36,15 @@ ColumnLayout {
|
|||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
default property alias content: inlineButtons.children
|
||||||
|
|
||||||
property alias text: input.text
|
property alias text: input.text
|
||||||
property alias labelText: inputLabel.text
|
property alias labelText: inputLabel.text
|
||||||
property alias labelButtonText: labelButton.text
|
property alias labelButtonText: labelButton.text
|
||||||
property alias placeholderText: placeholderLabel.text
|
property alias placeholderText: placeholderLabel.text
|
||||||
|
|
||||||
property int inputPaddingLeft: 10
|
property int inputPaddingLeft: 10
|
||||||
property int inputPaddingRight: 10
|
property alias inputPaddingRight: input.rightPadding
|
||||||
property int inputPaddingTop: 10
|
property int inputPaddingTop: 10
|
||||||
property int inputPaddingBottom: 10
|
property int inputPaddingBottom: 10
|
||||||
property int inputRadius: 4
|
property int inputRadius: 4
|
||||||
@@ -85,15 +87,12 @@ ColumnLayout {
|
|||||||
property alias addressValidation: input.addressValidation
|
property alias addressValidation: input.addressValidation
|
||||||
property string backgroundColor: "" // mock
|
property string backgroundColor: "" // mock
|
||||||
|
|
||||||
property alias inlineButton: inlineButtonId
|
|
||||||
property bool inlineButtonVisible: false
|
|
||||||
property alias inlineButton2: inlineButton2Id
|
|
||||||
property bool inlineButton2Visible: false
|
|
||||||
|
|
||||||
signal labelButtonClicked();
|
signal labelButtonClicked();
|
||||||
signal inputLabelLinkActivated();
|
signal inputLabelLinkActivated();
|
||||||
signal editingFinished();
|
signal editingFinished();
|
||||||
|
|
||||||
|
onActiveFocusChanged: activeFocus && input.forceActiveFocus()
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: inputLabelRect
|
id: inputLabelRect
|
||||||
@@ -159,10 +158,12 @@ ColumnLayout {
|
|||||||
id: input
|
id: input
|
||||||
readOnly: false
|
readOnly: false
|
||||||
addressValidation: false
|
addressValidation: false
|
||||||
|
KeyNavigation.priority: KeyNavigation.BeforeItem
|
||||||
|
KeyNavigation.tab: item.KeyNavigation.tab
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
leftPadding: item.inputPaddingLeft
|
leftPadding: item.inputPaddingLeft
|
||||||
rightPadding: item.inputPaddingRight
|
rightPadding: inlineButtons.width + 14
|
||||||
topPadding: item.inputPaddingTop
|
topPadding: item.inputPaddingTop
|
||||||
bottomPadding: item.inputPaddingBottom
|
bottomPadding: item.inputPaddingBottom
|
||||||
|
|
||||||
@@ -198,18 +199,12 @@ ColumnLayout {
|
|||||||
visible: !item.borderDisabled
|
visible: !item.borderDisabled
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
RowLayout {
|
||||||
id: inlineButtonId
|
id: inlineButtons
|
||||||
visible: (inlineButtonId.text || inlineButtonId.icon) && inlineButtonVisible ? true : false
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 8
|
anchors.margins: 4
|
||||||
}
|
spacing: 4
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
|
||||||
id: inlineButton2Id
|
|
||||||
visible: (inlineButton2Id.text || inlineButton2Id.icon) && inlineButton2Visible ? true : false
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: inlineButtonVisible ? 48 : 8
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Item {
|
|||||||
id: buttonRect
|
id: buttonRect
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 3
|
radius: 3
|
||||||
border.width: parent.focus ? 1 : 0
|
border.width: parent.focus && parent.enabled ? 1 : 0
|
||||||
|
|
||||||
state: button.enabled ? "active" : "disabled"
|
state: button.enabled ? "active" : "disabled"
|
||||||
Component.onCompleted: state = state
|
Component.onCompleted: state = state
|
||||||
@@ -76,7 +76,7 @@ Item {
|
|||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "hover"
|
name: "hover"
|
||||||
when: buttonArea.containsMouse || button.focus
|
when: button.enabled && (buttonArea.containsMouse || button.focus)
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: buttonRect
|
target: buttonRect
|
||||||
color: primary
|
color: primary
|
||||||
|
|||||||
@@ -45,20 +45,11 @@ Rectangle {
|
|||||||
radius: 10
|
radius: 10
|
||||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
focus: true
|
|
||||||
Keys.enabled: true
|
Keys.enabled: true
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
root.close()
|
root.close()
|
||||||
root.rejected()
|
root.rejected()
|
||||||
}
|
}
|
||||||
Keys.onEnterPressed: {
|
|
||||||
root.close()
|
|
||||||
root.accepted()
|
|
||||||
}
|
|
||||||
Keys.onReturnPressed: {
|
|
||||||
root.close()
|
|
||||||
root.accepted()
|
|
||||||
}
|
|
||||||
KeyNavigation.tab: doneButton
|
KeyNavigation.tab: doneButton
|
||||||
|
|
||||||
Clipboard { id: clipboard }
|
Clipboard { id: clipboard }
|
||||||
@@ -72,7 +63,6 @@ Rectangle {
|
|||||||
function open(txid) {
|
function open(txid) {
|
||||||
root.transactionID = txid;
|
root.transactionID = txid;
|
||||||
root.visible = true;
|
root.visible = true;
|
||||||
root.forceActiveFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
@@ -156,13 +146,6 @@ Rectangle {
|
|||||||
text: qsTr("Open folder") + translationManager.emptyString;
|
text: qsTr("Open folder") + translationManager.emptyString;
|
||||||
width: 200
|
width: 200
|
||||||
KeyNavigation.tab: doneButton
|
KeyNavigation.tab: doneButton
|
||||||
Keys.enabled: openFolderButton.visible
|
|
||||||
Keys.onReturnPressed: openFolderButton.onClicked
|
|
||||||
Keys.onEnterPressed: openFolderButton.onClicked
|
|
||||||
Keys.onEscapePressed: {
|
|
||||||
root.close()
|
|
||||||
root.rejected()
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.fileUrl))
|
oshelper.openContainingFolder(walletManager.urlToLocalPath(saveTxDialog.fileUrl))
|
||||||
}
|
}
|
||||||
@@ -172,15 +155,8 @@ Rectangle {
|
|||||||
id: doneButton
|
id: doneButton
|
||||||
text: qsTr("Done") + translationManager.emptyString;
|
text: qsTr("Done") + translationManager.emptyString;
|
||||||
width: 200
|
width: 200
|
||||||
focus: true
|
focus: root.visible
|
||||||
KeyNavigation.tab: openFolderButton
|
KeyNavigation.tab: openFolderButton
|
||||||
Keys.enabled: doneButton.visible
|
|
||||||
Keys.onReturnPressed: doneButton.onClicked
|
|
||||||
Keys.onEnterPressed: doneButton.onClicked
|
|
||||||
Keys.onEscapePressed: {
|
|
||||||
root.close()
|
|
||||||
root.rejected()
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
|||||||
@@ -45,33 +45,12 @@ Rectangle {
|
|||||||
radius: 10
|
radius: 10
|
||||||
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
border.color: MoneroComponents.Style.blackTheme ? Qt.rgba(255, 255, 255, 0.25) : Qt.rgba(0, 0, 0, 0.25)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
focus: true
|
|
||||||
Keys.enabled: true
|
Keys.enabled: true
|
||||||
Keys.onEscapePressed: {
|
Keys.onEscapePressed: {
|
||||||
root.close()
|
root.close()
|
||||||
root.clearFields()
|
root.clearFields()
|
||||||
root.rejected()
|
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
|
KeyNavigation.tab: confirmButton
|
||||||
|
|
||||||
property var transactionAmount: ""
|
property var transactionAmount: ""
|
||||||
@@ -101,7 +80,7 @@ Rectangle {
|
|||||||
PropertyChanges { target: bottomMessage; visible: false }
|
PropertyChanges { target: bottomMessage; visible: false }
|
||||||
PropertyChanges { target: buttons; visible: true }
|
PropertyChanges { target: buttons; visible: true }
|
||||||
PropertyChanges { target: backButton; visible: true; primary: false }
|
PropertyChanges { target: backButton; visible: true; primary: false }
|
||||||
PropertyChanges { target: confirmButton; visible: true }
|
PropertyChanges { target: confirmButton; visible: true; focus: true }
|
||||||
}, State {
|
}, State {
|
||||||
// error message being displayed, show only back button
|
// error message being displayed, show only back button
|
||||||
name: "error";
|
name: "error";
|
||||||
@@ -115,7 +94,7 @@ Rectangle {
|
|||||||
PropertyChanges { target: bottom; visible: true }
|
PropertyChanges { target: bottom; visible: true }
|
||||||
PropertyChanges { target: bottomMessage; visible: false }
|
PropertyChanges { target: bottomMessage; visible: false }
|
||||||
PropertyChanges { target: buttons; visible: true }
|
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 }
|
PropertyChanges { target: confirmButton; visible: false }
|
||||||
}, State {
|
}, State {
|
||||||
// creating or sending transaction, show tx details and don't show any button
|
// creating or sending transaction, show tx details and don't show any button
|
||||||
@@ -141,7 +120,6 @@ Rectangle {
|
|||||||
|
|
||||||
//clean previous error message
|
//clean previous error message
|
||||||
errorText.text = "";
|
errorText.text = "";
|
||||||
root.forceActiveFocus()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
@@ -422,17 +400,8 @@ Rectangle {
|
|||||||
id: backButton
|
id: backButton
|
||||||
text: qsTr("Back") + translationManager.emptyString;
|
text: qsTr("Back") + translationManager.emptyString;
|
||||||
width: 200
|
width: 200
|
||||||
focus: false
|
|
||||||
primary: false
|
primary: false
|
||||||
KeyNavigation.tab: confirmButton
|
KeyNavigation.tab: confirmButton
|
||||||
Keys.enabled: backButton.visible
|
|
||||||
Keys.onReturnPressed: backButton.onClicked
|
|
||||||
Keys.onEnterPressed: backButton.onClicked
|
|
||||||
Keys.onEscapePressed: {
|
|
||||||
root.close()
|
|
||||||
root.clearFields()
|
|
||||||
root.rejected()
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
root.clearFields()
|
root.clearFields()
|
||||||
@@ -445,16 +414,7 @@ Rectangle {
|
|||||||
text: qsTr("Confirm") + translationManager.emptyString;
|
text: qsTr("Confirm") + translationManager.emptyString;
|
||||||
rightIcon: "qrc:///images/rightArrow.png"
|
rightIcon: "qrc:///images/rightArrow.png"
|
||||||
width: 200
|
width: 200
|
||||||
focus: false
|
|
||||||
KeyNavigation.tab: backButton
|
KeyNavigation.tab: backButton
|
||||||
Keys.enabled: confirmButton.visible
|
|
||||||
Keys.onReturnPressed: confirmButton.onClicked
|
|
||||||
Keys.onEnterPressed: confirmButton.onClicked
|
|
||||||
Keys.onEscapePressed: {
|
|
||||||
root.close()
|
|
||||||
root.clearFields()
|
|
||||||
root.rejected()
|
|
||||||
}
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
|||||||
@@ -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*$/, '');
|
||||||
}
|
}
|
||||||
|
|||||||
40
main.qml
40
main.qml
@@ -233,12 +233,6 @@ ApplicationWindow {
|
|||||||
else
|
else
|
||||||
walletManager.setLogLevel(persistentSettings.logLevel)
|
walletManager.setLogLevel(persistentSettings.logLevel)
|
||||||
|
|
||||||
// setup language
|
|
||||||
var locale = persistentSettings.locale
|
|
||||||
if (locale !== "") {
|
|
||||||
translationManager.setLanguage(locale.split("_")[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reload transfer page with translations enabled
|
// Reload transfer page with translations enabled
|
||||||
middlePanel.transferView.onPageCompleted();
|
middlePanel.transferView.onPageCompleted();
|
||||||
|
|
||||||
@@ -958,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
|
||||||
@@ -1291,6 +1287,8 @@ ApplicationWindow {
|
|||||||
x = (Screen.width - width) / 2
|
x = (Screen.width - width) / 2
|
||||||
y = (Screen.height - maxWindowHeight) / 2
|
y = (Screen.height - maxWindowHeight) / 2
|
||||||
|
|
||||||
|
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);
|
||||||
|
|
||||||
applyWalletMode(persistentSettings.walletMode);
|
applyWalletMode(persistentSettings.walletMode);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -1336,6 +1334,25 @@ ApplicationWindow {
|
|||||||
appWindow.fiatApiRefresh();
|
appWindow.fiatApiRefresh();
|
||||||
appWindow.fiatTimerStart();
|
appWindow.fiatTimerStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (persistentSettings.askDesktopShortcut && !persistentSettings.portable) {
|
||||||
|
persistentSettings.askDesktopShortcut = false;
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroSettings {
|
MoneroSettings {
|
||||||
@@ -1346,8 +1363,10 @@ ApplicationWindow {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
property string language
|
property bool askDesktopShortcut: isLinux
|
||||||
property string locale
|
property string language: 'English (US)'
|
||||||
|
property string language_wallet: 'English'
|
||||||
|
property string locale: 'en_US'
|
||||||
property string account_name
|
property string account_name
|
||||||
property string wallet_path
|
property string wallet_path
|
||||||
property bool allow_background_mining : false
|
property bool allow_background_mining : false
|
||||||
@@ -1845,11 +1864,6 @@ ApplicationWindow {
|
|||||||
function toggleLanguageView(){
|
function toggleLanguageView(){
|
||||||
languageSidebar.isOpened ? languageSidebar.close() : languageSidebar.open();
|
languageSidebar.isOpened ? languageSidebar.close() : languageSidebar.open();
|
||||||
resetLanguageFields()
|
resetLanguageFields()
|
||||||
// update after changing language from settings page
|
|
||||||
if (persistentSettings.language != wizard.language_language) {
|
|
||||||
persistentSettings.language = wizard.language_language
|
|
||||||
persistentSettings.locale = wizard.language_locale
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
|
|||||||
2
monero
2
monero
Submodule monero updated: f690e4984d...36dfd41e01
@@ -132,7 +132,7 @@ Rectangle {
|
|||||||
delegate: Rectangle {
|
delegate: Rectangle {
|
||||||
id: tableItem2
|
id: tableItem2
|
||||||
height: addressBookListRow.addressBookListItemHeight
|
height: addressBookListRow.addressBookListItemHeight
|
||||||
width: parent.width
|
width: parent ? parent.width : undefined
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
@@ -314,16 +314,16 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inlineButton.text: FontAwesome.qrcode
|
MoneroComponents.InlineButton {
|
||||||
inlineButton.fontPixelSize: 22
|
buttonColor: MoneroComponents.Style.orange
|
||||||
inlineButton.fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamily
|
||||||
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
|
text: FontAwesome.qrcode
|
||||||
inlineButton.buttonColor: MoneroComponents.Style.orange
|
visible : appWindow.qrScannerEnabled && !addressLine.text
|
||||||
inlineButton.onClicked: {
|
onClicked: {
|
||||||
cameraUi.state = "Capture"
|
cameraUi.state = "Capture"
|
||||||
cameraUi.qrcode_decoded.connect(root.updateFromQrCode)
|
cameraUi.qrcode_decoded.connect(root.updateFromQrCode)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inlineButtonVisible : appWindow.qrScannerEnabled && !addressLine.text
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ Rectangle {
|
|||||||
image: "qrc:///images/whiteDropIndicator.png"
|
image: "qrc:///images/whiteDropIndicator.png"
|
||||||
fontAwesomeFallbackIcon: FontAwesome.arrowDown
|
fontAwesomeFallbackIcon: FontAwesome.arrowDown
|
||||||
fontAwesomeFallbackSize: 14
|
fontAwesomeFallbackSize: 14
|
||||||
rotation: sortAndFilter.collapsed ? 0 : 180
|
rotation: sortAndFilter.collapsed ? 180 : 0
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ Rectangle {
|
|||||||
addressLine.text = address
|
addressLine.text = address
|
||||||
setPaymentId(payment_id);
|
setPaymentId(payment_id);
|
||||||
amountLine.text = amount
|
amountLine.text = amount
|
||||||
setDescription(recipient_name + " " + tx_description);
|
setDescription((recipient_name ? recipient_name + " " : "") + tx_description);
|
||||||
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +170,8 @@ Rectangle {
|
|||||||
|
|
||||||
LineEditMulti {
|
LineEditMulti {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
|
KeyNavigation.tab: amountLine
|
||||||
spacing: 0
|
spacing: 0
|
||||||
inputPaddingRight: inlineButtonVisible && inlineButton2Visible ? 100 : 60
|
|
||||||
fontBold: true
|
fontBold: true
|
||||||
labelText: qsTr("Address") + translationManager.emptyString
|
labelText: qsTr("Address") + translationManager.emptyString
|
||||||
labelButtonText: qsTr("Resolve") + translationManager.emptyString
|
labelButtonText: qsTr("Resolve") + translationManager.emptyString
|
||||||
@@ -195,27 +195,25 @@ Rectangle {
|
|||||||
setDescription(parsed.tx_description);
|
setDescription(parsed.tx_description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
inlineButton.text: FontAwesome.addressBook
|
|
||||||
inlineButton.buttonHeight: 30
|
MoneroComponents.InlineButton {
|
||||||
inlineButton.fontPixelSize: 22
|
fontFamily: FontAwesome.fontFamily
|
||||||
inlineButton.fontFamily: FontAwesome.fontFamily
|
text: FontAwesome.addressBook
|
||||||
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
|
onClicked: {
|
||||||
inlineButton.onClicked: {
|
middlePanel.addressBookView.selectAndSend = true;
|
||||||
middlePanel.addressBookView.selectAndSend = true;
|
appWindow.showPageRequest("AddressBook");
|
||||||
appWindow.showPageRequest("AddressBook");
|
}
|
||||||
}
|
}
|
||||||
inlineButtonVisible: true
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
inlineButton2.text: FontAwesome.qrcode
|
fontFamily: FontAwesome.fontFamily
|
||||||
inlineButton2.buttonHeight: 30
|
text: FontAwesome.qrcode
|
||||||
inlineButton2.fontPixelSize: 22
|
visible: appWindow.qrScannerEnabled
|
||||||
inlineButton2.fontFamily: FontAwesome.fontFamily
|
onClicked: {
|
||||||
inlineButton2.textColor: MoneroComponents.Style.defaultFontColor
|
cameraUi.state = "Capture"
|
||||||
inlineButton2.onClicked: {
|
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
||||||
cameraUi.state = "Capture"
|
}
|
||||||
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
}
|
||||||
}
|
|
||||||
inlineButton2Visible: appWindow.qrScannerEnabled
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,6 +275,7 @@ Rectangle {
|
|||||||
// Amount input
|
// Amount input
|
||||||
LineEdit {
|
LineEdit {
|
||||||
id: amountLine
|
id: amountLine
|
||||||
|
KeyNavigation.tab: sendButton
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
inlineIcon: true
|
inlineIcon: true
|
||||||
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
labelText: "<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
||||||
@@ -293,10 +292,8 @@ Rectangle {
|
|||||||
placeholderText: "0.00"
|
placeholderText: "0.00"
|
||||||
width: 100
|
width: 100
|
||||||
fontBold: true
|
fontBold: true
|
||||||
inlineButtonText: qsTr("All") + translationManager.emptyString
|
|
||||||
inlineButton.onClicked: amountLine.text = "(all)"
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
amountLine.text = amountLine.text.replace(",", ".");
|
amountLine.text = amountLine.text.trim().replace(",", ".");
|
||||||
const match = amountLine.text.match(/^0+(\d.*)/);
|
const match = amountLine.text.match(/^0+(\d.*)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
const cursorPosition = amountLine.cursorPosition;
|
const cursorPosition = amountLine.cursorPosition;
|
||||||
@@ -310,10 +307,14 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
amountLine.error = walletManager.amountFromString(amountLine.text) > appWindow.getUnlockedBalance()
|
amountLine.error = walletManager.amountFromString(amountLine.text) > appWindow.getUnlockedBalance()
|
||||||
}
|
}
|
||||||
|
|
||||||
validator: RegExpValidator {
|
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 {
|
MoneroComponents.TextPlain {
|
||||||
@@ -488,6 +489,7 @@ Rectangle {
|
|||||||
RowLayout {
|
RowLayout {
|
||||||
StandardButton {
|
StandardButton {
|
||||||
id: sendButton
|
id: sendButton
|
||||||
|
KeyNavigation.tab: addressLine
|
||||||
rightIcon: "qrc:///images/rightArrow.png"
|
rightIcon: "qrc:///images/rightArrow.png"
|
||||||
rightIconInactive: "qrc:///images/rightArrowInactive.png"
|
rightIconInactive: "qrc:///images/rightArrowInactive.png"
|
||||||
Layout.topMargin: 4
|
Layout.topMargin: 4
|
||||||
|
|||||||
@@ -137,6 +137,14 @@ target_compile_definitions(monero-wallet-gui
|
|||||||
${Qt5Qml_DEFINITIONS}
|
${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}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||||
|
|
||||||
target_link_libraries(monero-wallet-gui
|
target_link_libraries(monero-wallet-gui
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -108,10 +108,6 @@ Q_IMPORT_PLUGIN(QTgaPlugin)
|
|||||||
Q_IMPORT_PLUGIN(QTiffPlugin)
|
Q_IMPORT_PLUGIN(QTiffPlugin)
|
||||||
Q_IMPORT_PLUGIN(QWbmpPlugin)
|
Q_IMPORT_PLUGIN(QWbmpPlugin)
|
||||||
Q_IMPORT_PLUGIN(QWebpPlugin)
|
Q_IMPORT_PLUGIN(QWebpPlugin)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
|
||||||
Q_IMPORT_PLUGIN(QtQmlPlugin)
|
|
||||||
#endif
|
|
||||||
Q_IMPORT_PLUGIN(QQmlDebuggerServiceFactory)
|
Q_IMPORT_PLUGIN(QQmlDebuggerServiceFactory)
|
||||||
Q_IMPORT_PLUGIN(QQmlInspectorServiceFactory)
|
Q_IMPORT_PLUGIN(QQmlInspectorServiceFactory)
|
||||||
Q_IMPORT_PLUGIN(QLocalClientConnectionFactory)
|
Q_IMPORT_PLUGIN(QLocalClientConnectionFactory)
|
||||||
@@ -124,6 +120,9 @@ Q_IMPORT_PLUGIN(QQmlDebugServerFactory)
|
|||||||
Q_IMPORT_PLUGIN(QTcpServerConnectionFactory)
|
Q_IMPORT_PLUGIN(QTcpServerConnectionFactory)
|
||||||
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
Q_IMPORT_PLUGIN(QGenericEnginePlugin)
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||||
|
Q_IMPORT_PLUGIN(QtQmlPlugin)
|
||||||
|
#endif
|
||||||
Q_IMPORT_PLUGIN(QtQuick2Plugin)
|
Q_IMPORT_PLUGIN(QtQuick2Plugin)
|
||||||
Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin)
|
Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin)
|
||||||
Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
|
Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
|
||||||
@@ -191,6 +190,12 @@ int main(int argc, char *argv[])
|
|||||||
// Turn off colors in monerod log output.
|
// Turn off colors in monerod log output.
|
||||||
qputenv("TERM", "goaway");
|
qputenv("TERM", "goaway");
|
||||||
|
|
||||||
|
#if defined(Q_OS_MACOS)
|
||||||
|
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
qputenv("QML_DISABLE_DISK_CACHE", "1");
|
||||||
|
|
||||||
MainApp app(argc, argv);
|
MainApp app(argc, argv);
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
@@ -306,11 +311,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Desktop entry
|
|
||||||
#ifdef Q_OS_LINUX
|
|
||||||
registerXdgMime(app);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
IPC *ipc = new IPC(&app);
|
IPC *ipc = new IPC(&app);
|
||||||
QStringList posArgs = parser.positionalArguments();
|
QStringList posArgs = parser.positionalArguments();
|
||||||
|
|
||||||
@@ -327,10 +327,6 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
// start listening
|
// start listening
|
||||||
QTimer::singleShot(0, ipc, SLOT(bind()));
|
QTimer::singleShot(0, ipc, SLOT(bind()));
|
||||||
|
|
||||||
#if defined(Q_OS_MACOS)
|
|
||||||
QDir::setCurrent(QDir(MacOSHelper::bundlePath() + QDir::separator() + "..").canonicalPath());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// screen settings
|
// screen settings
|
||||||
// Mobile is designed on 128dpi
|
// Mobile is designed on 128dpi
|
||||||
qreal ref_dpi = 128;
|
qreal ref_dpi = 128;
|
||||||
|
|||||||
@@ -46,11 +46,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
#undef Bool
|
||||||
#undef KeyPress
|
#undef KeyPress
|
||||||
#undef KeyRelease
|
#undef KeyRelease
|
||||||
#undef FocusIn
|
#undef FocusIn
|
||||||
#undef FocusOut
|
#undef FocusOut
|
||||||
// #undef those Xlib #defines that conflict with QEvent::Type enum
|
// #undef those Xlib #defines that conflict with QEvent::Type enum
|
||||||
|
#include "qt/utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#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
|
QString OSHelper::downloadLocation() const
|
||||||
{
|
{
|
||||||
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ class OSHelper : public QObject
|
|||||||
public:
|
public:
|
||||||
explicit OSHelper(QObject *parent = 0);
|
explicit OSHelper(QObject *parent = 0);
|
||||||
|
|
||||||
|
Q_INVOKABLE void createDesktopEntry() const;
|
||||||
Q_INVOKABLE QString downloadLocation() const;
|
Q_INVOKABLE QString downloadLocation() const;
|
||||||
Q_INVOKABLE bool openContainingFolder(const QString &filePath) const;
|
Q_INVOKABLE bool openContainingFolder(const QString &filePath) const;
|
||||||
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
|
Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const;
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
file(GLOB_RECURSE SOURCES *.cpp)
|
file(GLOB_RECURSE SOURCES *.cpp)
|
||||||
file(GLOB_RECURSE HEADERS *.h)
|
file(GLOB_RECURSE HEADERS *.h)
|
||||||
|
|
||||||
find_library(GCRYPT_LIBRARY gcrypt)
|
find_library(GCRYPT_LIBRARY gcrypt REQUIRED)
|
||||||
find_library(GPG_ERROR_LIBRARY gpg-error)
|
find_path(GCRYPT_INCLUDE_DIR gcrypt.h REQUIRED)
|
||||||
|
|
||||||
|
find_library(GPG_ERROR_LIBRARY gpg-error REQUIRED)
|
||||||
|
|
||||||
add_library(openpgp
|
add_library(openpgp
|
||||||
${SOURCES}
|
${SOURCES}
|
||||||
@@ -10,7 +12,8 @@ add_library(openpgp
|
|||||||
|
|
||||||
target_include_directories(openpgp
|
target_include_directories(openpgp
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include)
|
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include
|
||||||
|
${GCRYPT_INCLUDE_DIR})
|
||||||
|
|
||||||
target_link_libraries(openpgp
|
target_link_libraries(openpgp
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
@@ -179,13 +179,13 @@ bool MoneroSettings::portable() const
|
|||||||
return this->m_settings && this->m_settings->fileName() == portableFilePath();
|
return this->m_settings && this->m_settings->fileName() == portableFilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MoneroSettings::portableConfigExists() const
|
bool MoneroSettings::portableConfigExists()
|
||||||
{
|
{
|
||||||
QFileInfo info(portableFilePath());
|
QFileInfo info(portableFilePath());
|
||||||
return info.exists() && info.isFile();
|
return info.exists() && info.isFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MoneroSettings::portableFilePath() const
|
QString MoneroSettings::portableFilePath()
|
||||||
{
|
{
|
||||||
static QString filename(QDir(portableFolderName()).absoluteFilePath("settings.ini"));
|
static QString filename(QDir(portableFolderName()).absoluteFilePath("settings.ini"));
|
||||||
return filename;
|
return filename;
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public:
|
|||||||
Q_INVOKABLE void setWritable(bool enabled);
|
Q_INVOKABLE void setWritable(bool enabled);
|
||||||
|
|
||||||
static QString portableFolderName();
|
static QString portableFolderName();
|
||||||
|
static bool portableConfigExists();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void _q_propertyChanged();
|
void _q_propertyChanged();
|
||||||
@@ -84,8 +85,7 @@ private:
|
|||||||
void store();
|
void store();
|
||||||
|
|
||||||
bool portable() const;
|
bool portable() const;
|
||||||
bool portableConfigExists() const;
|
static QString portableFilePath();
|
||||||
QString portableFilePath() const;
|
|
||||||
std::unique_ptr<QSettings> portableSettings() const;
|
std::unique_ptr<QSettings> portableSettings() const;
|
||||||
std::unique_ptr<QSettings> unportableSettings() const;
|
std::unique_ptr<QSettings> unportableSettings() const;
|
||||||
void swap(std::unique_ptr<QSettings> newSettings);
|
void swap(std::unique_ptr<QSettings> newSettings);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <QtCore>
|
#include <QtCore>
|
||||||
#include <QApplication>
|
#include <QCoreApplication>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
#include "TailsOS.h"
|
#include "TailsOS.h"
|
||||||
@@ -88,7 +88,7 @@ QString getAccountName(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app){
|
QString xdgMime(){
|
||||||
return QString(
|
return QString(
|
||||||
"[Desktop Entry]\n"
|
"[Desktop Entry]\n"
|
||||||
"Name=Monero GUI\n"
|
"Name=Monero GUI\n"
|
||||||
@@ -105,32 +105,31 @@ QString xdgMime(QApplication &app){
|
|||||||
"StartupNotify=true\n"
|
"StartupNotify=true\n"
|
||||||
"X-GNOME-Bugzilla-Bugzilla=GNOME\n"
|
"X-GNOME-Bugzilla-Bugzilla=GNOME\n"
|
||||||
"X-GNOME-UsesNotifications=true\n"
|
"X-GNOME-UsesNotifications=true\n"
|
||||||
).arg(app.applicationFilePath());
|
).arg(QCoreApplication::applicationFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
void registerXdgMime(QApplication &app){
|
void registerXdgMime(){
|
||||||
// Register desktop entry
|
// Register desktop entry
|
||||||
// - MacOS handled via Info.plist
|
// - MacOS handled via Info.plist
|
||||||
// - Windows handled in the installer by rbrunner7
|
// - Windows handled in the installer by rbrunner7
|
||||||
// - Linux written to `QStandardPaths::ApplicationsLocation`
|
// - Linux written to `QStandardPaths::ApplicationsLocation`
|
||||||
// - Tails written to persistent dotfiles
|
// - Tails written to persistent dotfiles
|
||||||
QString mime = xdgMime(app);
|
QString mime = xdgMime();
|
||||||
QString appPath = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
|
QString appPath = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation);
|
||||||
QString filePath = QString("%1/monero-gui.desktop").arg(appPath);
|
QString filePath = QString("%1/monero-gui.desktop").arg(appPath);
|
||||||
|
|
||||||
if (TailsOS::detect() && TailsOS::detectDotPersistence() && TailsOS::usePersistence) {
|
if (TailsOS::detect())
|
||||||
TailsOS::persistXdgMime(filePath, mime);
|
{
|
||||||
return;
|
if (TailsOS::detectDotPersistence() && TailsOS::usePersistence)
|
||||||
|
{
|
||||||
|
TailsOS::persistXdgMime(filePath, mime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
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
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ QByteArray fileOpen(QString path);
|
|||||||
bool fileWrite(QString path, QString data);
|
bool fileWrite(QString path, QString data);
|
||||||
QString getAccountName();
|
QString getAccountName();
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
QString xdgMime(QApplication &app);
|
QString xdgMime();
|
||||||
void registerXdgMime(QApplication &app);
|
void registerXdgMime();
|
||||||
#endif
|
#endif
|
||||||
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)");
|
||||||
QString randomUserAgent();
|
QString randomUserAgent();
|
||||||
|
|||||||
@@ -107,11 +107,6 @@ Rectangle {
|
|||||||
property bool walletOptionsDeviceIsRestore: false
|
property bool walletOptionsDeviceIsRestore: false
|
||||||
property string tmpWalletFilename: ''
|
property string tmpWalletFilename: ''
|
||||||
|
|
||||||
// language settings, updated via sidebar
|
|
||||||
property string language_locale: 'en_US'
|
|
||||||
property string language_wallet: 'English'
|
|
||||||
property string language_language: 'English (US)'
|
|
||||||
|
|
||||||
// recovery made (restore wallet)
|
// recovery made (restore wallet)
|
||||||
property string walletRestoreMode: 'seed' // seed, keys, qr
|
property string walletRestoreMode: 'seed' // seed, keys, qr
|
||||||
|
|
||||||
@@ -333,7 +328,7 @@ Rectangle {
|
|||||||
console.log("Creating temporary wallet", tmp_wallet_filename)
|
console.log("Creating temporary wallet", tmp_wallet_filename)
|
||||||
var nettype = appWindow.persistentSettings.nettype;
|
var nettype = appWindow.persistentSettings.nettype;
|
||||||
var kdfRounds = appWindow.persistentSettings.kdfRounds;
|
var kdfRounds = appWindow.persistentSettings.kdfRounds;
|
||||||
var wallet = walletManager.createWallet(tmp_wallet_filename, "", wizardController.language_wallet, nettype, kdfRounds)
|
var wallet = walletManager.createWallet(tmp_wallet_filename, "", persistentSettings.language_wallet, nettype, kdfRounds)
|
||||||
|
|
||||||
wizardController.walletOptionsSeed = wallet.seed
|
wizardController.walletOptionsSeed = wallet.seed
|
||||||
|
|
||||||
@@ -364,9 +359,6 @@ Rectangle {
|
|||||||
wizardController.m_wallet.setPassword(wizardController.walletOptionsPassword);
|
wizardController.m_wallet.setPassword(wizardController.walletOptionsPassword);
|
||||||
|
|
||||||
// save to persistent settings
|
// save to persistent settings
|
||||||
persistentSettings.language = wizardController.language_language
|
|
||||||
persistentSettings.locale = wizardController.language_locale
|
|
||||||
|
|
||||||
persistentSettings.account_name = wizardController.walletOptionsName
|
persistentSettings.account_name = wizardController.walletOptionsName
|
||||||
persistentSettings.wallet_path = wizardController.m_wallet.path;
|
persistentSettings.wallet_path = wizardController.m_wallet.path;
|
||||||
persistentSettings.restore_height = (isNaN(walletOptionsRestoreHeight))? 0 : walletOptionsRestoreHeight
|
persistentSettings.restore_height = (isNaN(walletOptionsRestoreHeight))? 0 : walletOptionsRestoreHeight
|
||||||
@@ -404,7 +396,7 @@ Rectangle {
|
|||||||
if(wizardController.walletRestoreMode === 'seed')
|
if(wizardController.walletRestoreMode === 'seed')
|
||||||
wallet = walletManager.recoveryWallet(tmp_wallet_filename, wizardController.walletOptionsSeed, wizardController.walletOptionsSeedOffset, nettype, restoreHeight, kdfRounds);
|
wallet = walletManager.recoveryWallet(tmp_wallet_filename, wizardController.walletOptionsSeed, wizardController.walletOptionsSeedOffset, nettype, restoreHeight, kdfRounds);
|
||||||
else
|
else
|
||||||
wallet = walletManager.createWalletFromKeys(tmp_wallet_filename, wizardController.language_wallet, nettype,
|
wallet = walletManager.createWalletFromKeys(tmp_wallet_filename, persistentSettings.language_wallet, nettype,
|
||||||
wizardController.walletOptionsRecoverAddress, wizardController.walletOptionsRecoverViewkey,
|
wizardController.walletOptionsRecoverAddress, wizardController.walletOptionsRecoverViewkey,
|
||||||
wizardController.walletOptionsRecoverSpendkey, restoreHeight, kdfRounds)
|
wizardController.walletOptionsRecoverSpendkey, restoreHeight, kdfRounds)
|
||||||
|
|
||||||
|
|||||||
@@ -81,13 +81,16 @@ ColumnLayout {
|
|||||||
placeholderText: qsTr("Default") + translationManager.emptyString
|
placeholderText: qsTr("Default") + translationManager.emptyString
|
||||||
placeholderFontSize: 15
|
placeholderFontSize: 15
|
||||||
text: persistentSettings.blockchainDataDir
|
text: persistentSettings.blockchainDataDir
|
||||||
inlineButton.small: true
|
|
||||||
inlineButtonText: qsTr("Browse") + translationManager.emptyString
|
MoneroComponents.InlineButton {
|
||||||
inlineButton.onClicked: {
|
small: true
|
||||||
if(persistentSettings.blockchainDataDir != "");
|
text: qsTr("Browse") + translationManager.emptyString
|
||||||
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir;
|
onClicked: {
|
||||||
blockchainFileDialog.open();
|
if(persistentSettings.blockchainDataDir != "");
|
||||||
blockchainFolder.focus = true;
|
blockchainFileDialog.folder = "file://" + persistentSettings.blockchainDataDir;
|
||||||
|
blockchainFileDialog.open();
|
||||||
|
blockchainFolder.focus = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,10 +50,8 @@ Rectangle {
|
|||||||
if(wizardController.walletRestoreMode === "keys") {
|
if(wizardController.walletRestoreMode === "keys") {
|
||||||
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
return wizardWalletInput.verify() && wizardRestoreWallet1.verifyFromKeys();
|
||||||
} else if(wizardController.walletRestoreMode === "seed") {
|
} else if(wizardController.walletRestoreMode === "seed") {
|
||||||
valid = wizardWalletInput.verify();
|
seedInput.error = seedInput.text && !Wizard.checkSeed(seedInput.text);
|
||||||
if(!valid) return false;
|
return wizardWalletInput.verify() && seedInput.text && Wizard.checkSeed(seedInput.text);
|
||||||
valid = Wizard.checkSeed(seedInput.text);
|
|
||||||
return valid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -210,7 +208,7 @@ Rectangle {
|
|||||||
anchors.margins: 8
|
anchors.margins: 8
|
||||||
anchors.leftMargin: 10
|
anchors.leftMargin: 10
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
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
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
visible: !seedInput.text
|
visible: !seedInput.text
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ ColumnLayout {
|
|||||||
WizardSummaryItem {
|
WizardSummaryItem {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
header: qsTr("Language") + translationManager.emptyString
|
header: qsTr("Language") + translationManager.emptyString
|
||||||
value: wizardController.language_language
|
value: persistentSettings.language
|
||||||
}
|
}
|
||||||
|
|
||||||
WizardSummaryItem {
|
WizardSummaryItem {
|
||||||
|
|||||||
@@ -89,16 +89,19 @@ GridLayout {
|
|||||||
placeholderText: "..."
|
placeholderText: "..."
|
||||||
placeholderFontSize: 16
|
placeholderFontSize: 16
|
||||||
text: appWindow.accountsDir + "/"
|
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: {
|
onTextChanged: {
|
||||||
walletLocation.error = walletLocation.text === "";
|
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 {
|
FileDialog {
|
||||||
|
|||||||
Reference in New Issue
Block a user