Skip to content

Commit

Permalink
Add the batch of release v3.5.1 commits
Browse files Browse the repository at this point in the history
  • Loading branch information
developer-at-bcn committed Jul 18, 2019
1 parent 0353f6d commit da3795c
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 160 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bytecoin-gui

[![Build Status](https://dev.azure.com/bcndev/bytecoin/_apis/build/status/bytecoin-desktop?branchName=releases/3.5.0)](https://dev.azure.com/bcndev/bytecoin/_build/latest?definitionId=2&branchName=releases/3.5.0)
[![Build Status](https://dev.azure.com/bcndev/bytecoin/_apis/build/status/bytecoin-desktop?branchName=releases/3.5.1)](https://dev.azure.com/bcndev/bytecoin/_build/latest?definitionId=2&branchName=releases/3.5.1)

## How to build binaries from source code

Expand Down
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Release Notes

### v3.5.1 (Beryl)
- Brought back El Capitan support.
- Fixed minor UI bugs.
- Updated the Bytecoin daemons.

### v3.5.0 (Beryl)

- Made many visual improvements to the graphical elements of the app.
Expand Down
7 changes: 5 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ jobs:
displayName: Clone desktop code
- script: |
brew install qt
displayName: Install qt
curl -L -O https://raw.githubusercontent.com/Homebrew/homebrew-core/8d4d48f0bb552b7b107119aeef59f141ce1f72c3/Formula/qt.rb
depends_on :macos => :mountain_lion
sed -i '' 's/depends_on :macos => :mountain_lion/#depends_on :macos => :mountain_lion/g' qt.rb
brew install qt.rb
displayName: Install qt 5.10.1
- script: |
mkdir bytecoin-gui/build && cd bytecoin-gui/build
Expand Down
2 changes: 1 addition & 1 deletion src/addressbookmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void MyAddressesManager::walletRecordsReceived(const RpcApi::WalletRecords& reco
addressBook_ << AddressItem{rec.label, rec.address};
const AddressIndex index = addressBook_.size() - 1;
addressIndexes_[rec.address] = index;
WalletLogger::debug(tr("[WalletAddressBook] Wallet record indexed."));
// WalletLogger::debug(tr("[WalletAddressBook] Wallet record indexed."));
if (!firstTime_)
emit addressAddedSignal(index);
}
Expand Down
3 changes: 1 addition & 2 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ void WalletApplication::daemonFinished(int exitCode, QProcess::ExitStatus /*exit
restartDaemon();
return;
}
tryToOpenWithEmptyPassword_ = false;

const QString walletdMsg = BuiltinWalletd::errorMessage(returnCode);
const QString msg = !walletdMsg.isEmpty() ?
Expand Down Expand Up @@ -632,7 +631,7 @@ void WalletApplication::checkProof()
void WalletApplication::showWalletdParams()
{
WalletdParamsDialog dlg(Settings::instance().getWalletdConnectionMethod() == ConnectionMethod::BUILTIN && !Settings::instance().getWalletFile().isEmpty(), m_mainWindow);
connect(&dlg, &WalletdParamsDialog::restartWalletd, this, &WalletApplication::restartDaemon);
connect(&dlg, &WalletdParamsDialog::restartWalletd, [this](){ this->tryToOpenWithEmptyPassword_ = true; this->restartDaemon();} );
BuiltinWalletd* walletd = static_cast<BuiltinWalletd*>(walletd_);
if (walletd)
connect(walletd, &BuiltinWalletd::daemonErrorOccurredSignal, &dlg, &WalletdParamsDialog::reject);
Expand Down
2 changes: 1 addition & 1 deletion src/bytecoin-gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TEMPLATE = app
macx: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
macx: ICON = images/bytecoin.icns
win32: RC_ICONS = images/bytecoin.ico
win32: VERSION = 3.19.7.4
win32: VERSION = 3.19.7.18

#QMAKE_CXXFLAGS += -fno-omit-frame-pointer -fsanitize=address,undefined
#LIBS += -lasan -lubsan
Expand Down
9 changes: 8 additions & 1 deletion src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ MainWindow::MainWindow(
// m_ui->m_miningButton->setStyleSheet(QString{BUTTON_STYLE_SHEET}.arg(MAIN_NET_COLOR));
// m_ui->m_logButton->setStyleSheet(QString{BUTTON_STYLE_SHEET}.arg(MAIN_NET_COLOR));

m_ui->m_walletViewOnlyLabel->hide();
m_addressBookModel = new AddressBookModel(addressBookManager_, this);
m_sortedAddressBookModel = new SortedAddressBookModel(m_addressBookModel, this);
m_myAddressesModel = new AddressBookModel(myAddressesManager_, this);
Expand Down Expand Up @@ -300,6 +301,8 @@ QString MainWindow::getAddress() const

void MainWindow::addRecipient(const QString& address, const QString& label)
{
if (walletModel_->isViewOnly())
return;
m_ui->m_sendFrame->addRecipient(address, label);
m_ui->m_sendButton->click();
}
Expand Down Expand Up @@ -528,7 +531,11 @@ void MainWindow::clearTitle()

void MainWindow::setConnectedState()
{
m_ui->m_sendButton->setEnabled(true);
const bool viewOnly = walletModel_->isViewOnly();
m_ui->m_walletViewOnlyLabel->setVisible(viewOnly);

if (!viewOnly)
m_ui->m_sendButton->setEnabled(true);
m_ui->m_miningButton->setEnabled(true);
m_ui->m_overviewButton->setEnabled(true);
m_ui->m_addressBookButton->setEnabled(true);
Expand Down
127 changes: 101 additions & 26 deletions src/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@
<property name="spacing">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
Expand All @@ -188,6 +201,9 @@
<property name="text">
<string>New version %1 of Bytecoin wallet is available!</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
Expand All @@ -203,24 +219,24 @@
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
Expand Down Expand Up @@ -436,17 +452,76 @@
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>0</number>
</property>
</spacer>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="m_walletViewOnlyLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>View-only wallet</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
Expand Down
31 changes: 20 additions & 11 deletions src/overviewframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ namespace WalletGUI {

namespace {

const char TX_HASH_URL[] = "https://explorer.bytecoin.org/tx?hash=%1";
const char BLOCK_HASH_URL[] = "https://explorer.bytecoin.org/block?hash=%1";
const char BLOCK_HEIGHT_URL[] = "https://explorer.bytecoin.org/block?height=%1";
const char MAIN_TX_HASH_URL[] = "https://explorer.bytecoin.org/tx?hash=%1";
const char MAIN_BLOCK_HASH_URL[] = "https://explorer.bytecoin.org/block?hash=%1";
const char MAIN_BLOCK_HEIGHT_URL[] = "https://explorer.bytecoin.org/block?height=%1";
const char STAGE_TX_HASH_URL[] = "https://stage.explorer.bytecoin.org/tx?hash=%1";
const char STAGE_BLOCK_HASH_URL[] = "https://stage.explorer.bytecoin.org/block?hash=%1";
const char STAGE_BLOCK_HEIGHT_URL[] = "https://stage.explorer.bytecoin.org/block?height=%1";


//const char OVERVIEW_STYLE_SHEET_TEMPLATE[] =
Expand Down Expand Up @@ -167,13 +170,15 @@ bool OverviewFrame::eventFilter(QObject* object, QEvent* event)
{
QMouseEvent* e = (QMouseEvent*)event;
QModelIndex modelIndex = view->indexAt(e->pos());

if (!modelIndex.isValid())
return false;
const QString net = m_transactionsModel->data(modelIndex, WalletModel::ROLE_NET).toString();
const bool isTestnet = (net == RpcApi::TEST_NET_NAME);
const bool explorableColumns =
(modelIndex.column() == WalletModel::COLUMN_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString().isEmpty()) ||
!isTestnet &&
((modelIndex.column() == WalletModel::COLUMN_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString().isEmpty()) ||
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HASH).toString().isEmpty()) ||
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HEIGHT && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString().isEmpty());
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HEIGHT && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString().isEmpty()));
const bool proof = m_transactionsModel->data(modelIndex, WalletModel::ROLE_PROOF).toBool();
const bool proofColumn = (modelIndex.column() == WalletModel::COLUMN_PROOF && proof);
const bool valid = explorableColumns || proofColumn;
Expand All @@ -182,16 +187,17 @@ bool OverviewFrame::eventFilter(QObject* object, QEvent* event)

if (explorableColumns)
{
const bool mainnet = (net == RpcApi::MAIN_NET_NAME);
switch(modelIndex.column())
{
case WalletModel::COLUMN_HASH:
QDesktopServices::openUrl(QUrl::fromUserInput(QString{TX_HASH_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString())));
QDesktopServices::openUrl(QUrl::fromUserInput(QString{mainnet ? MAIN_TX_HASH_URL : STAGE_TX_HASH_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString())));
break;
case WalletModel::COLUMN_BLOCK_HASH:
QDesktopServices::openUrl(QUrl::fromUserInput(QString{BLOCK_HASH_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HASH).toString())));
QDesktopServices::openUrl(QUrl::fromUserInput(QString{mainnet ? MAIN_BLOCK_HASH_URL : STAGE_BLOCK_HASH_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HASH).toString())));
break;
case WalletModel::COLUMN_BLOCK_HEIGHT:
QDesktopServices::openUrl(QUrl::fromUserInput(QString{BLOCK_HEIGHT_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString())));
QDesktopServices::openUrl(QUrl::fromUserInput(QString{mainnet ? MAIN_BLOCK_HEIGHT_URL : STAGE_BLOCK_HEIGHT_URL}.arg(m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString())));
break;
}
}
Expand All @@ -207,10 +213,13 @@ bool OverviewFrame::eventFilter(QObject* object, QEvent* event)
QMouseEvent* e = (QMouseEvent*)event;
QModelIndex modelIndex = view->indexAt(e->pos());

const QString net = m_transactionsModel->data(modelIndex, WalletModel::ROLE_NET).toString();
const bool isTestnet = (net == RpcApi::TEST_NET_NAME);
const bool explorableColumns =
(modelIndex.column() == WalletModel::COLUMN_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString().isEmpty()) ||
!isTestnet &&
((modelIndex.column() == WalletModel::COLUMN_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_HASH).toString().isEmpty()) ||
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HASH && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HASH).toString().isEmpty()) ||
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HEIGHT && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString().isEmpty());
(modelIndex.column() == WalletModel::COLUMN_BLOCK_HEIGHT && !m_transactionsModel->data(modelIndex, WalletModel::ROLE_BLOCK_HEIGHT).toString().isEmpty()));
const bool proof = m_transactionsModel->data(modelIndex, WalletModel::ROLE_PROOF).toBool();
const bool proofColumn = (modelIndex.column() == WalletModel::COLUMN_PROOF && proof);

Expand Down
9 changes: 5 additions & 4 deletions src/rpcapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ GetTransfers::Request::toJson() const
RPCAPI_SERIALIZE_FIELD(value, json, to_height);
RPCAPI_SERIALIZE_FIELD(value, json, forward);
RPCAPI_SERIALIZE_FIELD(value, json, desired_transactions_count);
RPCAPI_SERIALIZE_FIELD(value, json, need_outputs);

return json;
}
Expand Down Expand Up @@ -380,7 +381,7 @@ Transfer::fromJson(const QVariantMap& json)
RPCAPI_DESERIALIZE_FIELD(value, json, locked);
RPCAPI_DESERIALIZE_FIELD(value, json, transaction_hash);

RPCAPI_DESERIALIZE_LIST(value, json, outputs);
// RPCAPI_DESERIALIZE_LIST(value, json, outputs);

return value;
}
Expand All @@ -397,7 +398,7 @@ Transfer::toJson() const
RPCAPI_SERIALIZE_FIELD(value, json, locked);
RPCAPI_SERIALIZE_FIELD(value, json, transaction_hash);

RPCAPI_SERIALIZE_LIST(value, json, outputs);
// RPCAPI_SERIALIZE_LIST(value, json, outputs);

return json;
}
Expand Down Expand Up @@ -457,8 +458,8 @@ WalletRecord::fromJson(const QVariantMap& json)
RPCAPI_DESERIALIZE_FIELD(value, json, address);
RPCAPI_DESERIALIZE_FIELD(value, json, label);
RPCAPI_DESERIALIZE_FIELD(value, json, index);
RPCAPI_DESERIALIZE_FIELD(value, json, secret_spend_key);
RPCAPI_DESERIALIZE_FIELD(value, json, public_spend_key);
// RPCAPI_DESERIALIZE_FIELD(value, json, secret_spend_key);
// RPCAPI_DESERIALIZE_FIELD(value, json, public_spend_key);

return value;
}
Expand Down
Loading

0 comments on commit da3795c

Please sign in to comment.