forked from Public/monero-gui
Compare commits
104 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
937cb98256 | ||
|
|
9cfeba9ba1 | ||
|
|
e730e3ff63 | ||
|
|
6b580cbb00 | ||
|
|
cb33fe2fc0 | ||
|
|
bff6f7587f | ||
|
|
12a72970fb | ||
|
|
16e1d64b74 | ||
|
|
9dbad4745d | ||
|
|
0e7d1ab65b | ||
|
|
b69eff367c | ||
|
|
54ef114370 | ||
|
|
e984949aa7 | ||
|
|
25be9d5b9b | ||
|
|
46dec78806 | ||
|
|
c8c8736cf3 | ||
|
|
380c5b5588 | ||
|
|
9360de4ef8 | ||
|
|
138e164878 | ||
|
|
410ad22821 | ||
|
|
8d59880d02 | ||
|
|
7d340869fc | ||
|
|
755d218594 | ||
|
|
b304140720 | ||
|
|
a021b71261 | ||
|
|
a89ac67d59 | ||
|
|
426dc3fa47 | ||
|
|
947a70a638 | ||
|
|
9041e73345 | ||
|
|
ea01a536ce | ||
|
|
56f471b1b6 | ||
|
|
9a216682c8 | ||
|
|
e2e5a3919b | ||
|
|
adc7c02782 | ||
|
|
4c85aea7c3 | ||
|
|
5c2076daa1 | ||
|
|
578324348d | ||
|
|
dc3e35a928 | ||
|
|
0ee5259466 | ||
|
|
c3e88adc6d | ||
|
|
c368ce2776 | ||
|
|
2cda1fca69 | ||
|
|
dac0c04d20 | ||
|
|
ab5cb01510 | ||
|
|
bc528ccb77 | ||
|
|
ad6f26c8b4 | ||
|
|
db8c4edb08 | ||
|
|
837dd6184e | ||
|
|
51ece5fd00 | ||
|
|
b3ad95fdfc | ||
|
|
d2fc4e60c6 | ||
|
|
1ea38be404 | ||
|
|
d69b1e0520 | ||
|
|
c11e32f511 | ||
|
|
7558a23243 | ||
|
|
14b1476786 | ||
|
|
989f135d9a | ||
|
|
e13d49f43e | ||
|
|
4e67cd0014 | ||
|
|
db0485c600 | ||
|
|
1f904d4cff | ||
|
|
0a4b017697 | ||
|
|
0fb93061b1 | ||
|
|
bc1131ce41 | ||
|
|
5667526ef6 | ||
|
|
fe5992debd | ||
|
|
ca09151092 | ||
|
|
4ddc6b1c90 | ||
|
|
46bc94fbe8 | ||
|
|
842a9278d0 | ||
|
|
f57e115e99 | ||
|
|
beb566f11e | ||
|
|
2fcacd1e84 | ||
|
|
341b267852 | ||
|
|
398e28ed24 | ||
|
|
69a6c6b821 | ||
|
|
becc74714b | ||
|
|
820b221fa5 | ||
|
|
23f71e1959 | ||
|
|
684fd941fb | ||
|
|
9fc617956d | ||
|
|
02ae14fd6b | ||
|
|
a84d7bd2cb | ||
|
|
84b9264d1d | ||
|
|
0ae6435429 | ||
|
|
c47332e2f1 | ||
|
|
7dcd33f203 | ||
|
|
bed56137e3 | ||
|
|
62faf4d82e | ||
|
|
ba62f9c686 | ||
|
|
6f7192bb12 | ||
|
|
767b9e05b3 | ||
|
|
d60bbb72f7 | ||
|
|
c60252d3ce | ||
|
|
475f26398d | ||
|
|
8444a9563e | ||
|
|
2f41a6aecf | ||
|
|
61bb6d359f | ||
|
|
938a4fada4 | ||
|
|
142c6bc19f | ||
|
|
f53af12e02 | ||
|
|
990e92ba00 | ||
|
|
3a37364741 | ||
|
|
01c3c19653 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
|||||||
- name: install monero dependencies
|
- name: install monero dependencies
|
||||||
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler
|
||||||
- name: install monero gui dependencies
|
- name: install monero gui dependencies
|
||||||
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev libgcrypt20-dev xvfb
|
run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-platform qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev libgcrypt20-dev xvfb
|
||||||
- name: build
|
- name: build
|
||||||
run: DEV_MODE=ON make release -j3
|
run: DEV_MODE=ON make release -j3
|
||||||
- name: test qml
|
- name: test qml
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
|
|||||||
|
|
||||||
set(VERSION_MAJOR "17")
|
set(VERSION_MAJOR "17")
|
||||||
set(VERSION_MINOR "2")
|
set(VERSION_MINOR "2")
|
||||||
set(VERSION_REVISION "0")
|
set(VERSION_REVISION "2")
|
||||||
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")
|
||||||
@@ -58,16 +58,13 @@ if(NOT MANUAL_SUBMODULES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(monero)
|
add_subdirectory(monero)
|
||||||
|
add_subdirectory(external)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
set_property(TARGET wallet_merged PROPERTY FOLDER "monero")
|
|
||||||
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
get_directory_property(ARCH_WIDTH DIRECTORY "monero" DEFINITION ARCH_WIDTH)
|
||||||
get_directory_property(UNBOUND_LIBRARY DIRECTORY "monero" DEFINITION UNBOUND_LIBRARY)
|
|
||||||
get_directory_property(DEVICE_TREZOR_READY DIRECTORY "monero" DEFINITION DEVICE_TREZOR_READY)
|
|
||||||
get_directory_property(TREZOR_DEP_LIBS DIRECTORY "monero" DEFINITION TREZOR_DEP_LIBS)
|
|
||||||
|
|
||||||
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
add_definitions(-DQT_NO_DEBUG)
|
add_definitions(-DQT_NO_DEBUG)
|
||||||
@@ -140,18 +137,6 @@ endif()
|
|||||||
find_library(SODIUM_LIBRARY sodium)
|
find_library(SODIUM_LIBRARY sodium)
|
||||||
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
message(STATUS "libsodium: libraries at ${SODIUM_LIBRARY}")
|
||||||
|
|
||||||
# LibUSB
|
|
||||||
find_package(LibUSB)
|
|
||||||
message(STATUS "libusb: include dir at ${LibUSB_INCLUDE_DIRS}")
|
|
||||||
message(STATUS "libusb: libraries at ${LibUSB_LIBRARIES}")
|
|
||||||
|
|
||||||
# HIDApi
|
|
||||||
if(NOT ANDROID)
|
|
||||||
find_package(HIDAPI REQUIRED)
|
|
||||||
message(STATUS "libhidapi: include dir at ${HIDAPI_INCLUDE_DIRS}")
|
|
||||||
message(STATUS "libhidapi: libraries at ${HIDAPI_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Boost
|
# Boost
|
||||||
if(DEBUG)
|
if(DEBUG)
|
||||||
set(Boost_DEBUG ON)
|
set(Boost_DEBUG ON)
|
||||||
@@ -299,6 +284,7 @@ list(APPEND QT5_LIBRARIES
|
|||||||
if(STATIC)
|
if(STATIC)
|
||||||
set(QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/folderlistmodel)
|
set(QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/folderlistmodel)
|
||||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/settings)
|
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/settings)
|
||||||
|
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/Qt/labs/platform)
|
||||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects)
|
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects)
|
||||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects/private)
|
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects/private)
|
||||||
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtMultimedia)
|
list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtMultimedia)
|
||||||
@@ -324,6 +310,7 @@ if(STATIC)
|
|||||||
dialogsprivateplugin
|
dialogsprivateplugin
|
||||||
qmlfolderlistmodelplugin
|
qmlfolderlistmodelplugin
|
||||||
qmlsettingsplugin
|
qmlsettingsplugin
|
||||||
|
qtlabsplatformplugin
|
||||||
qmlxmllistmodelplugin
|
qmlxmllistmodelplugin
|
||||||
qquicklayoutsplugin
|
qquicklayoutsplugin
|
||||||
modelsplugin
|
modelsplugin
|
||||||
@@ -332,7 +319,7 @@ if(STATIC)
|
|||||||
if(WITH_SCANNER)
|
if(WITH_SCANNER)
|
||||||
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
list(APPEND QT5_EXTRA_LIBRARIES_LIST
|
||||||
declarative_multimedia
|
declarative_multimedia
|
||||||
Qt5MultimediaQuick_p
|
Qt5MultimediaQuick
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -479,7 +466,7 @@ if (NOT OPENBSD AND NOT (WIN32 AND (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE
|
|||||||
add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
|
add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
|
||||||
add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
|
add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
if (NOT WIN32 AND NOT OPENBSD)
|
if (NOT WIN32 AND NOT OPENBSD AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
|
add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
|
||||||
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
|
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
|
||||||
endif()
|
endif()
|
||||||
@@ -542,26 +529,5 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}")
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}")
|
||||||
|
|
||||||
if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
|
|
||||||
if (APPLE)
|
|
||||||
if(DEPENDS)
|
|
||||||
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
|
||||||
else()
|
|
||||||
find_library(COREFOUNDATION CoreFoundation)
|
|
||||||
find_library(IOKIT IOKit)
|
|
||||||
list(APPEND EXTRA_LIBRARIES ${IOKIT})
|
|
||||||
list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
|
||||||
find_library(VERSION_LIBRARY version PATHS /usr/x86_64-w64-mingw32/lib)
|
|
||||||
if(VERSION_LIBRARY STREQUAL "VERSION_LIBRARY-NOTFOUND")
|
|
||||||
set(VERSION_LIBRARY Version)
|
|
||||||
endif()
|
|
||||||
list(APPEND EXTRA_LIBRARIES setupapi ${VERSION_LIBRARY})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(external)
|
|
||||||
add_subdirectory(translations)
|
add_subdirectory(translations)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ RUN wget -q http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz
|
|||||||
ARG BOOST_VERSION=1_74_0
|
ARG BOOST_VERSION=1_74_0
|
||||||
ARG BOOST_VERSION_DOT=1.74.0
|
ARG BOOST_VERSION_DOT=1.74.0
|
||||||
ARG BOOST_HASH=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
|
ARG BOOST_HASH=83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
|
||||||
RUN wget -q https://dl.bintray.com/boostorg/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2 \
|
RUN wget -q https://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION_DOT}/boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
&& echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c \
|
||||||
&& tar -xf boost_${BOOST_VERSION}.tar.bz2 \
|
&& tar -xf boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
&& rm -f boost_${BOOST_VERSION}.tar.bz2 \
|
&& rm -f boost_${BOOST_VERSION}.tar.bz2 \
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ ENV CPPFLAGS="-fPIC"
|
|||||||
ENV CXXFLAGS="-fPIC"
|
ENV CXXFLAGS="-fPIC"
|
||||||
ENV SOURCE_DATE_EPOCH=1397818193
|
ENV SOURCE_DATE_EPOCH=1397818193
|
||||||
|
|
||||||
RUN apt update
|
RUN apt update && \
|
||||||
|
apt install -y automake autopoint bison gettext git gperf libgl1-mesa-dev libglib2.0-dev \
|
||||||
|
libpng12-dev libpthread-stubs0-dev libsodium-dev libtool-bin libudev-dev libusb-1.0-0-dev mesa-common-dev \
|
||||||
|
pkg-config python wget xutils-dev
|
||||||
|
|
||||||
RUN apt install -y automake git pkg-config python xutils-dev && \
|
RUN git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
||||||
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
|
|
||||||
cd xorgproto && \
|
cd xorgproto && \
|
||||||
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
@@ -27,8 +29,7 @@ RUN git clone -b 1.12 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xcbpro
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libtool-bin && \
|
RUN 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 --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
@@ -36,8 +37,7 @@ RUN apt install -y libtool-bin && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libpthread-stubs0-dev && \
|
RUN 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 --enable-shared --disable-static && \
|
./autogen.sh --enable-shared --disable-static && \
|
||||||
@@ -105,8 +105,7 @@ RUN git clone -b 0.4.1 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y bison && \
|
RUN 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 --enable-shared --disable-static --enable-x11 --disable-docs && \
|
./autogen.sh --prefix=/usr --enable-shared --disable-static --enable-x11 --disable-docs && \
|
||||||
@@ -140,8 +139,7 @@ RUN git clone -b R_2_2_9 --depth 1 https://github.com/libexpat/libexpat && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y autopoint gettext gperf libpng12-dev && \
|
RUN git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
||||||
git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fontconfig && \
|
|
||||||
cd fontconfig && \
|
cd fontconfig && \
|
||||||
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
git reset --hard b1df1101a643ae16cdfa1d83b939de2497b1bf27 && \
|
||||||
./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
./autogen.sh --disable-shared --enable-static --sysconfdir=/etc --localstatedir=/var && \
|
||||||
@@ -157,8 +155,7 @@ RUN git clone -b release-64-2 --depth 1 https://github.com/unicode-org/icu && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y wget && \
|
RUN wget https://downloads.sourceforge.net/project/boost/boost/1.73.0/boost_1_73_0.tar.gz && \
|
||||||
wget https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz && \
|
|
||||||
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" | sha256sum -c && \
|
echo "9995e192e68528793755692917f9eb6422f3052a53c5e13ba278a228af6c7acf boost_1_73_0.tar.gz" | sha256sum -c && \
|
||||||
tar -xzf boost_1_73_0.tar.gz && \
|
tar -xzf boost_1_73_0.tar.gz && \
|
||||||
rm boost_1_73_0.tar.gz && \
|
rm boost_1_73_0.tar.gz && \
|
||||||
@@ -177,8 +174,7 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \
|
|||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \
|
RUN rm /usr/lib/x86_64-linux-gnu/libX11.a && \
|
||||||
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/libXext.a && \
|
||||||
rm /usr/lib/x86_64-linux-gnu/libX11-xcb.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 && \
|
||||||
@@ -218,8 +214,7 @@ RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \
|
|||||||
cd ../../../.. && \
|
cd ../../../.. && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libudev-dev && \
|
RUN git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
||||||
git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb && \
|
|
||||||
cd libusb && \
|
cd libusb && \
|
||||||
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa && \
|
||||||
./autogen.sh --disable-shared --enable-static && \
|
./autogen.sh --disable-shared --enable-static && \
|
||||||
@@ -236,8 +231,7 @@ 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 apt install -y libsodium-dev && \
|
RUN 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 && \
|
||||||
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0 && \
|
||||||
./autogen.sh && \
|
./autogen.sh && \
|
||||||
@@ -280,5 +274,3 @@ RUN git clone -b v3.18.4 --depth 1 https://github.com/Kitware/CMake && \
|
|||||||
make -j$THREADS && \
|
make -j$THREADS && \
|
||||||
make -j$THREADS install && \
|
make -j$THREADS install && \
|
||||||
rm -rf $(pwd)
|
rm -rf $(pwd)
|
||||||
|
|
||||||
RUN apt install -y libusb-1.0-0-dev
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -31,7 +31,7 @@ endif
|
|||||||
default:
|
default:
|
||||||
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE)
|
||||||
debug:
|
debug:
|
||||||
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} .. && $(MAKE) VERBOSE=1
|
mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) -DMANUAL_SUBMODULES=${MANUAL_SUBMODULES} -D CMAKE_BUILD_TYPE=Debug .. && $(MAKE) VERBOSE=1
|
||||||
|
|
||||||
depends:
|
depends:
|
||||||
mkdir -p build/$(target)/release
|
mkdir -p build/$(target)/release
|
||||||
|
|||||||
@@ -116,6 +116,12 @@ Rectangle {
|
|||||||
transferView.sendTo(address, paymentId, description);
|
transferView.sendTo(address, paymentId, description);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open Transactions page with search term in search field
|
||||||
|
function searchInHistory(searchTerm){
|
||||||
|
root.state = "History";
|
||||||
|
historyView.searchInHistory(searchTerm);
|
||||||
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "History"
|
name: "History"
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ The following instructions will fetch Qt from your distribution's repositories i
|
|||||||
|
|
||||||
- For Ubuntu 17.10+
|
- For Ubuntu 17.10+
|
||||||
|
|
||||||
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev`
|
`sudo apt install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtqml-models2 qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-platform qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev`
|
||||||
|
|
||||||
- For Gentoo
|
- For Gentoo
|
||||||
|
|
||||||
|
|||||||
@@ -78,19 +78,19 @@ if(APPLE OR (WIN32 AND NOT STATIC))
|
|||||||
)
|
)
|
||||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
list(APPEND WIN_DEPLOY_DLLS
|
list(APPEND WIN_DEPLOY_DLLS
|
||||||
libicudtd67.dll
|
libicudtd68.dll
|
||||||
libicuind67.dll
|
libicuind68.dll
|
||||||
libicuiod67.dll
|
libicuiod68.dll
|
||||||
libicutud67.dll
|
libicutud68.dll
|
||||||
libicuucd67.dll
|
libicuucd68.dll
|
||||||
)
|
)
|
||||||
else() # assume release
|
else() # assume release
|
||||||
list(APPEND WIN_DEPLOY_DLLS
|
list(APPEND WIN_DEPLOY_DLLS
|
||||||
libicudt67.dll
|
libicudt68.dll
|
||||||
libicuin67.dll
|
libicuin68.dll
|
||||||
libicuio67.dll
|
libicuio68.dll
|
||||||
libicutu67.dll
|
libicutu68.dll
|
||||||
libicuuc67.dll
|
libicuuc68.dll
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
list(TRANSFORM WIN_DEPLOY_DLLS PREPEND "$ENV{MSYSTEM_PREFIX}/bin/")
|
list(TRANSFORM WIN_DEPLOY_DLLS PREPEND "$ENV{MSYSTEM_PREFIX}/bin/")
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
# - try to find HIDAPI library
|
|
||||||
# from http://www.signal11.us/oss/hidapi/
|
|
||||||
#
|
|
||||||
# Cache Variables: (probably not for direct use in your scripts)
|
|
||||||
# HIDAPI_INCLUDE_DIR
|
|
||||||
# HIDAPI_LIBRARY
|
|
||||||
#
|
|
||||||
# Non-cache variables you might use in your CMakeLists.txt:
|
|
||||||
# HIDAPI_FOUND
|
|
||||||
# HIDAPI_INCLUDE_DIRS
|
|
||||||
# HIDAPI_LIBRARIES
|
|
||||||
#
|
|
||||||
# Requires these CMake modules:
|
|
||||||
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
|
|
||||||
#
|
|
||||||
# Original Author:
|
|
||||||
# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
|
|
||||||
# http://academic.cleardefinition.com
|
|
||||||
# Iowa State University HCI Graduate Program/VRAC
|
|
||||||
#
|
|
||||||
# Copyright Iowa State University 2009-2010.
|
|
||||||
# Distributed under the Boost Software License, Version 1.0.
|
|
||||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
# http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
|
|
||||||
find_library(HIDAPI_LIBRARY
|
|
||||||
NAMES hidapi hidapi-libusb)
|
|
||||||
|
|
||||||
find_path(HIDAPI_INCLUDE_DIR
|
|
||||||
NAMES hidapi.h
|
|
||||||
PATH_SUFFIXES
|
|
||||||
hidapi)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(HIDAPI
|
|
||||||
DEFAULT_MSG
|
|
||||||
HIDAPI_LIBRARY
|
|
||||||
HIDAPI_INCLUDE_DIR)
|
|
||||||
|
|
||||||
if(HIDAPI_FOUND)
|
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}")
|
|
||||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
|
||||||
find_library(LIBUSB-1.0_LIBRARY usb-1.0)
|
|
||||||
find_library(LIBUDEV_LIBRARY udev)
|
|
||||||
if(LIBUSB-1.0_LIBRARY)
|
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}")
|
|
||||||
if(LIBUDEV_LIBRARY)
|
|
||||||
set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}")
|
|
||||||
else()
|
|
||||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(WARNING "libusb-1.0 library not found, binaries may fail to link.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
# - Find libusb for portable USB support
|
|
||||||
# This module will find libusb as published by
|
|
||||||
# http://libusb.sf.net and
|
|
||||||
# http://libusb-win32.sf.net
|
|
||||||
#
|
|
||||||
# It will use PkgConfig if present and supported, else search
|
|
||||||
# it on its own. If the LibUSB_ROOT_DIR environment variable
|
|
||||||
# is defined, it will be used as base path.
|
|
||||||
# The following standard variables get defined:
|
|
||||||
# LibUSB_FOUND: true if LibUSB was found
|
|
||||||
# LibUSB_HEADER_FILE: the location of the C header file
|
|
||||||
# LibUSB_INCLUDE_DIRS: the directory that contains the include file
|
|
||||||
# LibUSB_LIBRARIES: the library
|
|
||||||
# source: https://github.com/IntelRealSense/librealsense
|
|
||||||
|
|
||||||
include ( CheckLibraryExists )
|
|
||||||
include ( CheckIncludeFile )
|
|
||||||
|
|
||||||
find_package ( PkgConfig )
|
|
||||||
if ( PKG_CONFIG_FOUND )
|
|
||||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb-1.0 )
|
|
||||||
if ( NOT PKGCONFIG_LIBUSB_FOUND )
|
|
||||||
pkg_check_modules ( PKGCONFIG_LIBUSB libusb )
|
|
||||||
endif ( NOT PKGCONFIG_LIBUSB_FOUND )
|
|
||||||
endif ( PKG_CONFIG_FOUND )
|
|
||||||
|
|
||||||
if ( PKGCONFIG_LIBUSB_FOUND )
|
|
||||||
set ( LibUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS} )
|
|
||||||
foreach ( i ${PKGCONFIG_LIBUSB_LIBRARIES} )
|
|
||||||
string ( REGEX MATCH "[^-]*" ibase "${i}" )
|
|
||||||
find_library ( ${ibase}_LIBRARY
|
|
||||||
NAMES ${i}
|
|
||||||
PATHS ${PKGCONFIG_LIBUSB_LIBRARY_DIRS}
|
|
||||||
)
|
|
||||||
if ( ${ibase}_LIBRARY )
|
|
||||||
list ( APPEND LibUSB_LIBRARIES ${${ibase}_LIBRARY} )
|
|
||||||
endif ( ${ibase}_LIBRARY )
|
|
||||||
mark_as_advanced ( ${ibase}_LIBRARY )
|
|
||||||
endforeach ( i )
|
|
||||||
|
|
||||||
else ( PKGCONFIG_LIBUSB_FOUND )
|
|
||||||
find_file ( LibUSB_HEADER_FILE
|
|
||||||
NAMES
|
|
||||||
libusb.h usb.h
|
|
||||||
PATHS
|
|
||||||
$ENV{ProgramFiles}/LibUSB-Win32
|
|
||||||
$ENV{LibUSB_ROOT_DIR}
|
|
||||||
PATH_SUFFIXES
|
|
||||||
include
|
|
||||||
libusb-1.0
|
|
||||||
include/libusb-1.0
|
|
||||||
)
|
|
||||||
mark_as_advanced ( LibUSB_HEADER_FILE )
|
|
||||||
get_filename_component ( LibUSB_INCLUDE_DIRS "${LibUSB_HEADER_FILE}" PATH )
|
|
||||||
|
|
||||||
if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
|
||||||
# LibUSB-Win32 binary distribution contains several libs.
|
|
||||||
# Use the lib that got compiled with the same compiler.
|
|
||||||
if ( MSVC )
|
|
||||||
if ( WIN32 )
|
|
||||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc )
|
|
||||||
else ( WIN32 )
|
|
||||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/msvc_x64 )
|
|
||||||
endif ( WIN32 )
|
|
||||||
elseif ( BORLAND )
|
|
||||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/bcc )
|
|
||||||
elseif ( CMAKE_COMPILER_IS_GNUCC )
|
|
||||||
set ( LibUSB_LIBRARY_PATH_SUFFIX lib/gcc )
|
|
||||||
endif ( MSVC )
|
|
||||||
endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
|
|
||||||
|
|
||||||
find_library ( usb_LIBRARY
|
|
||||||
NAMES
|
|
||||||
usb-1.0 libusb usb
|
|
||||||
PATHS
|
|
||||||
$ENV{ProgramFiles}/LibUSB-Win32
|
|
||||||
$ENV{LibUSB_ROOT_DIR}
|
|
||||||
PATH_SUFFIXES
|
|
||||||
${LibUSB_LIBRARY_PATH_SUFFIX}
|
|
||||||
)
|
|
||||||
mark_as_advanced ( usb_LIBRARY )
|
|
||||||
if ( usb_LIBRARY )
|
|
||||||
set ( LibUSB_LIBRARIES ${usb_LIBRARY} )
|
|
||||||
endif ( usb_LIBRARY )
|
|
||||||
|
|
||||||
endif ( PKGCONFIG_LIBUSB_FOUND )
|
|
||||||
|
|
||||||
if ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
|
||||||
set ( LibUSB_FOUND true )
|
|
||||||
endif ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
|
|
||||||
|
|
||||||
if ( LibUSB_FOUND )
|
|
||||||
set ( CMAKE_REQUIRED_INCLUDES "${LibUSB_INCLUDE_DIRS}" )
|
|
||||||
check_include_file ( "${LibUSB_HEADER_FILE}" LibUSB_FOUND )
|
|
||||||
endif ( LibUSB_FOUND )
|
|
||||||
|
|
||||||
if ( LibUSB_FOUND )
|
|
||||||
check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
|
|
||||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
|
|
||||||
check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
|
|
||||||
|
|
||||||
if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
|
||||||
find_library(LIBUDEV_LIBRARY udev)
|
|
||||||
if(LIBUDEV_LIBRARY)
|
|
||||||
set(LibUSB_LIBRARIES "${LibUSB_LIBRARIES};${LIBUDEV_LIBRARY}")
|
|
||||||
else()
|
|
||||||
message(WARNING "libudev library not found, binaries may fail to link.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Library 1.0.16+ compilation test.
|
|
||||||
# The check_library_exists does not work well on Apple with shared libs.
|
|
||||||
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
|
|
||||||
if (APPLE)
|
|
||||||
if(DEPENDS)
|
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES "-framework Foundation -framework IOKit")
|
|
||||||
else()
|
|
||||||
find_library(COREFOUNDATION CoreFoundation)
|
|
||||||
find_library(IOKIT IOKit)
|
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${IOKIT})
|
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${COREFOUNDATION})
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
if (WIN32)
|
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES setupapi)
|
|
||||||
endif()
|
|
||||||
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
|
|
||||||
|
|
||||||
try_compile(LibUSB_COMPILE_TEST_PASSED
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
"${CMAKE_SOURCE_DIR}/cmake/test-libusb-version.c"
|
|
||||||
CMAKE_FLAGS
|
|
||||||
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
|
|
||||||
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
|
|
||||||
LINK_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES}
|
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
|
||||||
unset(TEST_COMPILE_EXTRA_LIBRARIES)
|
|
||||||
message(STATUS "LibUSB Compilation test: ${LibUSB_COMPILE_TEST_PASSED}")
|
|
||||||
endif()
|
|
||||||
endif ( LibUSB_FOUND )
|
|
||||||
|
|
||||||
if ( NOT LibUSB_FOUND )
|
|
||||||
if ( NOT LibUSB_FIND_QUIETLY )
|
|
||||||
message ( STATUS "LibUSB not found, try setting LibUSB_ROOT_DIR environment variable." )
|
|
||||||
endif ( NOT LibUSB_FIND_QUIETLY )
|
|
||||||
if ( LibUSB_FIND_REQUIRED )
|
|
||||||
message ( FATAL_ERROR "" )
|
|
||||||
endif ( LibUSB_FIND_REQUIRED )
|
|
||||||
endif ( NOT LibUSB_FOUND )
|
|
||||||
@@ -1,19 +1,17 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import FontAwesome 1.0
|
|
||||||
|
|
||||||
import "../components" as MoneroComponents
|
import "../components" as MoneroComponents
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: advancedOptionsItem
|
id: advancedOptionsItem
|
||||||
|
|
||||||
property alias title: title.text
|
property alias title: title.text
|
||||||
|
property alias tooltip: title.tooltip
|
||||||
property alias button1: button1
|
property alias button1: button1
|
||||||
property alias button2: button2
|
property alias button2: button2
|
||||||
property alias button3: button3
|
property alias button3: button3
|
||||||
property alias helpTextLarge: helpTextLarge
|
|
||||||
property alias helpTextSmall: helpTextSmall
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: titlecolumn
|
id: titlecolumn
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
||||||
@@ -26,22 +24,6 @@ RowLayout {
|
|||||||
fontSize: 14
|
fontSize: 14
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.Label {
|
|
||||||
id: iconLabel
|
|
||||||
fontSize: 12
|
|
||||||
text: FontAwesome.questionCircle
|
|
||||||
fontFamily: FontAwesome.fontFamily
|
|
||||||
opacity: 0.3
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
onClicked: helpText.visible = !helpText.visible
|
|
||||||
onEntered: parent.opacity = 0.4
|
|
||||||
onExited: parent.opacity = 0.3
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: separator
|
id: separator
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -78,29 +60,5 @@ RowLayout {
|
|||||||
visible: button3.text
|
visible: button3.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: helpText
|
|
||||||
visible: false
|
|
||||||
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: helpTextLarge
|
|
||||||
visible: helpTextLarge.text
|
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
|
||||||
font.pixelSize: 13
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
id: helpTextSmall
|
|
||||||
visible: helpTextSmall.text
|
|
||||||
Layout.leftMargin: 5
|
|
||||||
textFormat: Text.RichText
|
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
|
||||||
font.pixelSize: 12
|
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ Item {
|
|||||||
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 alias fontStyleName: inlineText.font.styleName
|
||||||
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
property bool isFontAwesomeIcon: fontFamily == FontAwesome.fontFamily || fontFamily == FontAwesome.fontFamilySolid
|
||||||
property alias buttonColor: rect.color
|
property alias buttonColor: rect.color
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import "../components" as MoneroComponents
|
|||||||
Item {
|
Item {
|
||||||
id: item
|
id: item
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
|
property alias tooltip: label.tooltip
|
||||||
property alias color: label.color
|
property alias color: label.color
|
||||||
property int textFormat: Text.PlainText
|
property int textFormat: Text.PlainText
|
||||||
property string tipText: ""
|
property string tipText: ""
|
||||||
|
|||||||
@@ -37,17 +37,6 @@ import QtQuick.Controls 2.0
|
|||||||
Drawer {
|
Drawer {
|
||||||
id: sideBar
|
id: sideBar
|
||||||
|
|
||||||
// @TODO: Qt 5.10 introduces `opened` built-in for Drawer
|
|
||||||
property bool isOpened: false
|
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
isOpened = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
onOpened: {
|
|
||||||
isOpened = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 240
|
width: 240
|
||||||
height: parent.height - (persistentSettings.customDecorations ? 50 : 0)
|
height: parent.height - (persistentSettings.customDecorations ? 50 : 0)
|
||||||
y: titleBar.height
|
y: titleBar.height
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool error: false
|
property alias error: input.error
|
||||||
|
|
||||||
property string labelFontColor: MoneroComponents.Style.defaultFontColor
|
property string labelFontColor: MoneroComponents.Style.defaultFontColor
|
||||||
property bool labelFontBold: false
|
property bool labelFontBold: false
|
||||||
@@ -176,7 +176,6 @@ ColumnLayout {
|
|||||||
fontColor: item.fontColor
|
fontColor: item.fontColor
|
||||||
mouseSelection: item.mouseSelection
|
mouseSelection: item.mouseSelection
|
||||||
onEditingFinished: item.editingFinished()
|
onEditingFinished: item.editingFinished()
|
||||||
error: item.error
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
id: placeholderLabel
|
id: placeholderLabel
|
||||||
|
|||||||
55
components/MenuBar.qml
Normal file
55
components/MenuBar.qml
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
// Copyright (c) 2014-2019, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import Qt.labs.platform 1.0 as PlatformLabs
|
||||||
|
import "." as MoneroComponents
|
||||||
|
|
||||||
|
PlatformLabs.MenuBar {
|
||||||
|
PlatformLabs.Menu {
|
||||||
|
title: qsTr("File")
|
||||||
|
PlatformLabs.MenuItem {
|
||||||
|
enabled: appWindow.viewState === "normal"
|
||||||
|
text: qsTr("Close Wallet")
|
||||||
|
onTriggered: appWindow.showWizard()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PlatformLabs.Menu {
|
||||||
|
title: qsTr("View")
|
||||||
|
PlatformLabs.MenuItem {
|
||||||
|
text: MoneroComponents.Style.blackTheme ? qsTr("Light Theme") : qsTr("Dark Theme")
|
||||||
|
onTriggered: {
|
||||||
|
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PlatformLabs.MenuItem {
|
||||||
|
text: qsTr("Change Language")
|
||||||
|
onTriggered: appWindow.toggleLanguageView();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -127,12 +127,13 @@ Rectangle {
|
|||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.minimumHeight: 30
|
Layout.minimumHeight: 30
|
||||||
|
Layout.fillWidth: true
|
||||||
color: items[index].active ? grid.borderColor : "transparent"
|
color: items[index].active ? grid.borderColor : "transparent"
|
||||||
height: children[0].height
|
implicitHeight: children[0].implicitHeight
|
||||||
width: children[0].width
|
implicitWidth: children[0].implicitWidth
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.centerIn: parent
|
||||||
font.family: grid.fontFamily
|
font.family: grid.fontFamily
|
||||||
font.pixelSize: grid.fontSize
|
font.pixelSize: grid.fontSize
|
||||||
font.bold: grid.fontBold
|
font.bold: grid.fontBold
|
||||||
|
|||||||
@@ -73,13 +73,12 @@ GridLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getAddress() {
|
function getAddress() {
|
||||||
|
if (!isValid()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
var addr = daemonAddr.text.trim();
|
var addr = daemonAddr.text.trim();
|
||||||
var port = daemonPort.text.trim();
|
var port = daemonPort.text.trim();
|
||||||
|
|
||||||
// validation
|
|
||||||
if(addr === "" || addr.length < 2) return "";
|
|
||||||
if(!Utils.isNumeric(port)) return "";
|
|
||||||
|
|
||||||
return addr + ":" + port;
|
return addr + ":" + port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
131
components/RemoteNodeList.qml
Normal file
131
components/RemoteNodeList.qml
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
// Copyright (c) 2021, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.9
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import FontAwesome 1.0
|
||||||
|
|
||||||
|
import "." as MoneroComponents
|
||||||
|
import "effects/" as MoneroEffects
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: remoteNodeList
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
MoneroComponents.CheckBox {
|
||||||
|
border: false
|
||||||
|
checkedIcon: FontAwesome.minusCircle
|
||||||
|
uncheckedIcon: FontAwesome.plusCircle
|
||||||
|
fontAwesomeIcons: true
|
||||||
|
fontSize: 16
|
||||||
|
iconOnTheLeft: true
|
||||||
|
text: qsTr("Add remote node") + translationManager.emptyString
|
||||||
|
toggleOnClick: false
|
||||||
|
onClicked: remoteNodeDialog.add(remoteNodesModel.append)
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: remoteNodesModel
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
height: 30
|
||||||
|
Layout.fillWidth: true
|
||||||
|
color: itemMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: MoneroComponents.Style.appWindowBorderColor
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
height: 1
|
||||||
|
visible: index > 0
|
||||||
|
|
||||||
|
MoneroEffects.ColorTransition {
|
||||||
|
targetObj: parent
|
||||||
|
blackColor: MoneroComponents.Style._b_appWindowBorderColor
|
||||||
|
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.rightMargin: 80
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 6
|
||||||
|
font.pixelSize: 16
|
||||||
|
text: address
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: itemMouseArea
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: remoteNodesModel.applyRemoteNode(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 6
|
||||||
|
height: 30
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
buttonColor: "transparent"
|
||||||
|
fontFamily: FontAwesome.fontFamily
|
||||||
|
fontPixelSize: 18
|
||||||
|
text: FontAwesome.edit
|
||||||
|
onClicked: remoteNodeDialog.edit(remoteNodesModel.get(index), function (remoteNode) {
|
||||||
|
remoteNodesModel.set(index, remoteNode)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.InlineButton {
|
||||||
|
buttonColor: "transparent"
|
||||||
|
fontFamily: FontAwesome.fontFamily
|
||||||
|
text: FontAwesome.times
|
||||||
|
visible: remoteNodesModel.count > 1
|
||||||
|
onClicked: remoteNodesModel.removeSelectNextIfNeeded(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -132,7 +132,7 @@ Rectangle {
|
|||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
|
|
||||||
// open folder / done buttons
|
// view progress / open folder / done buttons
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: buttons
|
id: buttons
|
||||||
spacing: 70
|
spacing: 70
|
||||||
@@ -140,6 +140,20 @@ Rectangle {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 50
|
Layout.preferredHeight: 50
|
||||||
|
|
||||||
|
MoneroComponents.StandardButton {
|
||||||
|
id: viewProgressButton
|
||||||
|
visible: !appWindow.viewOnly
|
||||||
|
text: qsTr("View progress") + translationManager.emptyString;
|
||||||
|
width: 200
|
||||||
|
primary: false
|
||||||
|
KeyNavigation.tab: doneButton
|
||||||
|
onClicked: {
|
||||||
|
doSearchInHistory(root.transactionID);
|
||||||
|
root.close()
|
||||||
|
root.rejected()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: openFolderButton
|
id: openFolderButton
|
||||||
visible: appWindow.viewOnly
|
visible: appWindow.viewOnly
|
||||||
@@ -156,7 +170,7 @@ Rectangle {
|
|||||||
text: qsTr("Done") + translationManager.emptyString;
|
text: qsTr("Done") + translationManager.emptyString;
|
||||||
width: 200
|
width: 200
|
||||||
focus: root.visible
|
focus: root.visible
|
||||||
KeyNavigation.tab: openFolderButton
|
KeyNavigation.tab: appWindow.viewOnly ? openFolderButton : viewProgressButton
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close()
|
root.close()
|
||||||
root.accepted()
|
root.accepted()
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Text {
|
|||||||
property bool themeTransition: true
|
property bool themeTransition: true
|
||||||
property string themeTransitionBlackColor: ""
|
property string themeTransitionBlackColor: ""
|
||||||
property string themeTransitionWhiteColor: ""
|
property string themeTransitionWhiteColor: ""
|
||||||
|
property alias tooltip: tooltip.text
|
||||||
font.family: MoneroComponents.Style.fontMedium.name
|
font.family: MoneroComponents.Style.fontMedium.name
|
||||||
font.bold: false
|
font.bold: false
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
@@ -25,4 +26,10 @@ Text {
|
|||||||
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
|
blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : MoneroComponents.Style._b_defaultFontColor
|
||||||
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
|
whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : MoneroComponents.Style._w_defaultFontColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.Tooltip {
|
||||||
|
id: tooltip
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.right
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,7 +173,6 @@ Rectangle {
|
|||||||
onExited: parent.color = "transparent"
|
onExited: parent.color = "transparent"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
||||||
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
92
components/Tooltip.qml
Normal file
92
components/Tooltip.qml
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
// Copyright (c) 2021, The Monero Project
|
||||||
|
//
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without modification, are
|
||||||
|
// permitted provided that the following conditions are met:
|
||||||
|
//
|
||||||
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||||
|
// conditions and the following disclaimer.
|
||||||
|
//
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||||
|
// of conditions and the following disclaimer in the documentation and/or other
|
||||||
|
// materials provided with the distribution.
|
||||||
|
//
|
||||||
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
||||||
|
// used to endorse or promote products derived from this software without specific
|
||||||
|
// prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||||
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||||
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||||
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
import QtQuick 2.9
|
||||||
|
import QtQuick.Controls 2.2
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
|
||||||
|
import FontAwesome 1.0
|
||||||
|
import "." as MoneroComponents
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
property alias text: tooltip.text
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
height: icon.height
|
||||||
|
width: icon.width
|
||||||
|
visible: text != ""
|
||||||
|
|
||||||
|
Text {
|
||||||
|
id: icon
|
||||||
|
color: MoneroComponents.Style.orange
|
||||||
|
font.family: FontAwesome.fontFamily
|
||||||
|
font.pixelSize: 10
|
||||||
|
font.styleName: "Regular"
|
||||||
|
leftPadding: 5
|
||||||
|
rightPadding: 5
|
||||||
|
text: FontAwesome.questionCircle
|
||||||
|
opacity: mouseArea.containsMouse ? 0.7 : 1
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: mouseArea
|
||||||
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
|
cursorShape: Qt.WhatsThisCursor
|
||||||
|
onEntered: popup.open()
|
||||||
|
onExited: popup.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Popup {
|
||||||
|
id: popup
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
border.color: MoneroComponents.Style.buttonInlineBackgroundColor
|
||||||
|
border.width: 1
|
||||||
|
color: MoneroComponents.Style.titleBarBackgroundGradientStart
|
||||||
|
radius: 4
|
||||||
|
}
|
||||||
|
closePolicy: Popup.NoAutoClose
|
||||||
|
padding: 10
|
||||||
|
x: icon.x + icon.width
|
||||||
|
y: icon.y - height
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Text {
|
||||||
|
id: tooltip
|
||||||
|
Layout.maximumWidth: 350
|
||||||
|
width: contentWidth > Layout.maximumWidth ? Layout.maximumWidth : contentWidth
|
||||||
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
|
font.pixelSize: 12
|
||||||
|
textFormat: Text.RichText
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -69,10 +69,7 @@ function walletPathExists(accountsDir, directory, filename, isIOS, walletManager
|
|||||||
if(!filename || filename === "") return false;
|
if(!filename || filename === "") return false;
|
||||||
if(!directory || directory === "") return false;
|
if(!directory || directory === "") return false;
|
||||||
|
|
||||||
// make sure directory endswith path seperator
|
if (!directory.endsWith("/") && !directory.endsWith("\\"))
|
||||||
// @TODO: use .endswith() after Qt 5.8
|
|
||||||
var trailing_path_sep = directory[directory.length-1];
|
|
||||||
if(trailing_path_sep !== "/" && trailing_path_sep !== "\\")
|
|
||||||
directory += "/"
|
directory += "/"
|
||||||
|
|
||||||
if(isIOS)
|
if(isIOS)
|
||||||
@@ -158,7 +155,7 @@ function getApproximateBlockchainHeight(_date, _nettype){
|
|||||||
|
|
||||||
if(_nettype == "Testnet"){
|
if(_nettype == "Testnet"){
|
||||||
// testnet got some huge rollbacks, so the estimation is way off
|
// testnet got some huge rollbacks, so the estimation is way off
|
||||||
var approximateTestnetRolledBackBlocks = 303967;
|
var approximateTestnetRolledBackBlocks = 342100;
|
||||||
if(approxBlockchainHeight > approximateTestnetRolledBackBlocks)
|
if(approxBlockchainHeight > approximateTestnetRolledBackBlocks)
|
||||||
approxBlockchainHeight -= approximateTestnetRolledBackBlocks
|
approxBlockchainHeight -= approximateTestnetRolledBackBlocks
|
||||||
}
|
}
|
||||||
|
|||||||
53
main.qml
53
main.qml
@@ -26,7 +26,7 @@
|
|||||||
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import QtQml.Models 2.12
|
import QtQml.Models 2.2
|
||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Window 2.0
|
import QtQuick.Window 2.0
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
@@ -73,7 +73,7 @@ ApplicationWindow {
|
|||||||
property int restoreHeight:0
|
property int restoreHeight:0
|
||||||
property bool daemonSynced: false
|
property bool daemonSynced: false
|
||||||
property bool walletSynced: false
|
property bool walletSynced: false
|
||||||
property int maxWindowHeight: (isAndroid || isIOS)? screenHeight : (screenHeight < 900)? 720 : 800;
|
property int maxWindowHeight: (isAndroid || isIOS)? screenAvailableHeight : (screenAvailableHeight < 900)? 720 : 800;
|
||||||
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
|
property bool daemonRunning: !persistentSettings.useRemoteNode && !disconnected
|
||||||
property int daemonStartStopInProgress: 0
|
property int daemonStartStopInProgress: 0
|
||||||
property alias toolTip: toolTip
|
property alias toolTip: toolTip
|
||||||
@@ -92,7 +92,7 @@ ApplicationWindow {
|
|||||||
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
readonly property string localDaemonAddress : "localhost:" + getDefaultDaemonRpcPort(persistentSettings.nettype)
|
||||||
property string currentDaemonAddress;
|
property string currentDaemonAddress;
|
||||||
property int disconnectedEpoch: 0
|
property int disconnectedEpoch: 0
|
||||||
property int estimatedBlockchainSize: 75 // GB
|
property int estimatedBlockchainSize: 105 // GB
|
||||||
property alias viewState: rootItem.state
|
property alias viewState: rootItem.state
|
||||||
property string prevSplashText;
|
property string prevSplashText;
|
||||||
property bool splashDisplayedBeforeButtonRequest;
|
property bool splashDisplayedBeforeButtonRequest;
|
||||||
@@ -127,8 +127,6 @@ ApplicationWindow {
|
|||||||
property var current_address_label: "Primary"
|
property var current_address_label: "Primary"
|
||||||
property int current_subaddress_table_index: 0
|
property int current_subaddress_table_index: 0
|
||||||
|
|
||||||
function altKeyReleased() { ctrlPressed = false; }
|
|
||||||
|
|
||||||
function showPageRequest(page) {
|
function showPageRequest(page) {
|
||||||
middlePanel.state = page
|
middlePanel.state = page
|
||||||
leftPanel.selectItem(page)
|
leftPanel.selectItem(page)
|
||||||
@@ -534,12 +532,6 @@ ApplicationWindow {
|
|||||||
// try to resolve common wallet cache errors automatically
|
// try to resolve common wallet cache errors automatically
|
||||||
switch (wallet.errorString) {
|
switch (wallet.errorString) {
|
||||||
case "basic_string::_M_replace_aux":
|
case "basic_string::_M_replace_aux":
|
||||||
walletManager.clearWalletCache(wallet.path);
|
|
||||||
walletPassword = passwordDialog.password;
|
|
||||||
appWindow.initialize();
|
|
||||||
console.error("Repairing wallet cache with error: ", wallet.errorString);
|
|
||||||
appWindow.showStatusMessage(qsTr("Repairing incompatible wallet cache. Resyncing wallet."),6);
|
|
||||||
return;
|
|
||||||
case "std::bad_alloc":
|
case "std::bad_alloc":
|
||||||
walletManager.clearWalletCache(wallet.path);
|
walletManager.clearWalletCache(wallet.path);
|
||||||
walletPassword = passwordDialog.password;
|
walletPassword = passwordDialog.password;
|
||||||
@@ -885,7 +877,7 @@ ApplicationWindow {
|
|||||||
return recipient.address;
|
return recipient.address;
|
||||||
});
|
});
|
||||||
const amountsxmr = recipients.map(function (recipient) {
|
const amountsxmr = recipients.map(function (recipient) {
|
||||||
return walletManager.amountFromString(recipient.amount);
|
return recipient.amount;
|
||||||
});
|
});
|
||||||
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
||||||
}
|
}
|
||||||
@@ -938,7 +930,7 @@ ApplicationWindow {
|
|||||||
// called after user confirms transaction
|
// called after user confirms transaction
|
||||||
function handleTransactionConfirmed(fileName) {
|
function handleTransactionConfirmed(fileName) {
|
||||||
// View only wallet - we save the tx
|
// View only wallet - we save the tx
|
||||||
if(viewOnly && saveTxDialog.fileUrl){
|
if(viewOnly){
|
||||||
// No file specified - abort
|
// No file specified - abort
|
||||||
if(!saveTxDialog.fileUrl) {
|
if(!saveTxDialog.fileUrl) {
|
||||||
currentWallet.disposeTransaction(transaction)
|
currentWallet.disposeTransaction(transaction)
|
||||||
@@ -983,6 +975,11 @@ ApplicationWindow {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doSearchInHistory(searchTerm) {
|
||||||
|
middlePanel.searchInHistory(searchTerm);
|
||||||
|
leftPanel.selectItem(middlePanel.state)
|
||||||
|
}
|
||||||
|
|
||||||
// called on "getProof"
|
// called on "getProof"
|
||||||
function handleGetProof(txid, address, message) {
|
function handleGetProof(txid, address, message) {
|
||||||
console.log("Getting payment proof: ")
|
console.log("Getting payment proof: ")
|
||||||
@@ -1070,12 +1067,6 @@ ApplicationWindow {
|
|||||||
informationPopup.open()
|
informationPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
// blocks UI if wallet can't be opened or no connection to the daemon
|
|
||||||
function enableUI(enable) {
|
|
||||||
middlePanel.enabled = enable;
|
|
||||||
leftPanel.enabled = enable;
|
|
||||||
}
|
|
||||||
|
|
||||||
function showProcessingSplash(message) {
|
function showProcessingSplash(message) {
|
||||||
console.log("Displaying processing splash")
|
console.log("Displaying processing splash")
|
||||||
if (typeof message != 'undefined') {
|
if (typeof message != 'undefined') {
|
||||||
@@ -1113,20 +1104,20 @@ ApplicationWindow {
|
|||||||
middlePanel.addressBookView.clearFields();
|
middlePanel.addressBookView.clearFields();
|
||||||
middlePanel.transferView.clearFields();
|
middlePanel.transferView.clearFields();
|
||||||
middlePanel.receiveView.clearFields();
|
middlePanel.receiveView.clearFields();
|
||||||
|
middlePanel.historyView.clearFields();
|
||||||
// disable timers
|
// disable timers
|
||||||
userInActivityTimer.running = false;
|
userInActivityTimer.running = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
objectName: "appWindow"
|
objectName: "appWindow"
|
||||||
visible: true
|
visible: true
|
||||||
width: Screen.desktopAvailableWidth > 980
|
width: screenAvailableWidth > 980
|
||||||
? 980
|
? 980
|
||||||
: Math.min(Screen.desktopAvailableWidth, 800)
|
: Math.min(screenAvailableWidth, 800)
|
||||||
height: Screen.desktopAvailableHeight > maxWindowHeight
|
height: screenAvailableHeight > maxWindowHeight
|
||||||
? maxWindowHeight
|
? maxWindowHeight
|
||||||
: Math.min(Screen.desktopAvailableHeight, 700)
|
: Math.min(screenAvailableHeight, 700)
|
||||||
color: MoneroComponents.Style.appWindowBackgroundColor
|
color: MoneroComponents.Style.appWindowBackgroundColor
|
||||||
flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
|
flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
|
||||||
|
|
||||||
@@ -1285,8 +1276,12 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
x = (Screen.desktopAvailableWidth - width) / 2;
|
if (screenAvailableWidth > width) {
|
||||||
y = (Screen.desktopAvailableHeight - height) / 2;
|
x = (screenAvailableWidth - width) / 2;
|
||||||
|
}
|
||||||
|
if (screenAvailableHeight > height) {
|
||||||
|
y = (screenAvailableHeight - height) / 2;
|
||||||
|
}
|
||||||
|
|
||||||
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);
|
translationManager.setLanguage(persistentSettings.locale.split("_")[0]);
|
||||||
|
|
||||||
@@ -1414,7 +1409,7 @@ ApplicationWindow {
|
|||||||
property bool lockOnUserInActivity: true
|
property bool lockOnUserInActivity: true
|
||||||
property int walletMode: 2
|
property int walletMode: 2
|
||||||
property int lockOnUserInActivityInterval: 10 // minutes
|
property int lockOnUserInActivityInterval: 10 // minutes
|
||||||
property bool blackTheme: true
|
property bool blackTheme: MoneroComponents.Style.blackTheme
|
||||||
property bool checkForUpdates: true
|
property bool checkForUpdates: true
|
||||||
property bool autosave: true
|
property bool autosave: true
|
||||||
property int autosaveMinutes: 10
|
property int autosaveMinutes: 10
|
||||||
@@ -1948,7 +1943,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function toggleLanguageView(){
|
function toggleLanguageView(){
|
||||||
languageSidebar.isOpened ? languageSidebar.close() : languageSidebar.open();
|
languageSidebar.visible ? languageSidebar.close() : languageSidebar.open();
|
||||||
resetLanguageFields()
|
resetLanguageFields()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2357,6 +2352,8 @@ ApplicationWindow {
|
|||||||
dragMargin: 0
|
dragMargin: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.MenuBar { }
|
||||||
|
|
||||||
Network {
|
Network {
|
||||||
id: network
|
id: network
|
||||||
proxyAddress: persistentSettings.getProxyAddress()
|
proxyAddress: persistentSettings.getProxyAddress()
|
||||||
|
|||||||
@@ -298,6 +298,8 @@ Rectangle {
|
|||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: renameButton
|
id: renameButton
|
||||||
image: "qrc:///images/edit.svg"
|
image: "qrc:///images/edit.svg"
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
Layout.preferredWidth: 23
|
Layout.preferredWidth: 23
|
||||||
@@ -309,6 +311,8 @@ Rectangle {
|
|||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: copyButton
|
id: copyButton
|
||||||
image: "qrc:///images/copy.svg"
|
image: "qrc:///images/copy.svg"
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
Layout.preferredWidth: 16
|
Layout.preferredWidth: 16
|
||||||
|
|||||||
@@ -588,6 +588,7 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
visible: !isFailed && !isPending
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 24
|
anchors.topMargin: 24
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -596,6 +597,19 @@ Rectangle {
|
|||||||
radius: 8
|
radius: 8
|
||||||
color: isout ? "#d85a00" : "#2eb358"
|
color: isout ? "#d85a00" : "#2eb358"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MoneroComponents.TextPlain {
|
||||||
|
visible: isFailed || isPending
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 24
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
font.family: FontAwesome.fontFamilySolid
|
||||||
|
font.styleName: isFailed ? "Solid" : ""
|
||||||
|
font.pixelSize: 15
|
||||||
|
text: isFailed ? FontAwesome.times : FontAwesome.clockO
|
||||||
|
color: isFailed ? "#FF0000" : MoneroComponents.Style.defaultFontColor
|
||||||
|
themeTransition: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -633,7 +647,7 @@ Rectangle {
|
|||||||
MoneroComponents.TextPlain {
|
MoneroComponents.TextPlain {
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: (isout ? qsTr("Sent") : qsTr("Received")) + translationManager.emptyString
|
text: (isout ? qsTr("Sent") : qsTr("Received")) + (isFailed ? " (" + qsTr("Failed") + ")" : (isPending ? " (" + qsTr("Pending") + ")" : "")) + translationManager.emptyString
|
||||||
color: MoneroComponents.Style.historyHeaderTextColor
|
color: MoneroComponents.Style.historyHeaderTextColor
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
themeTransitionBlackColor: MoneroComponents.Style._b_historyHeaderTextColor
|
||||||
@@ -764,12 +778,6 @@ Rectangle {
|
|||||||
font.pixelSize: 15
|
font.pixelSize: 15
|
||||||
text: {
|
text: {
|
||||||
if (isout) {
|
if (isout) {
|
||||||
if (isFailed) {
|
|
||||||
return qsTr("Failed") + translationManager.emptyString;
|
|
||||||
}
|
|
||||||
if (isPending) {
|
|
||||||
return qsTr("Waiting confirmation...") + translationManager.emptyString;
|
|
||||||
}
|
|
||||||
if (address) {
|
if (address) {
|
||||||
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
return (addressBookName ? FontAwesome.addressBook + " " + addressBookName : TxUtils.addressTruncate(address, 8));
|
||||||
}
|
}
|
||||||
@@ -1338,7 +1346,7 @@ Rectangle {
|
|||||||
checked: persistentSettings.historyHumanDates
|
checked: persistentSettings.historyHumanDates
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.historyHumanDates = !persistentSettings.historyHumanDates
|
persistentSettings.historyHumanDates = !persistentSettings.historyHumanDates
|
||||||
root.updateDisplay(root.txOffset, root.txMax, false);
|
root.updateDisplay(root.txOffset, root.txMax);
|
||||||
}
|
}
|
||||||
text: qsTr("Human readable date format") + translationManager.emptyString
|
text: qsTr("Human readable date format") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
@@ -1450,15 +1458,14 @@ Rectangle {
|
|||||||
root.updateDisplay(root.txOffset, root.txMax);
|
root.updateDisplay(root.txOffset, root.txMax);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDisplay(tx_offset, tx_max, auto_collapse) {
|
function updateDisplay(tx_offset, tx_max) {
|
||||||
if(typeof auto_collapse === 'undefined') auto_collapse = false;
|
|
||||||
txListViewModel.clear();
|
txListViewModel.clear();
|
||||||
|
|
||||||
// limit results as per tx_max (root.txMax)
|
// limit results as per tx_max (root.txMax)
|
||||||
var txs = root.txData.slice(tx_offset, tx_offset + tx_max);
|
var txs = root.txData.slice(tx_offset, tx_offset + tx_max);
|
||||||
|
|
||||||
// make first result on the first page collapsed by default
|
// collapse tx if there is a single result
|
||||||
if(auto_collapse && root.txPage === 1 && txs.length > 0 && (root.sortSearchString == null || root.sortSearchString === ""))
|
if(root.txPage === 1 && txs.length === 1)
|
||||||
root.txDataCollapsed.push(txs[0]['hash']);
|
root.txDataCollapsed.push(txs[0]['hash']);
|
||||||
|
|
||||||
// populate listview
|
// populate listview
|
||||||
@@ -1696,16 +1703,6 @@ Rectangle {
|
|||||||
+ translationManager.emptyString;
|
+ translationManager.emptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
function lookupPaymentID(paymentId) {
|
|
||||||
if (!addressBookModel)
|
|
||||||
return ""
|
|
||||||
var idx = addressBookModel.lookupPaymentID(paymentId)
|
|
||||||
if (idx < 0)
|
|
||||||
return ""
|
|
||||||
idx = addressBookModel.index(idx, 0)
|
|
||||||
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
|
|
||||||
}
|
|
||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: writeCSVFileDialog
|
id: writeCSVFileDialog
|
||||||
title: qsTr("Please choose a folder") + translationManager.emptyString
|
title: qsTr("Please choose a folder") + translationManager.emptyString
|
||||||
@@ -1755,10 +1752,22 @@ Rectangle {
|
|||||||
root.reset();
|
root.reset();
|
||||||
root.refresh();
|
root.refresh();
|
||||||
root.initialized = true;
|
root.initialized = true;
|
||||||
|
root.updateFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPageClosed(){
|
function onPageClosed(){
|
||||||
root.initialized = false;
|
root.initialized = false;
|
||||||
root.reset(true);
|
root.reset(true);
|
||||||
|
root.clearFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchInHistory(searchTerm){
|
||||||
|
searchInput.text = searchTerm;
|
||||||
|
sortAndFilter.collapsed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearFields() {
|
||||||
|
searchInput.text = "";
|
||||||
|
root.txDataCollapsed = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,8 @@ Rectangle {
|
|||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: renameButton
|
id: renameButton
|
||||||
image: "qrc:///images/edit.svg"
|
image: "qrc:///images/edit.svg"
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.edit
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
Layout.preferredWidth: 23
|
Layout.preferredWidth: 23
|
||||||
@@ -199,6 +201,8 @@ Rectangle {
|
|||||||
MoneroComponents.IconButton {
|
MoneroComponents.IconButton {
|
||||||
id: copyButton
|
id: copyButton
|
||||||
image: "qrc:///images/copy.svg"
|
image: "qrc:///images/copy.svg"
|
||||||
|
fontAwesomeFallbackIcon: FontAwesome.clipboard
|
||||||
|
fontAwesomeFallbackSize: 22
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
opacity: 0.5
|
opacity: 0.5
|
||||||
Layout.preferredWidth: 16
|
Layout.preferredWidth: 16
|
||||||
|
|||||||
@@ -273,7 +273,8 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
fontPixelSize: 18
|
fontPixelSize: 18
|
||||||
text: FontAwesome.desktop
|
text: FontAwesome.desktop
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -290,7 +291,8 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
fontFamily: FontAwesome.fontFamily
|
fontFamily: FontAwesome.fontFamilySolid
|
||||||
|
fontStyleName: "Solid"
|
||||||
text: FontAwesome.qrcode
|
text: FontAwesome.qrcode
|
||||||
visible: appWindow.qrScannerEnabled
|
visible: appWindow.qrScannerEnabled
|
||||||
onClicked: {
|
onClicked: {
|
||||||
@@ -348,11 +350,12 @@ Rectangle {
|
|||||||
KeyNavigation.backtab: index > 0 ? recipientRepeater.itemAt(index - 1).children[1].children[2] : sendButton
|
KeyNavigation.backtab: index > 0 ? recipientRepeater.itemAt(index - 1).children[1].children[2] : sendButton
|
||||||
KeyNavigation.tab: parent.children[2]
|
KeyNavigation.tab: parent.children[2]
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.topMargin: index > 0 ? recipientLayout.rowSpacing / 2 : 0
|
Layout.topMargin: recipientLayout.rowSpacing / 2
|
||||||
Layout.bottomMargin: recipientLayout.rowSpacing / 2
|
Layout.bottomMargin: recipientLayout.rowSpacing / 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
addressValidation: true
|
addressValidation: true
|
||||||
borderDisabled: true
|
borderDisabled: true
|
||||||
|
fontColor: error ? MoneroComponents.Style.errorColor : MoneroComponents.Style.defaultFontColor
|
||||||
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
fontFamily: MoneroComponents.Style.fontMonoRegular.name
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
inputPaddingBottom: 0
|
inputPaddingBottom: 0
|
||||||
@@ -857,21 +860,21 @@ Rectangle {
|
|||||||
console.log("Transfer: import key images clicked")
|
console.log("Transfer: import key images clicked")
|
||||||
importKeyImagesDialog.open();
|
importKeyImagesDialog.open();
|
||||||
}
|
}
|
||||||
helpTextLarge.text: qsTr("Required for view-only wallets to display the real balance") + translationManager.emptyString
|
tooltip: {
|
||||||
helpTextSmall.text: {
|
|
||||||
var errorMessage = "";
|
var errorMessage = "";
|
||||||
if (appWindow.viewOnly && !appWindow.isTrustedDaemon()){
|
if (appWindow.viewOnly && !appWindow.isTrustedDaemon()){
|
||||||
errorMessage = "<p class='orange'>" + qsTr("* To import, you must connect to a local node or a trusted remote node") + "</p>";
|
errorMessage = "<p class='orange'>" + qsTr("* To import, you must connect to a local node or a trusted remote node") + "</p>";
|
||||||
}
|
}
|
||||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
var header = qsTr("Required for view-only wallets to display the real balance") + translationManager.emptyString;
|
||||||
|
return "<style type='text/css'>.header{ font-size: 13px; } p{line-height:20px; margin-top:0px; margin-bottom:0px; " +
|
||||||
";} p.orange{color:#ff9323;}</style>" +
|
";} p.orange{color:#ff9323;}</style>" +
|
||||||
|
"<div class='header'>" + header + "</div>" +
|
||||||
"<p>" + qsTr("1. Using cold wallet, export the key images into a file") + "</p>" +
|
"<p>" + qsTr("1. Using cold wallet, export the key images into a file") + "</p>" +
|
||||||
"<p>" + qsTr("2. Using view-only wallet, import the key images file") + "</p>" +
|
"<p>" + qsTr("2. Using view-only wallet, import the key images file") + "</p>" +
|
||||||
errorMessage + translationManager.emptyString
|
errorMessage + translationManager.emptyString
|
||||||
}
|
}
|
||||||
helpTextSmall.themeTransition: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedOptionsItem {
|
AdvancedOptionsItem {
|
||||||
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
||||||
title: qsTr("Offline transaction signing") + translationManager.emptyString
|
title: qsTr("Offline transaction signing") + translationManager.emptyString
|
||||||
@@ -896,14 +899,15 @@ Rectangle {
|
|||||||
console.log("Transfer: submit tx clicked")
|
console.log("Transfer: submit tx clicked")
|
||||||
submitTxDialog.open();
|
submitTxDialog.open();
|
||||||
}
|
}
|
||||||
helpTextLarge.text: qsTr("Spend XMR from a cold (offline) wallet") + translationManager.emptyString
|
tooltip: {
|
||||||
helpTextSmall.text: {
|
|
||||||
var errorMessage = "";
|
var errorMessage = "";
|
||||||
if (appWindow.viewOnly && !pageRoot.checkInformation()) {
|
if (appWindow.viewOnly && !pageRoot.checkInformation()) {
|
||||||
errorMessage = "<p class='orange'>" + qsTr("* To create a transaction file, please enter address and amount above") + "</p>";
|
errorMessage = "<p class='orange'>" + qsTr("* To create a transaction file, please enter address and amount above") + "</p>";
|
||||||
}
|
}
|
||||||
return "<style type='text/css'>p{line-height:20px; margin-top:0px; margin-bottom:0px; color:" + MoneroComponents.Style.defaultFontColor +
|
var header = qsTr("Spend XMR from a cold (offline) wallet") + translationManager.emptyString;
|
||||||
|
return "<style type='text/css'>.header{ font-size: 13px; } p{line-height:20px; margin-top:0px; margin-bottom:0px; " +
|
||||||
";} p.orange{color:#ff9323;}</style>" +
|
";} p.orange{color:#ff9323;}</style>" +
|
||||||
|
"<div class='header'>" + header + "</div>" +
|
||||||
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
"<p>" + qsTr("1. Using view-only wallet, export the outputs into a file") + "</p>" +
|
||||||
"<p>" + qsTr("2. Using cold wallet, import the outputs file and export the key images") + "</p>" +
|
"<p>" + qsTr("2. Using cold wallet, import the outputs file and export the key images") + "</p>" +
|
||||||
"<p>" + qsTr("3. Using view-only wallet, import the key images file and create a transaction file") + "</p>" +
|
"<p>" + qsTr("3. Using view-only wallet, import the key images file and create a transaction file") + "</p>" +
|
||||||
@@ -911,7 +915,6 @@ Rectangle {
|
|||||||
"<p>" + qsTr("4. Using cold wallet, sign your transaction file") + "</p>" +
|
"<p>" + qsTr("4. Using cold wallet, sign your transaction file") + "</p>" +
|
||||||
"<p>" + qsTr("5. Using view-only wallet, submit your signed transaction") + "</p>" + translationManager.emptyString
|
"<p>" + qsTr("5. Using view-only wallet, submit your signed transaction") + "</p>" + translationManager.emptyString
|
||||||
}
|
}
|
||||||
helpTextSmall.themeTransition: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvancedOptionsItem {
|
AdvancedOptionsItem {
|
||||||
@@ -923,7 +926,7 @@ Rectangle {
|
|||||||
console.log("Transfer: sweepUnmixableClicked")
|
console.log("Transfer: sweepUnmixableClicked")
|
||||||
root.sweepUnmixableClicked()
|
root.sweepUnmixableClicked()
|
||||||
}
|
}
|
||||||
helpTextLarge.text: qsTr("Create a transaction that spends old unmovable outputs") + translationManager.emptyString
|
tooltip: qsTr("Create a transaction that spends old unmovable outputs") + translationManager.emptyString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ Item {
|
|||||||
|
|
||||||
function onPageCompleted() {
|
function onPageCompleted() {
|
||||||
if (appWindow.currentWallet) {
|
if (appWindow.currentWallet) {
|
||||||
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, 0)
|
appWindow.current_address = appWindow.currentWallet.address(appWindow.currentWallet.currentSubaddressAccount, appWindow.current_subaddress_table_index);
|
||||||
}
|
}
|
||||||
// prepare tracking
|
// prepare tracking
|
||||||
trackingCheckbox.checked = root.enableTracking
|
trackingCheckbox.checked = root.enableTracking
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ Rectangle {
|
|||||||
toggleOnClick: false
|
toggleOnClick: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
MoneroComponents.Style.blackTheme = !MoneroComponents.Style.blackTheme;
|
||||||
persistentSettings.blackTheme = MoneroComponents.Style.blackTheme;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -248,110 +248,16 @@ Rectangle{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
MoneroComponents.WarningBox {
|
||||||
id: remoteNodeLayout
|
Layout.topMargin: 46
|
||||||
anchors.margins: 0
|
text: qsTr("To find a remote node, type 'Monero remote node' into your favorite search engine. Please ensure the node is run by a trusted third-party.") + translationManager.emptyString
|
||||||
spacing: 20
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.topMargin: 20
|
|
||||||
visible: persistentSettings.useRemoteNode
|
visible: persistentSettings.useRemoteNode
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.WarningBox {
|
MoneroComponents.RemoteNodeList {
|
||||||
Layout.topMargin: 26
|
Layout.fillWidth: true
|
||||||
Layout.bottomMargin: 6
|
Layout.topMargin: 26
|
||||||
text: qsTr("To find a remote node, type 'Monero remote node' into your favorite search engine. Please ensure the node is run by a trusted third-party.") + translationManager.emptyString
|
visible: persistentSettings.useRemoteNode
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.CheckBox {
|
|
||||||
border: false
|
|
||||||
checkedIcon: FontAwesome.minusCircle
|
|
||||||
uncheckedIcon: FontAwesome.plusCircle
|
|
||||||
fontAwesomeIcons: true
|
|
||||||
fontSize: 16
|
|
||||||
iconOnTheLeft: true
|
|
||||||
text: qsTr("Add remote node") + translationManager.emptyString
|
|
||||||
toggleOnClick: false
|
|
||||||
onClicked: remoteNodeDialog.add(remoteNodesModel.append)
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: remoteNodesModel
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
height: 30
|
|
||||||
Layout.fillWidth: true
|
|
||||||
color: itemMouseArea.containsMouse || index === remoteNodesModel.selected ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
color: MoneroComponents.Style.appWindowBorderColor
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.top: parent.top
|
|
||||||
height: 1
|
|
||||||
visible: index > 0
|
|
||||||
|
|
||||||
MoneroEffects.ColorTransition {
|
|
||||||
targetObj: parent
|
|
||||||
blackColor: MoneroComponents.Style._b_appWindowBorderColor
|
|
||||||
whiteColor: MoneroComponents.Style._w_appWindowBorderColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.fill: parent
|
|
||||||
anchors.rightMargin: 80
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
MoneroComponents.TextPlain {
|
|
||||||
color: index === remoteNodesModel.selected ? MoneroComponents.Style.defaultFontColor : MoneroComponents.Style.dimmedFontColor
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 6
|
|
||||||
font.pixelSize: 16
|
|
||||||
text: address
|
|
||||||
themeTransition: false
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: itemMouseArea
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onClicked: remoteNodesModel.applyRemoteNode(index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.rightMargin: 6
|
|
||||||
height: 30
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
|
||||||
buttonColor: "transparent"
|
|
||||||
fontFamily: FontAwesome.fontFamily
|
|
||||||
fontPixelSize: 18
|
|
||||||
text: FontAwesome.edit
|
|
||||||
onClicked: remoteNodeDialog.edit(remoteNodesModel.get(index), function (remoteNode) {
|
|
||||||
remoteNodesModel.set(index, remoteNode)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
|
||||||
buttonColor: "transparent"
|
|
||||||
fontFamily: FontAwesome.fontFamily
|
|
||||||
text: FontAwesome.times
|
|
||||||
visible: remoteNodesModel.count > 1
|
|
||||||
onClicked: remoteNodesModel.removeSelectNextIfNeeded(index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|||||||
3
qml.qrc
3
qml.qrc
@@ -9,8 +9,10 @@
|
|||||||
<file>components/Navbar.qml</file>
|
<file>components/Navbar.qml</file>
|
||||||
<file>components/NavbarItem.qml</file>
|
<file>components/NavbarItem.qml</file>
|
||||||
<file>components/RemoteNodeDialog.qml</file>
|
<file>components/RemoteNodeDialog.qml</file>
|
||||||
|
<file>components/RemoteNodeList.qml</file>
|
||||||
<file>components/SettingsListItem.qml</file>
|
<file>components/SettingsListItem.qml</file>
|
||||||
<file>components/Slider.qml</file>
|
<file>components/Slider.qml</file>
|
||||||
|
<file>components/Tooltip.qml</file>
|
||||||
<file>components/UpdateDialog.qml</file>
|
<file>components/UpdateDialog.qml</file>
|
||||||
<file>images/whatIsIcon.png</file>
|
<file>images/whatIsIcon.png</file>
|
||||||
<file>images/whatIsIcon@2x.png</file>
|
<file>images/whatIsIcon@2x.png</file>
|
||||||
@@ -44,6 +46,7 @@
|
|||||||
<file>images/prevMonth.png</file>
|
<file>images/prevMonth.png</file>
|
||||||
<file>images/prevMonth@2x.png</file>
|
<file>images/prevMonth@2x.png</file>
|
||||||
<file>components/TitleBar.qml</file>
|
<file>components/TitleBar.qml</file>
|
||||||
|
<file>components/MenuBar.qml</file>
|
||||||
<file>images/resize.png</file>
|
<file>images/resize.png</file>
|
||||||
<file>images/resize@2x.png</file>
|
<file>images/resize@2x.png</file>
|
||||||
<file>images/resizeHovered.png</file>
|
<file>images/resizeHovered.png</file>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ file(GLOB SOURCE_FILES
|
|||||||
"libwalletqt/PendingTransaction.cpp"
|
"libwalletqt/PendingTransaction.cpp"
|
||||||
"libwalletqt/TransactionHistory.cpp"
|
"libwalletqt/TransactionHistory.cpp"
|
||||||
"libwalletqt/TransactionInfo.cpp"
|
"libwalletqt/TransactionInfo.cpp"
|
||||||
"libwalletqt/QRCodeImageProvider.cpp" QR
|
"libwalletqt/QRCodeImageProvider.cpp"
|
||||||
"libwalletqt/AddressBook.cpp"
|
"libwalletqt/AddressBook.cpp"
|
||||||
"libwalletqt/Subaddress.cpp"
|
"libwalletqt/Subaddress.cpp"
|
||||||
"libwalletqt/SubaddressAccount.cpp"
|
"libwalletqt/SubaddressAccount.cpp"
|
||||||
@@ -115,8 +115,6 @@ target_include_directories(monero-wallet-gui PUBLIC
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/model
|
${CMAKE_CURRENT_SOURCE_DIR}/model
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/QR-Code-scanner
|
${CMAKE_CURRENT_SOURCE_DIR}/QR-Code-scanner
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/zxcvbn-c
|
${CMAKE_CURRENT_SOURCE_DIR}/zxcvbn-c
|
||||||
${LibUSB_INCLUDE_DIRS}
|
|
||||||
${HIDAPI_INCLUDE_DIRS}
|
|
||||||
${X11_INCLUDE_DIR}
|
${X11_INCLUDE_DIR}
|
||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
${OPENSSL_INCLUDE_DIR}
|
${OPENSSL_INCLUDE_DIR}
|
||||||
@@ -139,21 +137,11 @@ 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
|
||||||
wallet_merged
|
|
||||||
${LMDB_LIBRARY}
|
|
||||||
epee
|
epee
|
||||||
|
wallet_api
|
||||||
qrcodegen
|
qrcodegen
|
||||||
${UNBOUND_LIBRARY}
|
|
||||||
${SODIUM_LIBRARY}
|
|
||||||
easylogging
|
easylogging
|
||||||
blockchain_db
|
|
||||||
randomx
|
|
||||||
hardforks
|
|
||||||
${Boost_LIBRARIES}
|
${Boost_LIBRARIES}
|
||||||
${OPENSSL_LIBRARIES}
|
|
||||||
${CMAKE_DL_LIBS}
|
|
||||||
${LibUSB_LIBRARIES}
|
|
||||||
${HIDAPI_LIBRARIES}
|
|
||||||
${QT5_LIBRARIES}
|
${QT5_LIBRARIES}
|
||||||
${EXTRA_LIBRARIES}
|
${EXTRA_LIBRARIES}
|
||||||
${ICU_LIBRARIES}
|
${ICU_LIBRARIES}
|
||||||
@@ -162,10 +150,6 @@ target_link_libraries(monero-wallet-gui
|
|||||||
translations
|
translations
|
||||||
)
|
)
|
||||||
|
|
||||||
if(DEVICE_TREZOR_READY)
|
|
||||||
target_link_libraries(monero-wallet-gui ${TREZOR_DEP_LIBS})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(X11_FOUND)
|
if(X11_FOUND)
|
||||||
target_link_libraries(monero-wallet-gui ${X11_LIBRARIES})
|
target_link_libraries(monero-wallet-gui ${X11_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -121,13 +121,6 @@ quint64 AddressBook::count() const
|
|||||||
return m_rows.size();
|
return m_rows.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int AddressBook::lookupPaymentID(const QString &payment_id) const
|
|
||||||
{
|
|
||||||
QReadLocker locker(&m_lock);
|
|
||||||
|
|
||||||
return m_addressBookImpl->lookupPaymentID(payment_id.toStdString());
|
|
||||||
}
|
|
||||||
|
|
||||||
QString AddressBook::getDescription(const QString &address) const
|
QString AddressBook::getDescription(const QString &address) const
|
||||||
{
|
{
|
||||||
QReadLocker locker(&m_lock);
|
QReadLocker locker(&m_lock);
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ public:
|
|||||||
quint64 count() const;
|
quint64 count() const;
|
||||||
Q_INVOKABLE QString errorString() const;
|
Q_INVOKABLE QString errorString() const;
|
||||||
Q_INVOKABLE int errorCode() const;
|
Q_INVOKABLE int errorCode() const;
|
||||||
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const;
|
|
||||||
Q_INVOKABLE QString getDescription(const QString &address) const;
|
Q_INVOKABLE QString getDescription(const QString &address) const;
|
||||||
|
|
||||||
enum ErrorCode {
|
enum ErrorCode {
|
||||||
|
|||||||
@@ -535,7 +535,7 @@ void Wallet::pauseRefresh()
|
|||||||
PendingTransaction *Wallet::createTransaction(
|
PendingTransaction *Wallet::createTransaction(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority)
|
PendingTransaction::Priority priority)
|
||||||
{
|
{
|
||||||
@@ -543,11 +543,15 @@ PendingTransaction *Wallet::createTransaction(
|
|||||||
for (const auto &address : destinationAddresses) {
|
for (const auto &address : destinationAddresses) {
|
||||||
destinations.push_back(address.toStdString());
|
destinations.push_back(address.toStdString());
|
||||||
}
|
}
|
||||||
|
std::vector<uint64_t> amounts;
|
||||||
|
for (const auto &amount : destinationAmounts) {
|
||||||
|
amounts.push_back(Monero::Wallet::amountFromString(amount.toStdString()));
|
||||||
|
}
|
||||||
std::set<uint32_t> subaddr_indices;
|
std::set<uint32_t> subaddr_indices;
|
||||||
Monero::PendingTransaction *ptImpl = m_walletImpl->createTransactionMultDest(
|
Monero::PendingTransaction *ptImpl = m_walletImpl->createTransactionMultDest(
|
||||||
destinations,
|
destinations,
|
||||||
payment_id.toStdString(),
|
payment_id.toStdString(),
|
||||||
std::vector<uint64_t>(amounts.begin(), amounts.end()),
|
amounts,
|
||||||
mixin_count,
|
mixin_count,
|
||||||
static_cast<Monero::PendingTransaction::Priority>(priority),
|
static_cast<Monero::PendingTransaction::Priority>(priority),
|
||||||
currentSubaddressAccount(),
|
currentSubaddressAccount(),
|
||||||
@@ -559,12 +563,12 @@ PendingTransaction *Wallet::createTransaction(
|
|||||||
void Wallet::createTransactionAsync(
|
void Wallet::createTransactionAsync(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority)
|
PendingTransaction::Priority priority)
|
||||||
{
|
{
|
||||||
m_scheduler.run([this, destinationAddresses, payment_id, amounts, mixin_count, priority] {
|
m_scheduler.run([this, destinationAddresses, payment_id, destinationAmounts, mixin_count, priority] {
|
||||||
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, amounts, mixin_count, priority);
|
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, destinationAmounts, mixin_count, priority);
|
||||||
emit transactionCreated(tx, destinationAddresses, payment_id, mixin_count);
|
emit transactionCreated(tx, destinationAddresses, payment_id, mixin_count);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -742,16 +746,6 @@ QString Wallet::integratedAddress(const QString &paymentId) const
|
|||||||
return QString::fromStdString(m_walletImpl->integratedAddress(paymentId.toStdString()));
|
return QString::fromStdString(m_walletImpl->integratedAddress(paymentId.toStdString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Wallet::paymentId() const
|
|
||||||
{
|
|
||||||
return m_paymentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Wallet::setPaymentId(const QString &paymentId)
|
|
||||||
{
|
|
||||||
m_paymentId = paymentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Wallet::getCacheAttribute(const QString &key) const {
|
QString Wallet::getCacheAttribute(const QString &key) const {
|
||||||
return QString::fromStdString(m_walletImpl->getCacheAttribute(key.toStdString()));
|
return QString::fromStdString(m_walletImpl->getCacheAttribute(key.toStdString()));
|
||||||
}
|
}
|
||||||
@@ -1086,9 +1080,9 @@ void Wallet::onPassphraseEntered(const QString &passphrase, bool enter_on_device
|
|||||||
Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, m_walletImpl(w)
|
, m_walletImpl(w)
|
||||||
, m_history(nullptr)
|
, m_history(new TransactionHistory(m_walletImpl->history(), this))
|
||||||
, m_historyModel(nullptr)
|
, m_historyModel(nullptr)
|
||||||
, m_addressBook(nullptr)
|
, m_addressBook(new AddressBook(m_walletImpl->addressBook(), this))
|
||||||
, m_addressBookModel(nullptr)
|
, m_addressBookModel(nullptr)
|
||||||
, m_daemonBlockChainHeight(0)
|
, m_daemonBlockChainHeight(0)
|
||||||
, m_daemonBlockChainHeightTtl(DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS)
|
, m_daemonBlockChainHeightTtl(DAEMON_BLOCKCHAIN_HEIGHT_CACHE_TTL_SECONDS)
|
||||||
@@ -1099,18 +1093,14 @@ Wallet::Wallet(Monero::Wallet *w, QObject *parent)
|
|||||||
, m_disconnected(true)
|
, m_disconnected(true)
|
||||||
, m_initialized(false)
|
, m_initialized(false)
|
||||||
, m_currentSubaddressAccount(0)
|
, m_currentSubaddressAccount(0)
|
||||||
, m_subaddress(nullptr)
|
, m_subaddress(new Subaddress(m_walletImpl->subaddress(), this))
|
||||||
, m_subaddressModel(nullptr)
|
, m_subaddressModel(nullptr)
|
||||||
, m_subaddressAccount(nullptr)
|
, m_subaddressAccount(new SubaddressAccount(m_walletImpl->subaddressAccount(), this))
|
||||||
, m_subaddressAccountModel(nullptr)
|
, m_subaddressAccountModel(nullptr)
|
||||||
, m_refreshEnabled(false)
|
, m_refreshEnabled(false)
|
||||||
, m_refreshing(false)
|
, m_refreshing(false)
|
||||||
, m_scheduler(this)
|
, m_scheduler(this)
|
||||||
{
|
{
|
||||||
m_history = new TransactionHistory(m_walletImpl->history(), this);
|
|
||||||
m_addressBook = new AddressBook(m_walletImpl->addressBook(), this);
|
|
||||||
m_subaddress = new Subaddress(m_walletImpl->subaddress(), this);
|
|
||||||
m_subaddressAccount = new SubaddressAccount(m_walletImpl->subaddressAccount(), this);
|
|
||||||
m_walletListener = new WalletListenerImpl(this);
|
m_walletListener = new WalletListenerImpl(this);
|
||||||
m_walletImpl->setListener(m_walletListener);
|
m_walletImpl->setListener(m_walletListener);
|
||||||
m_currentSubaddressAccount = getCacheAttribute(ATTRIBUTE_SUBADDRESS_ACCOUNT).toUInt();
|
m_currentSubaddressAccount = getCacheAttribute(ATTRIBUTE_SUBADDRESS_ACCOUNT).toUInt();
|
||||||
@@ -1133,17 +1123,6 @@ Wallet::~Wallet()
|
|||||||
m_walletImpl->stop();
|
m_walletImpl->stop();
|
||||||
m_scheduler.shutdownWaitForFinished();
|
m_scheduler.shutdownWaitForFinished();
|
||||||
|
|
||||||
delete m_addressBook;
|
|
||||||
m_addressBook = NULL;
|
|
||||||
|
|
||||||
delete m_history;
|
|
||||||
m_history = NULL;
|
|
||||||
delete m_addressBook;
|
|
||||||
m_addressBook = NULL;
|
|
||||||
delete m_subaddress;
|
|
||||||
m_subaddress = NULL;
|
|
||||||
delete m_subaddressAccount;
|
|
||||||
m_subaddressAccount = NULL;
|
|
||||||
//Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
//Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
||||||
if(status() == Status_Critical)
|
if(status() == Status_Critical)
|
||||||
qDebug("Not storing wallet cache");
|
qDebug("Not storing wallet cache");
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ class Wallet : public QObject, public PassprasePrompter
|
|||||||
Q_PROPERTY(bool synchronized READ synchronized)
|
Q_PROPERTY(bool synchronized READ synchronized)
|
||||||
Q_PROPERTY(QString errorString READ errorString)
|
Q_PROPERTY(QString errorString READ errorString)
|
||||||
Q_PROPERTY(TransactionHistory * history READ history)
|
Q_PROPERTY(TransactionHistory * history READ history)
|
||||||
Q_PROPERTY(QString paymentId READ paymentId WRITE setPaymentId)
|
|
||||||
Q_PROPERTY(TransactionHistorySortFilterModel * historyModel READ historyModel NOTIFY historyModelChanged)
|
Q_PROPERTY(TransactionHistorySortFilterModel * historyModel READ historyModel NOTIFY historyModelChanged)
|
||||||
Q_PROPERTY(QString path READ path)
|
Q_PROPERTY(QString path READ path)
|
||||||
Q_PROPERTY(AddressBookModel * addressBookModel READ addressBookModel)
|
Q_PROPERTY(AddressBookModel * addressBookModel READ addressBookModel)
|
||||||
@@ -220,7 +219,7 @@ public:
|
|||||||
Q_INVOKABLE void createTransactionAsync(
|
Q_INVOKABLE void createTransactionAsync(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority);
|
PendingTransaction::Priority priority);
|
||||||
|
|
||||||
@@ -298,11 +297,6 @@ public:
|
|||||||
//! Parse URI
|
//! Parse URI
|
||||||
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error);
|
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error);
|
||||||
|
|
||||||
//! saved payment id
|
|
||||||
QString paymentId() const;
|
|
||||||
|
|
||||||
void setPaymentId(const QString &paymentId);
|
|
||||||
|
|
||||||
//! Namespace your cacheAttribute keys to avoid collisions
|
//! Namespace your cacheAttribute keys to avoid collisions
|
||||||
Q_INVOKABLE bool setCacheAttribute(const QString &key, const QString &val);
|
Q_INVOKABLE bool setCacheAttribute(const QString &key, const QString &val);
|
||||||
Q_INVOKABLE QString getCacheAttribute(const QString &key) const;
|
Q_INVOKABLE QString getCacheAttribute(const QString &key) const;
|
||||||
@@ -421,7 +415,7 @@ private:
|
|||||||
PendingTransaction *createTransaction(
|
PendingTransaction *createTransaction(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority);
|
PendingTransaction::Priority priority);
|
||||||
|
|
||||||
@@ -443,7 +437,6 @@ private:
|
|||||||
// Used for UI history view
|
// Used for UI history view
|
||||||
mutable TransactionHistoryModel * m_historyModel;
|
mutable TransactionHistoryModel * m_historyModel;
|
||||||
mutable TransactionHistorySortFilterModel * m_historySortFilterModel;
|
mutable TransactionHistorySortFilterModel * m_historySortFilterModel;
|
||||||
QString m_paymentId;
|
|
||||||
AddressBook * m_addressBook;
|
AddressBook * m_addressBook;
|
||||||
mutable AddressBookModel * m_addressBookModel;
|
mutable AddressBookModel * m_addressBookModel;
|
||||||
mutable QElapsedTimer m_daemonBlockChainHeightTime;
|
mutable QElapsedTimer m_daemonBlockChainHeightTime;
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ Wallet *WalletManager::createWalletFromKeys(const QString &path, const QString &
|
|||||||
}
|
}
|
||||||
|
|
||||||
Wallet *WalletManager::createWalletFromDevice(const QString &path, const QString &password, NetworkType::Type nettype,
|
Wallet *WalletManager::createWalletFromDevice(const QString &path, const QString &password, NetworkType::Type nettype,
|
||||||
const QString &deviceName, quint64 restoreHeight, const QString &subaddressLookahead)
|
const QString &deviceName, quint64 restoreHeight, const QString &subaddressLookahead, quint64 kdfRounds)
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&m_mutex);
|
QMutexLocker locker(&m_mutex);
|
||||||
WalletPassphraseListenerImpl tmpListener(this);
|
WalletPassphraseListenerImpl tmpListener(this);
|
||||||
@@ -187,7 +187,7 @@ Wallet *WalletManager::createWalletFromDevice(const QString &path, const QString
|
|||||||
m_currentWallet = NULL;
|
m_currentWallet = NULL;
|
||||||
}
|
}
|
||||||
Monero::Wallet * w = m_pimpl->createWalletFromDevice(path.toStdString(), password.toStdString(), static_cast<Monero::NetworkType>(nettype),
|
Monero::Wallet * w = m_pimpl->createWalletFromDevice(path.toStdString(), password.toStdString(), static_cast<Monero::NetworkType>(nettype),
|
||||||
deviceName.toStdString(), restoreHeight, subaddressLookahead.toStdString(), 1, &tmpListener);
|
deviceName.toStdString(), restoreHeight, subaddressLookahead.toStdString(), kdfRounds, &tmpListener);
|
||||||
w->setListener(nullptr);
|
w->setListener(nullptr);
|
||||||
|
|
||||||
m_currentWallet = new Wallet(w);
|
m_currentWallet = new Wallet(w);
|
||||||
@@ -202,10 +202,10 @@ Wallet *WalletManager::createWalletFromDevice(const QString &path, const QString
|
|||||||
|
|
||||||
|
|
||||||
void WalletManager::createWalletFromDeviceAsync(const QString &path, const QString &password, NetworkType::Type nettype,
|
void WalletManager::createWalletFromDeviceAsync(const QString &path, const QString &password, NetworkType::Type nettype,
|
||||||
const QString &deviceName, quint64 restoreHeight, const QString &subaddressLookahead)
|
const QString &deviceName, quint64 restoreHeight, const QString &subaddressLookahead, quint64 kdfRounds)
|
||||||
{
|
{
|
||||||
m_scheduler.run([this, path, password, nettype, deviceName, restoreHeight, subaddressLookahead] {
|
m_scheduler.run([this, path, password, nettype, deviceName, restoreHeight, subaddressLookahead, kdfRounds] {
|
||||||
Wallet *wallet = createWalletFromDevice(path, password, nettype, deviceName, restoreHeight, subaddressLookahead);
|
Wallet *wallet = createWalletFromDevice(path, password, nettype, deviceName, restoreHeight, subaddressLookahead, kdfRounds);
|
||||||
emit walletCreated(wallet);
|
emit walletCreated(wallet);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,14 +103,16 @@ public:
|
|||||||
NetworkType::Type nettype,
|
NetworkType::Type nettype,
|
||||||
const QString &deviceName,
|
const QString &deviceName,
|
||||||
quint64 restoreHeight = 0,
|
quint64 restoreHeight = 0,
|
||||||
const QString &subaddressLookahead = "");
|
const QString &subaddressLookahead = "",
|
||||||
|
quint64 kdfRounds = 1);
|
||||||
|
|
||||||
Q_INVOKABLE void createWalletFromDeviceAsync(const QString &path,
|
Q_INVOKABLE void createWalletFromDeviceAsync(const QString &path,
|
||||||
const QString &password,
|
const QString &password,
|
||||||
NetworkType::Type nettype,
|
NetworkType::Type nettype,
|
||||||
const QString &deviceName,
|
const QString &deviceName,
|
||||||
quint64 restoreHeight = 0,
|
quint64 restoreHeight = 0,
|
||||||
const QString &subaddressLookahead = "");
|
const QString &subaddressLookahead = "",
|
||||||
|
quint64 kdfRounds = 1);
|
||||||
/*!
|
/*!
|
||||||
* \brief closeWallet - closes current open wallet and frees memory
|
* \brief closeWallet - closes current open wallet and frees memory
|
||||||
* \return wallet address
|
* \return wallet address
|
||||||
|
|||||||
@@ -27,14 +27,9 @@
|
|||||||
// 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 "filter.h"
|
#include "filter.h"
|
||||||
#include <QtGlobal>
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#ifdef QT_DEBUG
|
|
||||||
#include "private/qabstractanimation_p.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
filter::filter(QObject *parent) :
|
filter::filter(QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -91,21 +86,6 @@ bool filter::eventFilter(QObject *obj, QEvent *ev) {
|
|||||||
case QEvent::KeyRelease: {
|
case QEvent::KeyRelease: {
|
||||||
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
QKeyEvent *ke = static_cast<QKeyEvent*>(ev);
|
||||||
|
|
||||||
#ifdef QT_DEBUG
|
|
||||||
if(ke->key() == Qt::Key_F9){
|
|
||||||
QUnifiedTimer::instance()->setSlowModeEnabled(true);
|
|
||||||
QUnifiedTimer::instance()->setSlowdownFactor(10);
|
|
||||||
qDebug() << "Slow animations enabled";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ke->key() == Qt::Key_F10){
|
|
||||||
QUnifiedTimer::instance()->setSlowModeEnabled(false);
|
|
||||||
QUnifiedTimer::instance()->setSlowdownFactor(1);
|
|
||||||
|
|
||||||
qDebug() << "Slow animations disabled";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(ke->key() == Qt::Key_Backtab)
|
if(ke->key() == Qt::Key_Backtab)
|
||||||
m_backtabPressed = false;
|
m_backtabPressed = false;
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,9 @@
|
|||||||
#include "qt/KeysFiles.h"
|
#include "qt/KeysFiles.h"
|
||||||
#include "qt/MoneroSettings.h"
|
#include "qt/MoneroSettings.h"
|
||||||
#include "qt/NetworkAccessBlockingFactory.h"
|
#include "qt/NetworkAccessBlockingFactory.h"
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#include "qt/macoshelper.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
// IOS exclusions
|
// IOS exclusions
|
||||||
#ifndef Q_OS_IOS
|
#ifndef Q_OS_IOS
|
||||||
@@ -133,6 +136,7 @@ Q_IMPORT_PLUGIN(QtQuickControls1Plugin)
|
|||||||
Q_IMPORT_PLUGIN(QtQuick2DialogsPlugin)
|
Q_IMPORT_PLUGIN(QtQuick2DialogsPlugin)
|
||||||
Q_IMPORT_PLUGIN(QmlFolderListModelPlugin)
|
Q_IMPORT_PLUGIN(QmlFolderListModelPlugin)
|
||||||
Q_IMPORT_PLUGIN(QmlSettingsPlugin)
|
Q_IMPORT_PLUGIN(QmlSettingsPlugin)
|
||||||
|
Q_IMPORT_PLUGIN(QtLabsPlatformPlugin)
|
||||||
Q_IMPORT_PLUGIN(QtQuick2DialogsPrivatePlugin)
|
Q_IMPORT_PLUGIN(QtQuick2DialogsPrivatePlugin)
|
||||||
Q_IMPORT_PLUGIN(QtQuick2PrivateWidgetsPlugin)
|
Q_IMPORT_PLUGIN(QtQuick2PrivateWidgetsPlugin)
|
||||||
Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
|
Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
|
||||||
@@ -178,6 +182,10 @@ int main(int argc, char *argv[])
|
|||||||
if(qgetenv("QMLSCENE_DEVICE") == "softwarecontext")
|
if(qgetenv("QMLSCENE_DEVICE") == "softwarecontext")
|
||||||
isOpenGL = false;
|
isOpenGL = false;
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
// macOS window tabbing is not supported
|
||||||
|
MacOSHelper::disableWindowTabbing();
|
||||||
|
#endif
|
||||||
// disable "QApplication: invalid style override passed" warning
|
// disable "QApplication: invalid style override passed" warning
|
||||||
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
|
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
@@ -331,7 +339,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
// screen settings
|
// screen settings
|
||||||
// Mobile is designed on 128dpi
|
// Mobile is designed on 128dpi
|
||||||
qreal ref_dpi = 128;
|
qreal ref_dpi = 128;
|
||||||
QRect geo = QGuiApplication::primaryScreen()->availableGeometry();
|
QSize screenAvailableSize = QGuiApplication::primaryScreen()->availableSize();
|
||||||
QRect rect = QGuiApplication::primaryScreen()->geometry();
|
QRect rect = QGuiApplication::primaryScreen()->geometry();
|
||||||
qreal dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch();
|
qreal dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch();
|
||||||
qreal physicalDpi = QGuiApplication::primaryScreen()->physicalDotsPerInch();
|
qreal physicalDpi = QGuiApplication::primaryScreen()->physicalDotsPerInch();
|
||||||
@@ -354,6 +362,7 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
|
|
||||||
qWarning().nospace().noquote() << "Qt:" << QT_VERSION_STR << " GUI:" << GUI_VERSION
|
qWarning().nospace().noquote() << "Qt:" << QT_VERSION_STR << " GUI:" << GUI_VERSION
|
||||||
<< " | screen: " << rect.width() << "x" << rect.height()
|
<< " | screen: " << rect.width() << "x" << rect.height()
|
||||||
|
<< " - available: " << screenAvailableSize
|
||||||
<< " - dpi: " << dpi << " - ratio:" << calculated_ratio;
|
<< " - dpi: " << dpi << " - ratio:" << calculated_ratio;
|
||||||
|
|
||||||
// registering types for QML
|
// registering types for QML
|
||||||
@@ -464,8 +473,8 @@ Verify update binary using 'shasum'-compatible (SHA256 algo) output signed by tw
|
|||||||
engine.rootContext()->setContextProperty("isOpenGL", isOpenGL);
|
engine.rootContext()->setContextProperty("isOpenGL", isOpenGL);
|
||||||
engine.rootContext()->setContextProperty("isTails", isTails);
|
engine.rootContext()->setContextProperty("isTails", isTails);
|
||||||
|
|
||||||
engine.rootContext()->setContextProperty("screenWidth", geo.width());
|
engine.rootContext()->setContextProperty("screenAvailableWidth", screenAvailableSize.width());
|
||||||
engine.rootContext()->setContextProperty("screenHeight", geo.height());
|
engine.rootContext()->setContextProperty("screenAvailableHeight", screenAvailableSize.height());
|
||||||
|
|
||||||
#ifndef Q_OS_IOS
|
#ifndef Q_OS_IOS
|
||||||
const QString desktopFolder = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
const QString desktopFolder = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||||
|
|||||||
@@ -87,11 +87,6 @@ bool AddressBookModel::deleteRow(int row)
|
|||||||
return m_addressBook->deleteRow(row);
|
return m_addressBook->deleteRow(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AddressBookModel::lookupPaymentID(const QString &payment_id) const
|
|
||||||
{
|
|
||||||
return m_addressBook->lookupPaymentID(payment_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
QHash<int, QByteArray> AddressBookModel::roleNames() const
|
QHash<int, QByteArray> AddressBookModel::roleNames() const
|
||||||
{
|
{
|
||||||
QHash<int, QByteArray> roleNames = QAbstractListModel::roleNames();
|
QHash<int, QByteArray> roleNames = QAbstractListModel::roleNames();
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ public:
|
|||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
Q_INVOKABLE bool deleteRow(int row);
|
Q_INVOKABLE bool deleteRow(int row);
|
||||||
Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const;
|
|
||||||
virtual QHash<int, QByteArray> roleNames() const override;
|
virtual QHash<int, QByteArray> roleNames() const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public:
|
|||||||
static bool openFolderAndSelectItem(const QUrl &path);
|
static bool openFolderAndSelectItem(const QUrl &path);
|
||||||
static QPixmap screenshot();
|
static QPixmap screenshot();
|
||||||
static QString bundlePath();
|
static QString bundlePath();
|
||||||
|
static void disableWindowTabbing();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //MACOSHELPER_H
|
#endif //MACOSHELPER_H
|
||||||
|
|||||||
@@ -41,6 +41,14 @@
|
|||||||
|
|
||||||
#include "ScopeGuard.h"
|
#include "ScopeGuard.h"
|
||||||
|
|
||||||
|
void MacOSHelper::disableWindowTabbing()
|
||||||
|
{
|
||||||
|
#ifdef __MAC_10_12
|
||||||
|
if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
|
||||||
|
[NSWindow setAllowsAutomaticWindowTabbing: NO];
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool MacOSHelper::isCapsLock()
|
bool MacOSHelper::isCapsLock()
|
||||||
{
|
{
|
||||||
#ifdef __MAC_10_12
|
#ifdef __MAC_10_12
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ QString xdgMime(){
|
|||||||
"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"
|
||||||
|
"StartupWMClass=monero-wallet-gui\n"
|
||||||
).arg(QCoreApplication::applicationFilePath());
|
).arg(QCoreApplication::applicationFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,3 +46,4 @@ set_source_files_properties(${TRANSLATIONS_CPP} PROPERTIES SKIP_AUTOMOC ON)
|
|||||||
set_source_files_properties(${TRANSLATIONS_CPP} PROPERTIES SKIP_AUTOUIC ON)
|
set_source_files_properties(${TRANSLATIONS_CPP} PROPERTIES SKIP_AUTOUIC ON)
|
||||||
|
|
||||||
add_library(translations ${TRANSLATIONS_CPP})
|
add_library(translations ${TRANSLATIONS_CPP})
|
||||||
|
target_link_libraries(translations PUBLIC Qt5::Core)
|
||||||
|
|||||||
@@ -450,12 +450,13 @@ Rectangle {
|
|||||||
tmpWalletFilename = oshelper.temporaryFilename();
|
tmpWalletFilename = oshelper.temporaryFilename();
|
||||||
console.log("Creating temporary wallet", tmpWalletFilename)
|
console.log("Creating temporary wallet", tmpWalletFilename)
|
||||||
var nettype = persistentSettings.nettype;
|
var nettype = persistentSettings.nettype;
|
||||||
|
var kdfRounds = persistentSettings.kdfRounds;
|
||||||
var restoreHeight = wizardController.walletOptionsRestoreHeight;
|
var restoreHeight = wizardController.walletOptionsRestoreHeight;
|
||||||
var subaddressLookahead = wizardController.walletOptionsSubaddressLookahead;
|
var subaddressLookahead = wizardController.walletOptionsSubaddressLookahead;
|
||||||
var deviceName = wizardController.walletOptionsDeviceName;
|
var deviceName = wizardController.walletOptionsDeviceName;
|
||||||
|
|
||||||
connect();
|
connect();
|
||||||
walletManager.createWalletFromDeviceAsync(tmpWalletFilename, "", nettype, deviceName, restoreHeight, subaddressLookahead);
|
walletManager.createWalletFromDeviceAsync(tmpWalletFilename, "", nettype, deviceName, restoreHeight, subaddressLookahead, kdfRounds);
|
||||||
creatingWalletDeviceSplash();
|
creatingWalletDeviceSplash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,14 +41,7 @@ ColumnLayout {
|
|||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
function save(){
|
function save(){
|
||||||
persistentSettings.useRemoteNode = remoteNode.checked
|
persistentSettings.useRemoteNode = remoteNode.checked;
|
||||||
const index = remoteNodesModel.appendIfNotExists({
|
|
||||||
address: remoteNodeEdit.getAddress(),
|
|
||||||
username: "",
|
|
||||||
password: "",
|
|
||||||
trusted: false,
|
|
||||||
});
|
|
||||||
remoteNodesModel.applyRemoteNode(index);
|
|
||||||
if (bootstrapNodeEdit.daemonAddrText == "auto") {
|
if (bootstrapNodeEdit.daemonAddrText == "auto") {
|
||||||
persistentSettings.bootstrapNodeAddress = "auto";
|
persistentSettings.bootstrapNodeAddress = "auto";
|
||||||
} else {
|
} else {
|
||||||
@@ -82,11 +75,20 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
readOnly: true
|
readOnly: true
|
||||||
labelText: qsTr("Blockchain location (optional)") + translationManager.emptyString
|
labelText: {
|
||||||
|
const label = qsTr("Blockchain location (optional)");
|
||||||
|
if (persistentSettings.blockchainDataDir) {
|
||||||
|
const style = "<style type='text/css'>a {cursor:pointer;text-decoration: none; color: #FF6C3C}</style>";
|
||||||
|
return label + style + "<a href='#'> (%1)</a>".arg(qsTr("Reset")) + translationManager.emptyString;
|
||||||
|
} else {
|
||||||
|
return label + translationManager.emptyString;
|
||||||
|
}
|
||||||
|
}
|
||||||
labelFontSize: 14
|
labelFontSize: 14
|
||||||
placeholderText: qsTr("Default") + translationManager.emptyString
|
placeholderText: qsTr("Default") + translationManager.emptyString
|
||||||
placeholderFontSize: 15
|
placeholderFontSize: 15
|
||||||
text: persistentSettings.blockchainDataDir
|
text: persistentSettings.blockchainDataDir
|
||||||
|
onLabelLinkActivated: persistentSettings.blockchainDataDir = ""
|
||||||
|
|
||||||
MoneroComponents.InlineButton {
|
MoneroComponents.InlineButton {
|
||||||
small: true
|
small: true
|
||||||
@@ -196,18 +198,9 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
MoneroComponents.RemoteNodeList {
|
||||||
visible: remoteNode.checked
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Layout.topMargin: 8
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 8
|
||||||
MoneroComponents.RemoteNodeEdit {
|
visible: remoteNode.checked
|
||||||
id: remoteNodeEdit
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
initialAddress: remoteNodesModel.currentRemoteNode().address
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ Rectangle {
|
|||||||
validator: IntValidator { bottom: 1 }
|
validator: IntValidator { bottom: 1 }
|
||||||
text: persistentSettings.kdfRounds ? persistentSettings.kdfRounds : "1"
|
text: persistentSettings.kdfRounds ? persistentSettings.kdfRounds : "1"
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
kdfRoundsText.text = persistentSettings.kdfRounds = parseInt(kdfRoundsText.text) >= 1 ? parseInt(kdfRoundsText.text) : 1;
|
persistentSettings.kdfRounds = parseInt(kdfRoundsText.text) >= 1 ? parseInt(kdfRoundsText.text) : 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,14 +65,14 @@ ColumnLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WizardSummaryItem {
|
WizardSummaryItem {
|
||||||
visible: remoteNodesModel.currentRemoteNode().address !== "" && appWindow.walletMode == 0
|
visible: persistentSettings.useRemoteNode && remoteNodesModel.currentRemoteNode().address !== "" && appWindow.walletMode == 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
header: qsTr("Daemon address") + translationManager.emptyString
|
header: qsTr("Daemon address") + translationManager.emptyString
|
||||||
value: remoteNodesModel.currentRemoteNode().address
|
value: remoteNodesModel.currentRemoteNode().address
|
||||||
}
|
}
|
||||||
|
|
||||||
WizardSummaryItem {
|
WizardSummaryItem {
|
||||||
visible: persistentSettings.bootstrapNodeAddress !== "" && appWindow.walletMode == 1
|
visible: !persistentSettings.useRemoteNode && persistentSettings.bootstrapNodeAddress !== "" && appWindow.walletMode == 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
header: qsTr("Bootstrap address") + translationManager.emptyString
|
header: qsTr("Bootstrap address") + translationManager.emptyString
|
||||||
value: persistentSettings.bootstrapNodeAddress
|
value: persistentSettings.bootstrapNodeAddress
|
||||||
|
|||||||
Reference in New Issue
Block a user