aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp27
-rw-r--r--src/qt/bitcoinamountfield.cpp6
-rw-r--r--src/qt/bitcoingui.cpp16
-rw-r--r--src/qt/bitcoingui.h10
-rw-r--r--src/qt/clientmodel.cpp7
-rw-r--r--src/qt/clientmodel.h4
-rw-r--r--src/qt/coincontroldialog.cpp12
-rw-r--r--src/qt/editaddressdialog.cpp5
-rw-r--r--src/qt/forms/rpcconsole.ui26
-rw-r--r--src/qt/guiutil.cpp2
-rw-r--r--src/qt/macdockiconhandler.mm8
-rw-r--r--src/qt/macnotificationhandler.mm4
-rw-r--r--src/qt/optionsmodel.cpp1
-rw-r--r--src/qt/receivecoinsdialog.h1
-rw-r--r--src/qt/recentrequeststablemodel.cpp14
-rw-r--r--src/qt/recentrequeststablemodel.h6
-rw-r--r--src/qt/rpcconsole.cpp2
-rw-r--r--src/qt/sendcoinsdialog.cpp60
-rw-r--r--src/qt/splashscreen.cpp7
-rw-r--r--src/qt/splashscreen.h2
-rw-r--r--src/qt/walletmodel.cpp2
-rw-r--r--src/qt/walletmodel.h7
-rw-r--r--src/qt/walletmodeltransaction.h3
23 files changed, 112 insertions, 120 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index dbdb34b76a..657b42d16a 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -17,6 +17,7 @@
#include "main.h"
#include "ui_interface.h"
#include "util.h"
+#include "wallet.h"
#include <stdint.h>
@@ -74,22 +75,6 @@ static bool ThreadSafeMessageBox(const std::string& message, const std::string&
}
}
-static bool ThreadSafeAskFee(int64_t nFeeRequired)
-{
- if(!guiref)
- return false;
- if(nFeeRequired < CTransaction::nMinTxFee || nFeeRequired <= nTransactionFee || fDaemon)
- return true;
-
- bool payFee = false;
-
- QMetaObject::invokeMethod(guiref, "askFee", GUIUtil::blockingGUIThreadConnection(),
- Q_ARG(qint64, nFeeRequired),
- Q_ARG(bool*, &payFee));
-
- return payFee;
-}
-
static void InitMessage(const std::string &message)
{
if(splashref)
@@ -213,9 +198,10 @@ int main(int argc, char *argv[])
// Application identification (must be set before OptionsModel is initialized,
// as it is used to locate QSettings)
+ bool isaTestNet = TestNet() || RegTest();
QApplication::setOrganizationName("Bitcoin");
QApplication::setOrganizationDomain("bitcoin.org");
- if (TestNet()) // Separate UI settings for testnet
+ if (isaTestNet) // Separate UI settings for testnets
QApplication::setApplicationName("Bitcoin-Qt-testnet");
else
QApplication::setApplicationName("Bitcoin-Qt");
@@ -246,7 +232,7 @@ int main(int argc, char *argv[])
PaymentServer* paymentServer = new PaymentServer(&app);
// User language is set up: pick a data directory
- Intro::pickDataDirectory(TestNet());
+ Intro::pickDataDirectory(isaTestNet);
// Install global event filter that makes sure that long tooltips can be word-wrapped
app.installEventFilter(new GUIUtil::ToolTipToRichTextFilter(TOOLTIP_WRAP_THRESHOLD, &app));
@@ -262,7 +248,6 @@ int main(int argc, char *argv[])
// Subscribe to global signals from core
uiInterface.ThreadSafeMessageBox.connect(ThreadSafeMessageBox);
- uiInterface.ThreadSafeAskFee.connect(ThreadSafeAskFee);
uiInterface.InitMessage.connect(InitMessage);
uiInterface.Translate.connect(Translate);
@@ -275,7 +260,7 @@ int main(int argc, char *argv[])
return 1;
}
- SplashScreen splash(QPixmap(), 0);
+ SplashScreen splash(QPixmap(), 0, isaTestNet);
if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
{
splash.show();
@@ -297,7 +282,7 @@ int main(int argc, char *argv[])
boost::thread_group threadGroup;
- BitcoinGUI window(TestNet(), 0);
+ BitcoinGUI window(isaTestNet, 0);
guiref = &window;
QTimer* pollShutdownTimer = new QTimer(guiref);
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 6b083331d3..1698595188 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -14,8 +14,10 @@
#include <QKeyEvent>
#include <qmath.h> // for qPow()
-BitcoinAmountField::BitcoinAmountField(QWidget *parent):
- QWidget(parent), amount(0), currentUnit(-1)
+BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
+ QWidget(parent),
+ amount(0),
+ currentUnit(-1)
{
amount = new QDoubleSpinBox(this);
amount->setLocale(QLocale::c());
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 048ac070ad..6be5a64015 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -215,6 +215,8 @@ void BitcoinGUI::createActions(bool fIsTestnet)
historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
tabGroup->addAction(historyAction);
+ // These showNormalIfMinimized are needed because Send Coins and Receive Coins
+ // can be triggered from the tray menu, and need to show the GUI to be useful.
connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
@@ -331,6 +333,7 @@ void BitcoinGUI::createToolBars()
toolbar->addAction(sendCoinsAction);
toolbar->addAction(receiveCoinsAction);
toolbar->addAction(historyAction);
+ overviewAction->setChecked(true);
}
void BitcoinGUI::setClientModel(ClientModel *clientModel)
@@ -729,19 +732,6 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
QMainWindow::closeEvent(event);
}
-void BitcoinGUI::askFee(qint64 nFeeRequired, bool *payFee)
-{
- if (!clientModel || !clientModel->getOptionsModel())
- return;
-
- QString strMessage = tr("This transaction is over the size limit. You can still send it for a fee of %1, "
- "which goes to the nodes that process your transaction and helps to support the network. "
- "Do you want to pay the fee?").arg(BitcoinUnits::formatWithUnit(clientModel->getOptionsModel()->getDisplayUnit(), nFeeRequired));
- QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm transaction fee"), strMessage,
- QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Yes);
- *payFee = (retval == QMessageBox::Yes);
-}
-
void BitcoinGUI::incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address)
{
// On new transaction, make an info balloon
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index b9a8a03139..75c61d2a8a 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -135,16 +135,6 @@ public slots:
*/
void message(const QString &title, const QString &message, unsigned int style, bool *ret = NULL);
- /** Asks the user whether to pay the transaction fee or to cancel the transaction.
- It is currently not possible to pass a return value to another thread through
- BlockingQueuedConnection, so an indirected pointer is used.
- https://bugreports.qt-project.org/browse/QTBUG-10440
-
- @param[in] nFeeRequired the required fee
- @param[out] payFee true to pay the fee, false to not pay the fee
- */
- void askFee(qint64 nFeeRequired, bool *payFee);
-
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
/** Show incoming transaction notification for new transactions. */
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index c64e411bca..f273b9ea46 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -123,9 +123,12 @@ void ClientModel::updateAlert(const QString &hash, int status)
emit alertsChanged(getStatusBarWarnings());
}
-bool ClientModel::isTestNet() const
+QString ClientModel::getNetworkName() const
{
- return TestNet();
+ QString netname(QString::fromStdString(Params().DataDir()));
+ if(netname.isEmpty())
+ netname = "main";
+ return netname;
}
bool ClientModel::inInitialBlockDownload() const
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 05e8412528..ca735f14ce 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -46,8 +46,8 @@ public:
double getVerificationProgress() const;
QDateTime getLastBlockDate() const;
- //! Return true if client connected to testnet
- bool isTestNet() const;
+ //! Return network (main, testnet3, regtest)
+ QString getNetworkName() const;
//! Return true if core is doing initial block download
bool inInitialBlockDownload() const;
//! Return true if core is importing blocks
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index b4e6aeb1dd..e1a9140f45 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -449,7 +449,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
}
}
- QString sPriorityLabel = "";
+ QString sPriorityLabel = tr("none");
int64_t nAmount = 0;
int64_t nPayFee = 0;
int64_t nAfterFee = 0;
@@ -593,10 +593,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
// turn labels "red"
- l5->setStyleSheet((nBytes >= 1000) ? "color:red;" : ""); // Bytes >= 1000
- l6->setStyleSheet((!AllowFree(dPriority)) ? "color:red;" : ""); // Priority < "medium"
- l7->setStyleSheet((fLowOutput) ? "color:red;" : ""); // Low Output = "yes"
- l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC
+ l5->setStyleSheet((nBytes >= 1000) ? "color:red;" : ""); // Bytes >= 1000
+ l6->setStyleSheet((dPriority > 0 && !AllowFree(dPriority)) ? "color:red;" : ""); // Priority < "medium"
+ l7->setStyleSheet((fLowOutput) ? "color:red;" : ""); // Low Output = "yes"
+ l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC
// tool tips
QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
@@ -604,7 +604,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
toolTip1 += tr("Can vary +/- 1 byte per input.");
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
- toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\"") + "<br /><br />";
+ toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee));
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp
index 618567218f..46982cc339 100644
--- a/src/qt/editaddressdialog.cpp
+++ b/src/qt/editaddressdialog.cpp
@@ -13,7 +13,10 @@
EditAddressDialog::EditAddressDialog(Mode mode, QWidget *parent) :
QDialog(parent),
- ui(new Ui::EditAddressDialog), mapper(0), mode(mode), model(0)
+ ui(new Ui::EditAddressDialog),
+ mapper(0),
+ mode(mode),
+ model(0)
{
ui->setupUi(this);
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 36c0b881ca..69504f3159 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -36,7 +36,7 @@
</font>
</property>
<property name="text">
- <string>Bitcoin Core</string>
+ <string>General</string>
</property>
</widget>
</item>
@@ -172,14 +172,14 @@
</widget>
</item>
<item row="7" column="0">
- <widget class="QLabel" name="label_7">
+ <widget class="QLabel" name="label_8">
<property name="text">
- <string>Number of connections</string>
+ <string>Name</string>
</property>
</widget>
</item>
<item row="7" column="1">
- <widget class="QLabel" name="numberOfConnections">
+ <widget class="QLabel" name="networkName">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
</property>
@@ -195,19 +195,25 @@
</widget>
</item>
<item row="8" column="0">
- <widget class="QLabel" name="label_8">
+ <widget class="QLabel" name="label_7">
<property name="text">
- <string>On testnet</string>
+ <string>Number of connections</string>
</property>
</widget>
</item>
<item row="8" column="1">
- <widget class="QCheckBox" name="isTestNet">
- <property name="enabled">
- <bool>false</bool>
+ <widget class="QLabel" name="numberOfConnections">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
- <string/>
+ <string>N/A</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 309d08d079..b87498402d 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -594,7 +594,7 @@ void restoreWindowGeometry(const QString& strSetting, const QSize& defaultSize,
HelpMessageBox::HelpMessageBox(QWidget *parent) :
QMessageBox(parent)
{
- header = tr("Bitcoin Core") + tr("version") + " " +
+ header = tr("Bitcoin Core") + " " + tr("version") + " " +
QString::fromStdString(FormatFullVersion()) + "\n\n" +
tr("Usage:") + "\n" +
" bitcoin-qt [" + tr("command-line options") + "] " + "\n";
diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index 86b8c834d4..64291c9188 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -1,9 +1,13 @@
+// Copyright (c) 2011-2013 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#include "macdockiconhandler.h"
+#include <QImageWriter>
#include <QMenu>
-#include <QWidget>
#include <QTemporaryFile>
-#include <QImageWriter>
+#include <QWidget>
#undef slots
#include <Cocoa/Cocoa.h>
diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm
index 8bb9b887a1..8a4c94cc5c 100644
--- a/src/qt/macnotificationhandler.mm
+++ b/src/qt/macnotificationhandler.mm
@@ -1,3 +1,7 @@
+// Copyright (c) 2011-2013 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
#include "macnotificationhandler.h"
#undef slots
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 15a873d2bd..363f432d62 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -14,6 +14,7 @@
#include "init.h"
#include "main.h"
#include "net.h"
+#include "wallet.h"
#include "walletdb.h"
#include <QSettings>
diff --git a/src/qt/receivecoinsdialog.h b/src/qt/receivecoinsdialog.h
index 4435bf6694..ed4b04d361 100644
--- a/src/qt/receivecoinsdialog.h
+++ b/src/qt/receivecoinsdialog.h
@@ -13,6 +13,7 @@ namespace Ui {
}
class WalletModel;
class OptionsModel;
+
QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 06f64af146..86c29dd02b 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -3,13 +3,16 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "recentrequeststablemodel.h"
-#include "guiutil.h"
+
#include "bitcoinunits.h"
+#include "guiutil.h"
#include "optionsmodel.h"
-RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent):
+RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent) :
walletModel(parent)
{
+ Q_UNUSED(wallet);
+
/* These columns must match the indices in the ColumnIndex enumeration */
columns << tr("Date") << tr("Label") << tr("Message") << tr("Amount");
}
@@ -22,12 +25,14 @@ RecentRequestsTableModel::~RecentRequestsTableModel()
int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
+
return list.length();
}
int RecentRequestsTableModel::columnCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
+
return columns.length();
}
@@ -88,12 +93,15 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien
QModelIndex RecentRequestsTableModel::index(int row, int column, const QModelIndex &parent) const
{
- return createIndex(row, column, 0);
+ Q_UNUSED(parent);
+
+ return createIndex(row, column);
}
bool RecentRequestsTableModel::removeRows(int row, int count, const QModelIndex &parent)
{
Q_UNUSED(parent);
+
if(count > 0 && row >= 0 && (row+count) <= list.size())
{
beginRemoveRows(parent, row, row + count - 1);
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index d00a2a9055..3aab7b0a48 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -5,12 +5,12 @@
#ifndef RECENTREQUESTSTABLEMODEL_H
#define RECENTREQUESTSTABLEMODEL_H
+#include "walletmodel.h"
+
#include <QAbstractTableModel>
#include <QStringList>
#include <QDateTime>
-#include "walletmodel.h"
-
class CWallet;
struct RecentRequestEntry
@@ -27,7 +27,7 @@ class RecentRequestsTableModel: public QAbstractTableModel
Q_OBJECT
public:
- explicit RecentRequestsTableModel(CWallet *wallet, WalletModel *parent = 0);
+ explicit RecentRequestsTableModel(CWallet *wallet, WalletModel *parent);
~RecentRequestsTableModel();
enum ColumnIndex {
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index d43cdc7e5f..a8470572dd 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -284,7 +284,7 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->buildDate->setText(model->formatBuildDate());
ui->startupTime->setText(model->formatClientStartupTime());
- ui->isTestNet->setChecked(model->isTestNet());
+ ui->networkName->setText(model->getNetworkName());
}
}
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 03cf7f51ea..92be835c56 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -452,9 +452,8 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
msgParams.first = tr("The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
msgParams.second = CClientUIInterface::MSG_ERROR;
break;
- // OK and Aborted are included to prevent a compiler warning.
+ // included to prevent a compiler warning.
case WalletModel::OK:
- case WalletModel::Aborted:
default:
return;
}
@@ -547,44 +546,45 @@ void SendCoinsDialog::coinControlChangeChecked(int state)
// Coin Control: custom change address changed
void SendCoinsDialog::coinControlChangeEdited(const QString& text)
{
- if (model)
+ if (model && model->getAddressTableModel())
{
- CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get();
+ // Default to no change address until verified
+ CoinControlDialog::coinControl->destChange = CNoDestination();
+ ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
+
+ CBitcoinAddress addr = CBitcoinAddress(text.toStdString());
- // label for the change address
- ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
- if (text.isEmpty())
+ if (text.isEmpty()) // Nothing entered
+ {
ui->labelCoinControlChangeLabel->setText("");
- else if (!CBitcoinAddress(text.toStdString()).IsValid())
+ }
+ else if (!addr.IsValid()) // Invalid address
{
- // invalid change address
- CoinControlDialog::coinControl->destChange = CNoDestination();
-
ui->lineEditCoinControlChange->setValid(false);
- ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
ui->labelCoinControlChangeLabel->setText(tr("Warning: Invalid Bitcoin address"));
}
- else
+ else // Valid address
{
- QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
- if (!associatedLabel.isEmpty())
- ui->labelCoinControlChangeLabel->setText(associatedLabel);
- else
+ CPubKey pubkey;
+ CKeyID keyid;
+ addr.GetKeyID(keyid);
+ if (!model->getPubKey(keyid, pubkey)) // Unknown change address
{
- CPubKey pubkey;
- CKeyID keyid;
- CBitcoinAddress(text.toStdString()).GetKeyID(keyid);
- if (model->getPubKey(keyid, pubkey))
- ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
+ ui->lineEditCoinControlChange->setValid(false);
+ ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
+ }
+ else // Known change address
+ {
+ ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
+
+ // Query label
+ QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
+ if (!associatedLabel.isEmpty())
+ ui->labelCoinControlChangeLabel->setText(associatedLabel);
else
- {
- // unknown change address
- CoinControlDialog::coinControl->destChange = CNoDestination();
-
- ui->lineEditCoinControlChange->setValid(false);
- ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
- ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
- }
+ ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
+
+ CoinControlDialog::coinControl->destChange = addr.Get();
}
}
}
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 4528c3477c..6fb834c045 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -4,14 +4,13 @@
#include "splashscreen.h"
-#include "chainparams.h"
#include "clientversion.h"
#include "util.h"
#include <QApplication>
#include <QPainter>
-SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
+SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet) :
QSplashScreen(pixmap, f)
{
// set reference point, paddings
@@ -32,7 +31,7 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
// load the bitmap for writing some text over it
QPixmap newPixmap;
- if(TestNet()) {
+ if(isTestNet) {
newPixmap = QPixmap(":/images/splash_testnet");
}
else {
@@ -72,7 +71,7 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f) :
pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText);
// draw testnet string if testnet is on
- if(TestNet()) {
+ if(isTestNet) {
QFont boldFont = QFont(font, 10*fontFactor);
boldFont.setWeight(QFont::Bold);
pixPaint.setFont(boldFont);
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index ddf040593d..070e376c95 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -14,7 +14,7 @@ class SplashScreen : public QSplashScreen
Q_OBJECT
public:
- explicit SplashScreen(const QPixmap &pixmap = QPixmap(), Qt::WindowFlags f = 0);
+ explicit SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet);
};
#endif // SPLASHSCREEN_H
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 984a5a2e71..f08342b83e 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -6,8 +6,8 @@
#include "addresstablemodel.h"
#include "guiconstants.h"
-#include "transactiontablemodel.h"
#include "recentrequeststablemodel.h"
+#include "transactiontablemodel.h"
#include "base58.h"
#include "db.h"
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 44a1912ecc..1a4d25615a 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -17,8 +17,8 @@
class AddressTableModel;
class OptionsModel;
-class TransactionTableModel;
class RecentRequestsTableModel;
+class TransactionTableModel;
class WalletModelTransaction;
class CCoinControl;
@@ -75,8 +75,7 @@ public:
AmountWithFeeExceedsBalance,
DuplicateAddress,
TransactionCreationFailed, // Error returned when wallet is still locked
- TransactionCommitFailed,
- Aborted
+ TransactionCommitFailed
};
enum EncryptionStatus
@@ -103,7 +102,7 @@ public:
// Return status record for SendCoins, contains error id + information
struct SendCoinsReturn
{
- SendCoinsReturn(StatusCode status = Aborted):
+ SendCoinsReturn(StatusCode status = OK):
status(status) {}
StatusCode status;
};
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index a948808a75..b7e85bcd11 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -39,9 +39,6 @@ private:
CWalletTx *walletTransaction;
CReserveKey *keyChange;
qint64 fee;
-
-public slots:
-
};
#endif // WALLETMODELTRANSACTION_H