Compare commits

...
Author SHA1 Message Date
dsc 6745f49e8f Commit cd1cd5cb75
introduced an issue for CMAKE_BUILD_TYPE=Debug:

  libringct.so => not found
  libcryptonote_basic.so => not found
  libcheckpoints.so => not found
  libdevice.so => not found
  libringct_basic.so => not found
  libcommon.so => not found
  libwallet-crypto.so => not found
  libcncrypto.so => not found
  libeasylogging.so => not found
  librandomx.so => not found
  libversion.so => not found

We'll only set `CMAKE_SKIP_RPATH` when in release.
2020-10-12 17:39:26 +02:00
dsc 8c8d6250d9 Merge pull request 'add AUR package file' (#51) from wowario/feather:master into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/51
2020-10-12 14:32:06 +00:00
wowario 657cd6340b add AUR package file 2020-10-12 12:29:08 +03:00
dsc cd1cd5cb75 Merge pull request 'cmake: set CMAKE_SKIP_RPATH on Linux to fix empty RPATH token issue' (#50) from dsc/feather:fix-rpath into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/50
2020-10-11 22:50:51 +00:00
xiphonanddsc 3f50564f11 cmake: set CMAKE_SKIP_RPATH on Linux to fix empty RPATH token issue
https://github.com/monero-project/monero-gui/pull/3150/commits/6ed536982953d870010d8fa065dccbffeb6cae50
https://github.com/monero-project/monero-gui/issues/3142#issuecomment-705940446
2020-10-12 00:48:46 +02:00
dsc 48fb92dc60 Merge pull request 'Windows: no seperators between statusbar widgets' (#48) from tobtoht/feather:windows_status_sep into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/48
2020-10-11 21:37:11 +00:00
tobtoht 5641cf4d9e Windows: no seperators between statusbar widgets 2020-10-11 22:16:33 +02:00
dsc d9eb521e9f Merge pull request 'History, Coins, Xmr.to: double click row to open info dialog' (#49) from tobtoht/feather:history_double_click into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/49
2020-10-11 19:50:59 +00:00
tobtoht 970f8e084d History, Coins, Xmr.to: double click row to open info dialog 2020-10-11 21:49:54 +02:00
dsc bd7ebdf947 Merge pull request 'Windows: hide help button in dialogs' (#47) from tobtoht/feather:window_hide_help into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/47
2020-10-11 18:20:42 +00:00
tobtoht 64da8f217c Windows: hide help button in dialogs 2020-10-11 20:02:23 +02:00
dsc a104a05cfa Merge pull request 'Windows: indent settings file' (#44) from tobtoht/feather:windows_settings_newlines into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/44
2020-10-11 17:51:38 +00:00
dsc 17c1526057 Merge pull request 'Move MainWindow::getContext() to constructor' (#45) from tobtoht/feather:ctx_to_constructor into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/45
2020-10-11 17:23:19 +00:00
tobtoht 2bddad004d Move MainWindow::getContext() to constructor
ctx always exists, spares a few if else statements
2020-10-11 19:16:33 +02:00
dsc 9c139e40d3 Merge pull request 'Xmr.to: disable tor checkbox on Tails and Whonix' (#43) from tobtoht/feather:xmrto_tails_tor into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/43
2020-10-11 17:03:32 +00:00
dsc a12b3e0c77 Merge pull request 'Wizard: misc improvements to create wallet pages' (#42) from tobtoht/feather:wizard_create_fix into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/42
2020-10-11 16:57:54 +00:00
tobtoht 2ffd5f234b Windows: indent settings file 2020-10-11 18:52:01 +02:00
tobtoht 89ea34cfb7 Wizard: misc improvements to create wallet pages
Don't focus on Generate button
Replace HTML for PlainTextEdit
Set font using Utils::relativeFont
Change directory button text no longer clips
Wizard Pages are no longer orphans
Vertical spacers no longer take up more room than they need to
GridLayout -> VerticalLayout
2020-10-11 18:41:44 +02:00
tobtoht 892416bc51 Xmr.to: disable tor checkbox on Tails and Whonix 2020-10-11 18:38:33 +02:00
dsc 12940361d8 Merge pull request 'Receive: always copy full address' (#41) from tobtoht/feather:receive_copy into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/41
2020-10-11 15:26:20 +00:00
tobtoht 3df0786fb0 Receive: always copy full address 2020-10-11 17:23:13 +02:00
dsc 3668f0e27e Merge pull request 'Fix restore from seed functionality' (#40) from dsc/feather:fix-restore-seed into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/40
2020-10-11 15:10:13 +00:00
dsc b114ef1710 Fix restore from seed functionality 2020-10-11 17:08:34 +02:00
dsc ad7b278508 Merge pull request 'Qrcode: save to current directory' (#37) from tobtoht/feather:qrcode_path into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/37
2020-10-11 14:19:09 +00:00
tobtoht e362f2b45d Merge pull request 'History: fix fiat conversion' (#36) from tobtoht/feather:history_fiat_fix into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/36
2020-10-11 13:03:24 +00:00
tobtoht df93b7672a History: fix fiat conversion 2020-10-11 15:02:02 +02:00
tobtoht 7822992837 Qrcode: save to current directory 2020-10-11 14:44:10 +02:00
tobtoht 3f9080332b Merge pull request 'Prices: add support for AUD' (#35) from tobtoht/feather:cur_aud into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/35
2020-10-11 01:26:25 +00:00
tobtoht db689870f1 Prices: add support for AUD 2020-10-11 03:20:41 +02:00
dsc c3fe46c609 Merge pull request 'signed drone builds' (#33) from dsc/feather:sign-drone-yml into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/33
2020-10-10 17:06:12 +00:00
dsc 4ce0b284a6 signed drone builds 2020-10-10 19:05:19 +02:00
dsc e017f3619a Merge pull request 'fix desktop paths (xdgPaths)' (#20) from dsc/feather:fix-xdg-path into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/20
2020-10-10 16:01:11 +00:00
dsc 3d58f13724 fix desktop paths (xdgPaths) 2020-10-10 18:00:07 +02:00
dsc e001e3120f Merge pull request 'Migrate WS server to a machine that's not a potato' (#18) from dsc/feather:change-ws into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/18
2020-10-10 13:14:45 +00:00
dsc 0ff0fd0a26 Migrate WS server to a machine that's not a potato 2020-10-10 15:13:57 +02:00
dsc 996d9cf9c8 Merge pull request 'Small typo' (#17) from dsc/feather:nodes-warning-grammar into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/17
2020-10-10 02:01:56 +00:00
dsc d4359758be grammar 2020-10-10 04:01:25 +02:00
dsc 8b8ee32214 Merge pull request 'TxConfDialog: make amounts selectable' (#14) from tobtoht/feather:txconf_text into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/14
2020-10-09 22:31:59 +00:00
dsc 423b339ab5 Merge pull request 'Balance: don't use scientific notation' (#13) from tobtoht/feather:balance_display into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/13
2020-10-09 22:31:35 +00:00
tobtoht 3888e121d5 Balance: don't use scientific notation 2020-10-10 00:30:52 +02:00
dsc a0c6a75c09 Merge pull request 'History: change tooltip for failed transactions' (#12) from tobtoht/feather:history_note into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/12
2020-10-09 22:24:30 +00:00
dsc b24b57bd2d Merge pull request 'Embed Tor for static Mac OS builds' (#15) from dsc/feather:include-static-tor-mac-os-buildbot into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/15
2020-10-09 22:23:41 +00:00
dsc 1337c1708d Embed Tor executable for static Mac OS builds 2020-10-10 00:23:44 +02:00
tobtoht a0daadc0cb TxConfDialog: make amounts selectable 2020-10-09 21:46:10 +02:00
tobtoht 36495922a1 History: change tooltip for failed transactions 2020-10-09 21:39:37 +02:00
dsc 18543ad33b Merge pull request 'Update README' (#11) from update-readme into master
Reviewed-on: https://git.wownero.com/feather/feather/pulls/11
2020-10-09 18:56:16 +00:00
37 changed files with 339 additions and 179 deletions
+5
View File
@@ -158,3 +158,8 @@ volumes:
- name: files_mac_release - name: files_mac_release
host: host:
path: /mnt/storage1/feather_files/files/mac-release/ path: /mnt/storage1/feather_files/files/mac-release/
---
kind: signature
hmac: 91e773a27d27f29ea62f5df500664b733df641b7c31202c8e5558174fd046fba
...
+16 -1
View File
@@ -157,6 +157,10 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
locale) locale)
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_SKIP_RPATH ON)
endif()
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
message(STATUS "X11_FOUND = ${X11_FOUND}") message(STATUS "X11_FOUND = ${X11_FOUND}")
message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}") message(STATUS "X11_INCLUDE_DIR = ${X11_INCLUDE_DIR}")
@@ -172,12 +176,23 @@ endif()
# Tor/torsocks # Tor/torsocks
set(TOR_TAG "tor-0.4.3.5") set(TOR_TAG "tor-0.4.3.5")
set(TOR_DIR "${CMAKE_SOURCE_DIR}/contrib/tor") set(TOR_DIR "${CMAKE_SOURCE_DIR}/contrib/tor")
if(BUILD_TOR AND APPLE)
execute_process(COMMAND bash -c "touch ${CMAKE_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
ENDIF()
if(UNIX AND NOT APPLE) if(UNIX AND NOT APPLE)
set(TOR_LIB "libtorsocks.so") set(TOR_LIB "libtorsocks.so")
elseif(APPLE) elseif(APPLE)
set(TOR_LIB "libtorsocks.dylib") set(TOR_LIB "libtorsocks.dylib")
endif() endif()
if("$ENV{DRONE}" STREQUAL "true" AND STATIC AND BUILD_TOR)
if("$ENV{DRONE}" STREQUAL "true" AND APPLE)
message(STATUS "We are inside a static compile with Drone CI")
# @TODO: taken from Tor Browser official release for now
execute_process(COMMAND bash -c "cp ~/tor/libevent-2.1.7.dylib ${CMAKE_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib")
execute_process(COMMAND bash -c "cp ~/tor/tor ${CMAKE_SOURCE_DIR}/src/tor/tor")
elseif("$ENV{DRONE}" STREQUAL "true" AND BUILD_TOR)
message(STATUS "We are inside a static compile with Drone CI") message(STATUS "We are inside a static compile with Drone CI")
if(MINGW) if(MINGW)
execute_process(COMMAND bash -c "cp /mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe ${CMAKE_SOURCE_DIR}/src/tor/tor.exe") execute_process(COMMAND bash -c "cp /mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe ${CMAKE_SOURCE_DIR}/src/tor/tor.exe")
+34
View File
@@ -0,0 +1,34 @@
# Maintainer: wowario <wowario[at]protonmail[dot]com>
# Contributor: wowario <wowario[at]protonmail[dot]com>
pkgbase=('monero-feather-git')
pkgname=('monero-feather-git')
pkgver=v0.1.0.0.cd1cd5cb75
pkgrel=1
pkgdesc="a free Monero desktop wallet"
license=('BSD')
arch=('x86_64')
url="https://featherwallet.org"
depends=('boost-libs' 'libunwind' 'openssl' 'readline' 'zeromq' 'pcsclite' 'hidapi' 'protobuf' 'miniupnpc'
'libgcrypt' 'qrencode' 'ccache' 'libsodium' 'libpgm' 'expat' 'base-devel' 'qt5-base')
makedepends=('git' 'cmake' 'boost')
provides=('monero-feather-git')
source=("${pkgname}"::"git+https://git.wownero.com/feather/feather")
sha256sums=('SKIP')
pkgver() {
cd "$srcdir/$pkgname"
git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g'
}
build() {
cd "${srcdir}/${pkgname}"
mkdir build && cd build && cmake .. && make release-static -j2
}
package_feather-git() {
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm755 "${srcdir}/${pkgname}/build/bin/feather" "${pkgdir}/usr/bin/feather"
}
+5 -1
View File
@@ -42,7 +42,7 @@ file(GLOB SOURCE_FILES
"dialog/*.cpp" "dialog/*.cpp"
) )
if(APPLE AND BUILD_TOR) if((APPLE AND BUILD_TOR) OR (APPLE AND "$ENV{DRONE}" STREQUAL "true"))
set(ASSETS_OS "assets_macos_tor.qrc") set(ASSETS_OS "assets_macos_tor.qrc")
elseif(UNIX AND NOT APPLE AND BUILD_TOR) elseif(UNIX AND NOT APPLE AND BUILD_TOR)
set(ASSETS_OS "assets_linux_tor.qrc") set(ASSETS_OS "assets_linux_tor.qrc")
@@ -138,6 +138,10 @@ if(STATIC)
target_compile_definitions(feather PRIVATE STATIC=1) target_compile_definitions(feather PRIVATE STATIC=1)
endif() endif()
if("$ENV{DRONE}" STREQUAL "true")
target_compile_definitions(feather PRIVATE DRONE=1)
endif()
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(feather PRIVATE QT_NO_DEBUG=1) target_compile_definitions(feather PRIVATE QT_NO_DEBUG=1)
endif() endif()
+7 -2
View File
@@ -530,6 +530,11 @@ void AppContext::createWallet(FeatherSeed seed, const QString &path, const QStri
return; return;
} }
if(seed.mnemonicSeed.isEmpty()) {
emit walletCreatedError("Mnemonic seed error. Failed to write wallet.");
return;
}
this->currentWallet = seed.writeWallet(this->walletManager, this->networkType, path, password, this->kdfRounds); this->currentWallet = seed.writeWallet(this->walletManager, this->networkType, path, password, this->kdfRounds);
if(this->currentWallet == nullptr) { if(this->currentWallet == nullptr) {
emit walletCreatedError("Failed to write wallet"); emit walletCreatedError("Failed to write wallet");
@@ -740,10 +745,10 @@ void AppContext::updateBalance() {
throw std::runtime_error("this should not happen, ever"); throw std::runtime_error("this should not happen, ever");
AppContext::balance = this->currentWallet->balance() / AppContext::cdiv; AppContext::balance = this->currentWallet->balance() / AppContext::cdiv;
auto balance_str = QString::number(balance); auto balance_str = QString::number(balance, 'f');
double unlocked = this->currentWallet->unlockedBalance() / AppContext::cdiv; double unlocked = this->currentWallet->unlockedBalance() / AppContext::cdiv;
auto unlocked_str = QString::number(unlocked); auto unlocked_str = QString::number(unlocked, 'f');
emit balanceUpdated(balance, unlocked, balance_str, unlocked_str); emit balanceUpdated(balance, unlocked, balance_str, unlocked_str);
} }
+1 -1
View File
@@ -166,7 +166,7 @@ private:
const unsigned int m_donationBoundary = 15; const unsigned int m_donationBoundary = 15;
UtilsNetworking *m_utilsNetworkingNodes; UtilsNetworking *m_utilsNetworkingNodes;
QTimer *m_storeTimer = new QTimer(this); QTimer *m_storeTimer = new QTimer(this);
QUrl m_wsUrl = QUrl(QStringLiteral("ws://6wku2m4zrv6j666crlo7lzofv6ud6enzllyhou3ijeigpukymi37caad.onion/ws")); QUrl m_wsUrl = QUrl(QStringLiteral("ws://dtg2clrd6iand4mwp2x6nhbqd3nqbxlbiw65f6vkwmmutxy2sijsnjyd.onion/ws"));
}; };
#endif //FEATHER_APPCONTEXT_H #endif //FEATHER_APPCONTEXT_H
+1
View File
@@ -1,5 +1,6 @@
<!DOCTYPE RCC><RCC version="1.0"> <!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/"> <qresource prefix="/">
<file>tor/tor</file> <file>tor/tor</file>
<file>tor/libevent-2.1.7.dylib</file>
</qresource> </qresource>
</RCC> </RCC>
+2 -7
View File
@@ -13,6 +13,7 @@ CalcWidget::CalcWidget(QWidget *parent) :
ui(new Ui::CalcWidget) ui(new Ui::CalcWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
m_ctx = MainWindow::getContext();
ui->imageExchange->setBackgroundRole(QPalette::Base); ui->imageExchange->setBackgroundRole(QPalette::Base);
QPixmap pm(":/assets/images/exchange.png"); QPixmap pm(":/assets/images/exchange.png");
@@ -106,21 +107,15 @@ void CalcWidget::toComboChanged(const QString &data) {
} }
void CalcWidget::initCrypto() { void CalcWidget::initCrypto() {
if (this->m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
this->initComboBox(); this->initComboBox();
} }
void CalcWidget::initFiat() { void CalcWidget::initFiat() {
if(this->m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
this->initComboBox(); this->initComboBox();
} }
void CalcWidget::initComboBox() { void CalcWidget::initComboBox() {
if(m_comboBoxInit || this->m_ctx == nullptr) return; if(m_comboBoxInit) return;
QList<QString> marketsKeys = AppContext::prices->markets.keys(); QList<QString> marketsKeys = AppContext::prices->markets.keys();
QList<QString> ratesKeys = AppContext::prices->rates.keys(); QList<QString> ratesKeys = AppContext::prices->rates.keys();
if(marketsKeys.count() <= 0 || ratesKeys.count() <= 0) return; if(marketsKeys.count() <= 0 || ratesKeys.count() <= 0) return;
+1 -1
View File
@@ -31,7 +31,7 @@ public slots:
private: private:
Ui::CalcWidget *ui; Ui::CalcWidget *ui;
AppContext *m_ctx = nullptr; AppContext *m_ctx;
bool m_comboBoxInit = false; bool m_comboBoxInit = false;
void initComboBox(); void initComboBox();
bool m_changing = false; bool m_changing = false;
+1
View File
@@ -57,6 +57,7 @@ CoinsWidget::CoinsWidget(QWidget *parent)
connect(m_thawAllSelectedAction, &QAction::triggered, this, &CoinsWidget::thawAllSelected); connect(m_thawAllSelectedAction, &QAction::triggered, this, &CoinsWidget::thawAllSelected);
connect(ui->coins, &QTreeView::customContextMenuRequested, this, &CoinsWidget::showContextMenu); connect(ui->coins, &QTreeView::customContextMenuRequested, this, &CoinsWidget::showContextMenu);
connect(ui->coins, &QTreeView::doubleClicked, this, &CoinsWidget::viewOutput);
} }
void CoinsWidget::setModel(CoinsModel * model, Coins * coins) { void CoinsWidget::setModel(CoinsModel * model, Coins * coins) {
+1 -1
View File
@@ -41,7 +41,7 @@ void QrCodeDialog::copyImage() {
} }
void QrCodeDialog::saveImage() { void QrCodeDialog::saveImage() {
QString filename = QFileDialog::getSaveFileName(this, "Select where to save file", "qrcode.png"); QString filename = QFileDialog::getSaveFileName(this, "Select where to save file", QDir::current().filePath("qrcode.png"));
if (filename.isEmpty()) { if (filename.isEmpty()) {
return; return;
} }
+13 -1
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>655</width> <width>655</width>
<height>232</height> <height>248</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -46,6 +46,9 @@
<property name="text"> <property name="text">
<string>address</string> <string>address</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
@@ -60,6 +63,9 @@
<property name="text"> <property name="text">
<string>amount</string> <string>amount</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
@@ -74,6 +80,9 @@
<property name="text"> <property name="text">
<string>fee</string> <string>fee</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
@@ -95,6 +104,9 @@
<property name="text"> <property name="text">
<string>total</string> <string>total</string>
</property> </property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
+8
View File
@@ -35,6 +35,14 @@ HistoryWidget::HistoryWidget(QWidget *parent)
} }
}); });
connect(ui->search, &QLineEdit::textChanged, this, &HistoryWidget::setSearchFilter); connect(ui->search, &QLineEdit::textChanged, this, &HistoryWidget::setSearchFilter);
connect(ui->history, &QTreeView::doubleClicked, [this](QModelIndex index){
if (m_model == nullptr) return;
if (!(m_model->flags(index) & Qt::ItemIsEditable)) {
this->showTxDetails();
}
});
} }
void HistoryWidget::setModel(Coins *coins, TransactionHistoryProxyModel *model, TransactionHistory *txHistory) void HistoryWidget::setModel(Coins *coins, TransactionHistoryProxyModel *model, TransactionHistory *txHistory)
+1
View File
@@ -118,6 +118,7 @@ int main(int argc, char *argv[])
} }
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
QApplication::setDesktopSettingsAware(true); // use system font QApplication::setDesktopSettingsAware(true); // use system font
QApplication::setApplicationVersion(FEATHER_VERSION); QApplication::setApplicationVersion(FEATHER_VERSION);
+10 -5
View File
@@ -37,14 +37,14 @@ MainWindow * MainWindow::pMainWindow = nullptr;
MainWindow::MainWindow(AppContext *ctx, QWidget *parent) : MainWindow::MainWindow(AppContext *ctx, QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
m_ctx(ctx), m_ctx(ctx)
m_aboutDialog(new AboutDialog(this)),
m_windowCalc(new CalcWindow(this))
{ {
pMainWindow = this; pMainWindow = this;
ui->setupUi(this); ui->setupUi(this);
m_windowSettings = new Settings(this); m_windowSettings = new Settings(this);
m_aboutDialog = new AboutDialog(this);
m_windowCalc = new CalcWindow(this);
// light/dark theme // light/dark theme
m_skins.insert("Native", ""); m_skins.insert("Native", "");
@@ -589,7 +589,7 @@ void MainWindow::onBalanceUpdated(double balance, double unlocked, const QString
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
auto label_str = QString("Balance: %1 XMR").arg(unlocked_str); auto label_str = QString("Balance: %1 XMR").arg(unlocked_str);
if(balance > unlocked) if(balance > unlocked)
label_str += QString(" (+%1 XMR unconfirmed)").arg(balance - unlocked); label_str += QString(" (+%1 XMR unconfirmed)").arg(QString::number(balance - unlocked, 'f'));
m_statusLabelBalance->setText(label_str); m_statusLabelBalance->setText(label_str);
} }
@@ -710,6 +710,11 @@ void MainWindow::onCreateTransactionError(const QString &message) {
} }
void MainWindow::create_status_bar() { void MainWindow::create_status_bar() {
#if defined(Q_OS_WIN)
// No seperators between statusbar widgets
this->statusBar()->setStyleSheet("QStatusBar::item {border: None;}");
#endif
this->statusBar()->setFixedHeight(30); this->statusBar()->setFixedHeight(30);
m_statusLabelStatus = new QLabel("Idle", this); m_statusLabelStatus = new QLabel("Idle", this);
@@ -1050,7 +1055,7 @@ void MainWindow::showNodeExhaustedMessage() {
void MainWindow::showWSNodeExhaustedMessage() { void MainWindow::showWSNodeExhaustedMessage() {
auto msg = "Feather is in 'automatic node connection mode' but the " auto msg = "Feather is in 'automatic node connection mode' but the "
"websocket server returned none available nodes. Please go to Settings->Node " "websocket server returned no available nodes. Please go to Settings->Node "
"and enter a node manually."; "and enter a node manually.";
QMessageBox::warning(this, "Could not connect to a node", msg); QMessageBox::warning(this, "Could not connect to a node", msg);
} }
+20
View File
@@ -0,0 +1,20 @@
#include "SubaddressView.h"
#include "model/ModelUtils.h"
SubaddressView::SubaddressView(QWidget *parent) : QTreeView(parent) {
}
void SubaddressView::keyPressEvent(QKeyEvent *event){
QModelIndexList selectedRows = selectionModel()->selectedRows();
if(!selectedIndexes().isEmpty()){
if(event->matches(QKeySequence::Copy)){
QModelIndex index = this->currentIndex();
ModelUtils::copyColumn(&index, index.column());
}
else
QTreeView::keyPressEvent(event);
}
}
+19
View File
@@ -0,0 +1,19 @@
#ifndef FEATHER_SUBADDRESSVIEW_H
#define FEATHER_SUBADDRESSVIEW_H
#include <QTreeView>
#include <QKeyEvent>
#include <QApplication>
#include <QClipboard>
class SubaddressView : public QTreeView
{
public:
SubaddressView(QWidget* parent = nullptr);
protected:
void keyPressEvent(QKeyEvent *event);
};
#endif //FEATHER_SUBADDRESSVIEW_H
+4 -2
View File
@@ -104,7 +104,9 @@ QVariant TransactionHistoryModel::data(const QModelIndex &index, int role) const
switch(index.column()) { switch(index.column()) {
case Column::Date: case Column::Date:
{ {
if (tInfo.confirmations() < tInfo.confirmationsRequired()) if (tInfo.isFailed())
result = "Transaction failed";
else if (tInfo.confirmations() < tInfo.confirmationsRequired())
result = QString("%1/%2 confirmations").arg(QString::number(tInfo.confirmations()), QString::number(tInfo.confirmationsRequired())); result = QString("%1/%2 confirmations").arg(QString::number(tInfo.confirmations()), QString::number(tInfo.confirmationsRequired()));
else else
result = QString("%1 confirmations").arg(QString::number(tInfo.confirmations())); result = QString("%1 confirmations").arg(QString::number(tInfo.confirmations()));
@@ -162,7 +164,7 @@ QVariant TransactionHistoryModel::parseTransactionInfo(const TransactionInfo &tI
return QVariant("?"); return QVariant("?");
double usd_amount = usd_price * tInfo.amount(); double usd_amount = usd_price * tInfo.amount();
if(this->preferredFiatSign != "$") if(this->preferredFiatSymbol != "USD")
usd_amount = AppContext::prices->convert("USD", this->preferredFiatSymbol, usd_amount); usd_amount = AppContext::prices->convert("USD", this->preferredFiatSymbol, usd_amount);
double fiat_rounded = ceil(Utils::roundSignificant(usd_amount, 3) * 100.0) / 100.0; double fiat_rounded = ceil(Utils::roundSignificant(usd_amount, 3) * 100.0) / 100.0;
+6 -1
View File
@@ -42,7 +42,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QTreeView" name="addresses"> <widget class="SubaddressView" name="addresses">
<property name="horizontalScrollBarPolicy"> <property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum> <enum>Qt::ScrollBarAsNeeded</enum>
</property> </property>
@@ -101,6 +101,11 @@
<extends>QLabel</extends> <extends>QLabel</extends>
<header>components.h</header> <header>components.h</header>
</customwidget> </customwidget>
<customwidget>
<class>SubaddressView</class>
<extends>QTreeView</extends>
<header>model/SubaddressView.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources/> <resources/>
<connections/> <connections/>
+5
View File
@@ -136,6 +136,11 @@
<string>RMB</string> <string>RMB</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>AUD</string>
</property>
</item>
</widget> </widget>
</item> </item>
</layout> </layout>
+2 -3
View File
@@ -12,10 +12,9 @@ Settings::Settings(QWidget *parent) :
ui(new Ui::Settings) ui(new Ui::Settings)
{ {
ui->setupUi(this); ui->setupUi(this);
this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png")); m_ctx = MainWindow::getContext();
if(m_ctx == nullptr) this->setWindowIcon(QIcon("://assets/images/appicons/64x64.png"));
m_ctx = MainWindow::getContext();
ui->tabWidget->setTabVisible(2, false); ui->tabWidget->setTabVisible(2, false);
ui->tabWidget->setTabVisible(4, false); ui->tabWidget->setTabVisible(4, false);
+1 -1
View File
@@ -47,7 +47,7 @@ private:
private: private:
void setupSkinCombobox(); void setupSkinCombobox();
AppContext *m_ctx = nullptr; AppContext *m_ctx;
Ui::Settings *ui; Ui::Settings *ui;
}; };
+5
View File
@@ -53,6 +53,11 @@
<string>GBP</string> <string>GBP</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>AUD</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>CAD</string> <string>CAD</string>
+1
View File
@@ -27,6 +27,7 @@ Prices::Prices(QObject *parent) : QObject(parent) {
fiat["CHF"] = "Fr"; fiat["CHF"] = "Fr";
fiat["CNY"] = "¥"; fiat["CNY"] = "¥";
fiat["CZK"] = "Kč"; fiat["CZK"] = "Kč";
fiat["AUD"] = "$";
} }
void Prices::cryptoPricesReceived(const QJsonArray &data) { void Prices::cryptoPricesReceived(const QJsonArray &data) {
+16
View File
@@ -174,6 +174,22 @@ void Tor::handleProcessError(QProcess::ProcessError error) {
bool Tor::unpackBins() { bool Tor::unpackBins() {
QString torFile; QString torFile;
// @TODO: refactor for Mac OS - should compile Tor statically.
#if defined(Q_OS_MAC) && defined(DRONE)
// Tor on Mac requires libevent.dylib, borrowed the executable from
// the official Tor Browser release for now.
QString libEvent = ":/tor/libevent-2.1.7.dylib";
if (Utils::fileExists(libEvent)) {
QFile e(libEvent);
QFileInfo eventInfo(e);
auto libEventPath = QDir(this->torDir).filePath(eventInfo.fileName());
qDebug() << libEventPath;
e.copy(libEventPath);
e.close();
}
#endif
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX) #if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
torFile = ":/tor/tor"; torFile = ":/tor/tor";
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
+1 -1
View File
@@ -98,7 +98,7 @@ bool Utils::readJsonFile(QIODevice &device, QSettings::SettingsMap &map) {
} }
bool Utils::writeJsonFile(QIODevice &device, const QSettings::SettingsMap &map) { bool Utils::writeJsonFile(QIODevice &device, const QSettings::SettingsMap &map) {
device.write(QJsonDocument(QJsonObject::fromVariantMap(map)).toJson()); device.write(QJsonDocument(QJsonObject::fromVariantMap(map)).toJson(QJsonDocument::Indented));
return true; return true;
} }
+2 -2
View File
@@ -49,8 +49,8 @@ struct xdgDesktopEntryPaths {
}; };
const xdgDesktopEntryPaths xdgPaths = { const xdgDesktopEntryPaths xdgPaths = {
QString("%1/monero-gui.desktop").arg(QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation)), QString("%1/feather.desktop").arg(QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation)),
QString("%1/.local/share/icons/monero.png").arg(QDir::homePath()), QString("%1/.local/share/icons/feather.png").arg(QDir::homePath()),
QString("/") QString("/")
}; };
+2 -1
View File
@@ -15,6 +15,7 @@ TickerWidget::TickerWidget(QWidget *parent, QString symbol, QString title, bool
m_convertBalance(convertBalance) m_convertBalance(convertBalance)
{ {
ui->setupUi(this); ui->setupUi(this);
m_ctx = MainWindow::getContext();
// default values before API data // default values before API data
if (title == "") title = m_symbol; if (title == "") title = m_symbol;
@@ -29,7 +30,7 @@ TickerWidget::TickerWidget(QWidget *parent, QString symbol, QString title, bool
connect(AppContext::prices, &Prices::fiatPricesUpdated, this, &TickerWidget::init); connect(AppContext::prices, &Prices::fiatPricesUpdated, this, &TickerWidget::init);
connect(AppContext::prices, &Prices::cryptoPricesUpdated, this, &TickerWidget::init); connect(AppContext::prices, &Prices::cryptoPricesUpdated, this, &TickerWidget::init);
if (convertBalance) if (convertBalance)
connect(MainWindow::getContext(), &AppContext::balanceUpdated, this, &TickerWidget::init); connect(m_ctx, &AppContext::balanceUpdated, this, &TickerWidget::init);
} }
void TickerWidget::init() { void TickerWidget::init() {
+1
View File
@@ -34,6 +34,7 @@ private:
Ui::TickerWidget *ui; Ui::TickerWidget *ui;
QString m_symbol; QString m_symbol;
bool m_convertBalance; bool m_convertBalance;
AppContext *m_ctx;
}; };
#endif // TICKERWIDGET_H #endif // TICKERWIDGET_H
+52 -42
View File
@@ -7,24 +7,24 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>400</width>
<height>335</height> <height>321</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Create Wallet</string> <string>Create Wallet</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="6" column="0"> <item row="4" column="0">
<widget class="QLineEdit" name="directory"/> <widget class="QLineEdit" name="password">
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>Password (Optional)</string> <string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="9" column="0">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
@@ -32,11 +32,31 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="6" column="0">
<widget class="QLineEdit" name="directory"/>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="walletPath"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Directory</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Password (Optional)</string>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <property name="text">
@@ -47,56 +67,46 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLineEdit" name="walletName"/> <widget class="QLineEdit" name="walletName"/>
</item> </item>
<item row="5" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Directory</string>
</property>
</widget>
</item>
<item row="7" column="0"> <item row="7" column="0">
<widget class="QPushButton" name="btnChange"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="maximumSize"> <item>
<size> <widget class="QPushButton" name="btnChange">
<width>180</width> <property name="text">
<height>16777215</height> <string>Change directory</string>
</size> </property>
</property> </widget>
<property name="text"> </item>
<string>Change directory</string> <item>
</property> <spacer name="horizontalSpacer">
</widget> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item row="4" column="0"> </property>
<widget class="QLineEdit" name="password"> <property name="sizeHint" stdset="0">
<property name="text"> <size>
<string/> <width>40</width>
</property> <height>20</height>
<property name="echoMode"> </size>
<enum>QLineEdit::Password</enum> </property>
</property> </spacer>
</widget> </item>
</item> </layout>
<item row="2" column="0">
<widget class="QLineEdit" name="walletPath"/>
</item> </item>
</layout> </layout>
<zorder>label_3</zorder> <zorder>label_3</zorder>
<zorder>label_9</zorder> <zorder>label_9</zorder>
<zorder>password</zorder> <zorder>password</zorder>
<zorder>btnChange</zorder>
<zorder>directory</zorder> <zorder>directory</zorder>
<zorder>label</zorder> <zorder>label</zorder>
<zorder>verticalSpacer</zorder> <zorder>verticalSpacer</zorder>
<zorder>walletName</zorder> <zorder>walletName</zorder>
<zorder>walletPath</zorder> <zorder>walletPath</zorder>
<zorder>horizontalLayoutWidget</zorder>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>walletName</tabstop> <tabstop>walletName</tabstop>
<tabstop>walletPath</tabstop> <tabstop>walletPath</tabstop>
<tabstop>password</tabstop> <tabstop>password</tabstop>
<tabstop>directory</tabstop> <tabstop>directory</tabstop>
<tabstop>btnChange</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>
<connections/> <connections/>
+2 -7
View File
@@ -22,11 +22,7 @@ CreateWalletSeedPage::CreateWalletSeedPage(AppContext *ctx, QWidget *parent) :
this->registerField("mnemonicSeed", ui->hiddenMnemonicSeed); this->registerField("mnemonicSeed", ui->hiddenMnemonicSeed);
ui->hiddenMnemonicSeed->hide(); ui->hiddenMnemonicSeed->hide();
auto fontApp = QApplication::font(); ui->seed->setFont(Utils::relativeFont(1));
auto fontFamily = fontApp.family();
auto fontSize = fontApp.pointSize() + 2;
m_seedFontFamily = fontFamily;
m_seedFontSize = fontSize;
connect(ui->btnRoulette, &QPushButton::clicked, [=]{ connect(ui->btnRoulette, &QPushButton::clicked, [=]{
this->seedRoulette(0); this->seedRoulette(0);
@@ -52,8 +48,7 @@ void CreateWalletSeedPage::seedRoulette(int count) {
} }
void CreateWalletSeedPage::displaySeed(const QString &seed){ void CreateWalletSeedPage::displaySeed(const QString &seed){
auto html = R"(<html><head><meta name="qrichtext" content="1" /></head><body style="font-family:'%1'; font-size:%2pt; font-weight:400; font-style:normal;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%3</p></body></html>)"; ui->seed->setPlainText(seed);
ui->seed->setText(QString(html).arg(m_seedFontFamily).arg(m_seedFontSize).arg(seed));
} }
int CreateWalletSeedPage::nextId() const { int CreateWalletSeedPage::nextId() const {
-2
View File
@@ -42,8 +42,6 @@ private:
QString m_mnemonic; QString m_mnemonic;
unsigned int m_restoreHeight; unsigned int m_restoreHeight;
int m_seedFontSize;
QString m_seedFontFamily;
bool m_roulette = false; bool m_roulette = false;
int m_rouletteSpin = 15; int m_rouletteSpin = 15;
}; };
+64 -77
View File
@@ -6,57 +6,44 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>439</width> <width>438</width>
<height>425</height> <height>444</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>WizardPage</string> <string>WizardPage</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="5" column="0"> <item>
<widget class="QLabel" name="label_2"> <widget class="QPlainTextEdit" name="seed">
<property name="font"> <property name="maximumSize">
<font> <size>
<weight>75</weight> <width>16777215</width>
<bold>true</bold> <height>90</height>
</font> </size>
</property> </property>
<property name="text"> <property name="focusPolicy">
<string>WARNING:</string> <enum>Qt::NoFocus</enum>
</property> </property>
</widget> <property name="frameShape">
</item> <enum>QFrame::Box</enum>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="text"> <property name="frameShadow">
<string>Please save these 14 words on paper (order is important). This seed will allow you to recover your wallet in case of computer failure.</string> <enum>QFrame::Plain</enum>
</property> </property>
<property name="wordWrap"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item>
<spacer name="verticalSpacer"> <widget class="QLineEdit" name="hiddenMnemonicSeed">
<property name="orientation"> <property name="focusPolicy">
<enum>Qt::Vertical</enum> <enum>Qt::NoFocus</enum>
</property> </property>
<property name="sizeHint" stdset="0"> </widget>
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item> </item>
<item row="3" column="0" colspan="2"> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
@@ -73,6 +60,9 @@
</item> </item>
<item> <item>
<widget class="QPushButton" name="btnRoulette"> <widget class="QPushButton" name="btnRoulette">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text"> <property name="text">
<string>Generate</string> <string>Generate</string>
</property> </property>
@@ -80,7 +70,36 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="6" column="0" colspan="2"> <item>
<widget class="QLabel" name="label_4">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Please save these 14 words on paper (order is important). This seed will allow you to recover your wallet in case of computer failure.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>WARNING:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;style&gt;p{margin:0}&lt;/style&gt;&lt;p&gt;• Never disclose your seed.&lt;/p&gt;&lt;p&gt;• Never type it on a website.&lt;/p&gt;&lt;p&gt;• Store it safely (offline).&lt;/p&gt;&lt;p&gt;• &lt;b&gt;Do not lose your seed!&lt;/b&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;style&gt;p{margin:0}&lt;/style&gt;&lt;p&gt;• Never disclose your seed.&lt;/p&gt;&lt;p&gt;• Never type it on a website.&lt;/p&gt;&lt;p&gt;• Store it safely (offline).&lt;/p&gt;&lt;p&gt;• &lt;b&gt;Do not lose your seed!&lt;/b&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@@ -90,50 +109,18 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item>
<widget class="QLabel" name="label"> <spacer name="verticalSpacer">
<property name="text"> <property name="orientation">
<string>Your wallet generation seed is:</string> <enum>Qt::Vertical</enum>
</property> </property>
</widget> <property name="sizeHint" stdset="0">
</item>
<item row="1" column="0" colspan="2">
<widget class="QTextEdit" name="seed">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size> <size>
<width>16777215</width> <width>20</width>
<height>80</height> <height>0</height>
</size> </size>
</property> </property>
<property name="frameShape"> </spacer>
<enum>QFrame::Box</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>1</number>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Sans Serif'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLineEdit" name="hiddenMnemonicSeed"/>
</item> </item>
</layout> </layout>
</widget> </widget>
+8 -7
View File
@@ -20,15 +20,15 @@ WalletWizard::WalletWizard(AppContext *ctx, WalletWizard::Page startPage, QWidge
m_ctx(ctx) { m_ctx(ctx) {
this->setWindowTitle("Welcome to feather"); this->setWindowTitle("Welcome to feather");
this->setWindowIcon(QIcon(":/assets/images/appicons/64x64.png")); this->setWindowIcon(QIcon(":/assets/images/appicons/64x64.png"));
auto openWalletPage = new OpenWalletPage(m_ctx); auto openWalletPage = new OpenWalletPage(m_ctx, this);
auto createWallet = new CreateWalletPage(m_ctx); auto createWallet = new CreateWalletPage(m_ctx, this);
auto createWalletSeed = new CreateWalletSeedPage(m_ctx); auto createWalletSeed = new CreateWalletSeedPage(m_ctx, this);
setPage(Page_Menu, new MenuPage(m_ctx)); setPage(Page_Menu, new MenuPage(m_ctx, this));
setPage(Page_CreateWallet, createWallet); setPage(Page_CreateWallet, createWallet);
setPage(Page_OpenWallet, openWalletPage); setPage(Page_OpenWallet, openWalletPage);
setPage(Page_CreateWalletSeed, createWalletSeed); setPage(Page_CreateWalletSeed, createWalletSeed);
setPage(Page_Network, new NetworkPage(m_ctx)); setPage(Page_Network, new NetworkPage(m_ctx, this));
setPage(Page_Restore, new RestorePage(m_ctx)); setPage(Page_Restore, new RestorePage(m_ctx, this));
if(config()->get(Config::firstRun).toUInt()) if(config()->get(Config::firstRun).toUInt())
setStartId(Page_Network); setStartId(Page_Network);
@@ -53,7 +53,8 @@ WalletWizard::WalletWizard(AppContext *ctx, WalletWizard::Page startPage, QWidge
} }
void WalletWizard::createWallet() { void WalletWizard::createWallet() {
auto mnemonicSeed = this->field("mnemonicSeed").toString(); auto mnemonicRestoredSeed = this->field("mnemonicRestoredSeed").toString();
auto mnemonicSeed = mnemonicRestoredSeed.isEmpty() ? this->field("mnemonicSeed").toString() : mnemonicRestoredSeed;
const auto walletPath = this->field("walletPath").toString(); const auto walletPath = this->field("walletPath").toString();
const auto walletPasswd = this->field("walletPasswd").toString(); const auto walletPasswd = this->field("walletPasswd").toString();
auto restoreHeight = this->field("restoreHeight").toUInt(); auto restoreHeight = this->field("restoreHeight").toUInt();
+16 -11
View File
@@ -15,6 +15,7 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
ui(new Ui::XMRToWidget) ui(new Ui::XMRToWidget)
{ {
ui->setupUi(this); ui->setupUi(this);
m_ctx = MainWindow::getContext();
QString amount_rx = R"(^\d*\.\d*$)"; QString amount_rx = R"(^\d*\.\d*$)";
QRegExp rx; QRegExp rx;
@@ -33,12 +34,7 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
m_showDetailsAction = m_contextMenu->addAction("Details"); m_showDetailsAction = m_contextMenu->addAction("Details");
m_viewOnXmrToAction = m_contextMenu->addAction("View order on XMR.to"); m_viewOnXmrToAction = m_contextMenu->addAction("View order on XMR.to");
m_viewOnXmrToAction->setIcon(QIcon(":/assets/images/xmrto.png")); m_viewOnXmrToAction->setIcon(QIcon(":/assets/images/xmrto.png"));
connect(m_showDetailsAction, &QAction::triggered, [&](){ connect(m_showDetailsAction, &QAction::triggered, this, &XMRToWidget::showInfoDialog);
QModelIndex index = ui->historyTable->currentIndex();
XmrToOrder *order = this->tableModel->orders->at(index.row());
auto * dialog = new XmrToInfoDialog(order, this);
dialog->exec();
});
connect(m_viewOnXmrToAction, &QAction::triggered, [&](){ connect(m_viewOnXmrToAction, &QAction::triggered, [&](){
QModelIndex index = ui->historyTable->currentIndex(); QModelIndex index = ui->historyTable->currentIndex();
XmrToOrder *order = this->tableModel->orders->at(index.row()); XmrToOrder *order = this->tableModel->orders->at(index.row());
@@ -62,6 +58,12 @@ XMRToWidget::XMRToWidget(QWidget *parent) :
m_contextMenu->popup(ui->historyTable->viewport()->mapToGlobal(point)); m_contextMenu->popup(ui->historyTable->viewport()->mapToGlobal(point));
} }
}); });
if (m_ctx->isTails || m_ctx->isWhonix) {
ui->torCheckBox->setDisabled(true);
}
connect(ui->historyTable, &QTreeView::doubleClicked, this, &XMRToWidget::showInfoDialog);
} }
void XMRToWidget::setHistoryModel(XmrToModel *model) { void XMRToWidget::setHistoryModel(XmrToModel *model) {
@@ -81,8 +83,6 @@ void XMRToWidget::onWalletClosed() {
void XMRToWidget::onCreateOrder() { void XMRToWidget::onCreateOrder() {
// @TODO: regex verify // @TODO: regex verify
if(m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
auto amount = ui->lineAmount->text(); auto amount = ui->lineAmount->text();
if(amount.isEmpty()) { if(amount.isEmpty()) {
@@ -123,9 +123,6 @@ void XMRToWidget::onTorCheckBoxToggled(int state) {
} }
void XMRToWidget::updateConversionLabel() { void XMRToWidget::updateConversionLabel() {
if(m_ctx == nullptr)
this->m_ctx = MainWindow::getContext();
QString amount = ui->lineAmount->text(); QString amount = ui->lineAmount->text();
int curIndex = ui->comboBox_currency->currentIndex(); int curIndex = ui->comboBox_currency->currentIndex();
@@ -184,6 +181,14 @@ void XMRToWidget::onEndTransaction() {
ui->btnCreate->setEnabled(true); ui->btnCreate->setEnabled(true);
} }
void XMRToWidget::showInfoDialog() {
QModelIndex index = ui->historyTable->currentIndex();
XmrToOrder *order = this->tableModel->orders->at(index.row());
auto *dialog = new XmrToInfoDialog(order, this);
dialog->exec();
dialog->deleteLater();
}
XMRToWidget::~XMRToWidget() { XMRToWidget::~XMRToWidget() {
delete ui; delete ui;
} }
+4 -1
View File
@@ -43,6 +43,8 @@ signals:
void viewOrder(const QString &orderId); void viewOrder(const QString &orderId);
private: private:
void showInfoDialog();
QMap<QString, TickerWidget*> m_tickerWidgets; QMap<QString, TickerWidget*> m_tickerWidgets;
QMenu *m_contextMenu; QMenu *m_contextMenu;
QAction *m_viewOnXmrToAction; QAction *m_viewOnXmrToAction;
@@ -51,7 +53,8 @@ private:
Ui::XMRToWidget *ui; Ui::XMRToWidget *ui;
AppContext *m_ctx; AppContext *m_ctx;
bool m_ratesDisplayed = false; bool m_ratesDisplayed = false;
const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. Use the clearnet option if this is a problem."; const QString m_regionBlockMessage = "Beware that XMR.To region blocks certain IPs, which can be problematic in combination with Tor. "
"Wait a few minutes for the circuit to switch, or disable the option to relay over Tor if the problem persists.";
double m_unlockedBalance = 0; double m_unlockedBalance = 0;
XmrToModel *tableModel; XmrToModel *tableModel;
+2 -1
View File
@@ -3,11 +3,12 @@
HASH="$1" HASH="$1"
echo "[+] hash: $HASH" echo "[+] hash: $HASH"
export DRONE=true
echo "[+] Building" echo "[+] Building"
rm ~/feather.zip 2>&1 >/dev/null rm ~/feather.zip 2>&1 >/dev/null
cd ~/feather cd ~/feather
git fetch git fetch --all
git reset --hard "$HASH" git reset --hard "$HASH"
git submodule update --init --depth 50 contrib/tor git submodule update --init --depth 50 contrib/tor
git submodule update --init --depth 50 contrib/torsocks git submodule update --init --depth 50 contrib/torsocks