diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/addressbookpage.cpp | 48 | ||||
-rw-r--r-- | src/qt/addressbookpage.h | 8 | ||||
-rw-r--r-- | src/qt/bitcoingui.h | 1 | ||||
-rw-r--r-- | src/qt/clientmodel.cpp | 4 | ||||
-rw-r--r-- | src/qt/forms/addressbookpage.ui | 9 | ||||
-rw-r--r-- | src/qt/paymentserver.h | 1 | ||||
-rw-r--r-- | src/qt/res/icons/bitcoin.icns | bin | 99044 -> 919273 bytes | |||
-rw-r--r-- | src/qt/res/icons/bitcoin.svg | 58 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 12 |
9 files changed, 96 insertions, 45 deletions
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 9e35e51bbf..cc3d27d01d 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -51,25 +51,26 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : switch(tab) { case SendingTab: - ui->labelExplanation->setVisible(false); - ui->deleteButton->setVisible(true); + ui->labelExplanation->setText(tr("These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.")); + ui->deleteAddress->setVisible(true); ui->signMessage->setVisible(false); break; case ReceivingTab: - ui->deleteButton->setVisible(false); + ui->labelExplanation->setText(tr("These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.")); + ui->deleteAddress->setVisible(false); ui->signMessage->setVisible(true); break; } // Context menu actions - QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this); + QAction *copyAddressAction = new QAction(ui->copyAddress->text(), this); QAction *copyLabelAction = new QAction(tr("Copy &Label"), this); QAction *editAction = new QAction(tr("&Edit"), this); QAction *sendCoinsAction = new QAction(tr("Send &Coins"), this); QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this); QAction *signMessageAction = new QAction(ui->signMessage->text(), this); QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this); - deleteAction = new QAction(ui->deleteButton->text(), this); + deleteAction = new QAction(ui->deleteAddress->text(), this); // Build context menu contextMenu = new QMenu(); @@ -90,11 +91,11 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : contextMenu->addAction(verifyMessageAction); // Connect signals for context menu actions - connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked())); + connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyAddress_clicked())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); - connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); - connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(onSendCoins_clicked())); + connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteAddress_clicked())); + connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(onSendCoinsAction())); connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked())); @@ -138,17 +139,14 @@ void AddressBookPage::setModel(AddressTableModel *model) ui->tableView->sortByColumn(0, Qt::AscendingOrder); // Set column widths - ui->tableView->horizontalHeader()->resizeSection( - AddressTableModel::Address, 320); - ui->tableView->horizontalHeader()->setResizeMode( - AddressTableModel::Label, QHeaderView::Stretch); + ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Label, QHeaderView::Stretch); + ui->tableView->horizontalHeader()->setResizeMode(AddressTableModel::Address, QHeaderView::ResizeToContents); connect(ui->tableView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(selectionChanged())); // Select row for newly created address - connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(selectNewAddress(QModelIndex,int,int))); + connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(selectNewAddress(QModelIndex,int,int))); selectionChanged(); } @@ -158,7 +156,7 @@ void AddressBookPage::setOptionsModel(OptionsModel *optionsModel) this->optionsModel = optionsModel; } -void AddressBookPage::on_copyToClipboard_clicked() +void AddressBookPage::on_copyAddress_clicked() { GUIUtil::copyEntryData(ui->tableView, AddressTableModel::Address); } @@ -210,7 +208,7 @@ void AddressBookPage::on_verifyMessage_clicked() } } -void AddressBookPage::onSendCoins_clicked() +void AddressBookPage::onSendCoinsAction() { QTableView *table = ui->tableView; QModelIndexList indexes = table->selectionModel()->selectedRows(AddressTableModel::Address); @@ -222,7 +220,7 @@ void AddressBookPage::onSendCoins_clicked() } } -void AddressBookPage::on_newAddressButton_clicked() +void AddressBookPage::on_newAddress_clicked() { if(!model) return; @@ -238,7 +236,7 @@ void AddressBookPage::on_newAddressButton_clicked() } } -void AddressBookPage::on_deleteButton_clicked() +void AddressBookPage::on_deleteAddress_clicked() { QTableView *table = ui->tableView; if(!table->selectionModel()) @@ -264,8 +262,8 @@ void AddressBookPage::selectionChanged() { case SendingTab: // In sending tab, allow deletion of selection - ui->deleteButton->setEnabled(true); - ui->deleteButton->setVisible(true); + ui->deleteAddress->setEnabled(true); + ui->deleteAddress->setVisible(true); deleteAction->setEnabled(true); ui->signMessage->setEnabled(false); ui->signMessage->setVisible(false); @@ -274,8 +272,8 @@ void AddressBookPage::selectionChanged() break; case ReceivingTab: // Deleting receiving addresses, however, is not allowed - ui->deleteButton->setEnabled(false); - ui->deleteButton->setVisible(false); + ui->deleteAddress->setEnabled(false); + ui->deleteAddress->setVisible(false); deleteAction->setEnabled(false); ui->signMessage->setEnabled(true); ui->signMessage->setVisible(true); @@ -283,14 +281,14 @@ void AddressBookPage::selectionChanged() ui->verifyMessage->setVisible(false); break; } - ui->copyToClipboard->setEnabled(true); + ui->copyAddress->setEnabled(true); ui->showQRCode->setEnabled(true); } else { - ui->deleteButton->setEnabled(false); + ui->deleteAddress->setEnabled(false); ui->showQRCode->setEnabled(false); - ui->copyToClipboard->setEnabled(false); + ui->copyAddress->setEnabled(false); ui->signMessage->setEnabled(false); ui->verifyMessage->setEnabled(false); } diff --git a/src/qt/addressbookpage.h b/src/qt/addressbookpage.h index c6653a5e8a..0631781685 100644 --- a/src/qt/addressbookpage.h +++ b/src/qt/addressbookpage.h @@ -59,17 +59,17 @@ private: private slots: /** Delete currently selected address entry */ - void on_deleteButton_clicked(); + void on_deleteAddress_clicked(); /** Create a new address for receiving coins and / or add a new address book entry */ - void on_newAddressButton_clicked(); + void on_newAddress_clicked(); /** Copy address of currently selected address entry to clipboard */ - void on_copyToClipboard_clicked(); + void on_copyAddress_clicked(); /** Open the sign message tab in the Sign/Verify Message dialog with currently selected address */ void on_signMessage_clicked(); /** Open the verify message tab in the Sign/Verify Message dialog with currently selected address */ void on_verifyMessage_clicked(); /** Open send coins dialog for currently selected address (no button) */ - void onSendCoins_clicked(); + void onSendCoinsAction(); /** Generate a QR Code from the currently selected address */ void on_showQRCode_clicked(); /** Copy label of currently selected address entry to clipboard (no button) */ diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index aba81cb3bc..c59cf3c5e5 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -61,6 +61,7 @@ public: void removeAllWallets(); /** Used by WalletView to allow access to needed QActions */ + // Todo: Use Qt signals for these QAction * getOverviewAction() { return overviewAction; } QAction * getHistoryAction() { return historyAction; } QAction * getAddressBookAction() { return addressBookAction; } diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index ae66924181..863176aa1b 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -52,8 +52,10 @@ QDateTime ClientModel::getLastBlockDate() const { if (pindexBest) return QDateTime::fromTime_t(pindexBest->GetBlockTime()); - else + else if(!isTestNet()) return QDateTime::fromTime_t(1231006505); // Genesis block's time + else + return QDateTime::fromTime_t(1296688602); // Genesis block's time (testnet) } double ClientModel::getVerificationProgress() const diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 71ab75ca3f..3cf307384a 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -16,9 +16,6 @@ <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QLabel" name="labelExplanation"> - <property name="text"> - <string>These are your Bitcoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</string> - </property> <property name="textFormat"> <enum>Qt::PlainText</enum> </property> @@ -58,7 +55,7 @@ <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QPushButton" name="newAddressButton"> + <widget class="QPushButton" name="newAddress"> <property name="toolTip"> <string>Create a new address</string> </property> @@ -72,7 +69,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="copyToClipboard"> + <widget class="QPushButton" name="copyAddress"> <property name="toolTip"> <string>Copy the currently selected address to the system clipboard</string> </property> @@ -125,7 +122,7 @@ </widget> </item> <item> - <widget class="QPushButton" name="deleteButton"> + <widget class="QPushButton" name="deleteAddress"> <property name="toolTip"> <string>Delete the currently selected address from the list</string> </property> diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h index cfc48afb38..1f2fdd4664 100644 --- a/src/qt/paymentserver.h +++ b/src/qt/paymentserver.h @@ -37,6 +37,7 @@ class QLocalServer; class PaymentServer : public QObject { Q_OBJECT + private: bool saveURIs; QLocalServer* uriServer; diff --git a/src/qt/res/icons/bitcoin.icns b/src/qt/res/icons/bitcoin.icns Binary files differindex 3c757080aa..54d02d34dd 100644 --- a/src/qt/res/icons/bitcoin.icns +++ b/src/qt/res/icons/bitcoin.icns diff --git a/src/qt/res/icons/bitcoin.svg b/src/qt/res/icons/bitcoin.svg new file mode 100644 index 0000000000..14cf0c5e11 --- /dev/null +++ b/src/qt/res/icons/bitcoin.svg @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Designer: Jonas Schnelli
+ License: MIT
+-->
+
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1"
+ id="svg2" sodipodi:docname="bitcoin-logo-noshadow.svg" inkscape:version="0.48.2 r9819" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1024px" height="1024px"
+ viewBox="-34 -34 580 580" enable-background="new 0 0 1024 1024" xml:space="preserve">
+
+ <!-- nice shadow with alpha 0.35 -->
+ <filter id="dropShadowAlpha">
+ <feColorMatrix result="matrixOut" in="SourceAlpha" type="saturate"
+ values="0.1" />
+ <feGaussianBlur in="matrixOut" result="blur-out" stdDeviation="6" />
+ <feColorMatrix in="blur-out" result="color-out" type="matrix"
+ values="0 0 0 0 0
+ 0 0 0 0 0
+ 0 0 0 0 0
+ 0 0 0 0.35 0"/>
+ <feBlend in="SourceGraphic" in2="color-out" mode="normal" />
+ </filter>
+
+ <g>
+ <!-- white background circle for making B not transparent but still keep inner shadows -->
+ <circle cx="255" cy="255" r="200" stroke-width="2" fill="white"/>
+
+ <radialGradient id="innerBtop" cx="277.4905" cy="196.4412" r="34.3969" gradientUnits="userSpaceOnUse">
+ <stop offset="0" style="stop-color:#F9AA4B"/>
+ <stop offset="1" style="stop-color:#F7931A"/>
+ </radialGradient>
+ <path fill="url(#innerBtop)" filter="url(#dropShadowAlpha)" d="M254.647,174.6l-13.983,56.08c15.855,3.951,64.735,20.071,72.656-11.656
+ C321.568,185.928,270.503,178.552,254.647,174.6z"/>
+
+ <radialGradient id="innerBbottom" cx="261.9153" cy="284.5671" r="39.8381" gradientUnits="userSpaceOnUse">
+ <stop offset="0" style="stop-color:#F9AA4B"/>
+ <stop offset="1" style="stop-color:#F7931A"/>
+ </radialGradient>
+ <path fill="url(#innerBbottom)" filter="url(#dropShadowAlpha)" d="M233.608,258.984l-15.425,61.832c19.04,4.729,77.769,23.584,86.448-11.296
+ C313.703,273.144,252.647,263.736,233.608,258.984z"/>
+
+ <radialGradient id="coinShape" cx="256.0276" cy="256.0027" r="255.9878" gradientUnits="userSpaceOnUse">
+ <stop offset="0" style="stop-color:#F9AA4B"/>
+ <stop offset="1" style="stop-color:#F7931A"/>
+ </radialGradient>
+ <path fill="url(#coinShape)" filter="url(#dropShadowAlpha)" d="M317.871,7.656c-137.12-34.192-276.024,49.28-310.2,186.44
+ c-34.208,137.136,49.256,276.048,186.36,310.24c137.16,34.199,276.063-49.265,310.256-186.408
+ C538.479,180.776,455.023,41.848,317.871,7.656z M368.807,219.528c-3.688,24.936-17.512,37.008-35.864,41.24
+ c25.2,13.12,38.024,33.239,25.809,68.12c-15.16,43.319-51.176,46.976-99.072,37.912l-11.624,46.584l-28.088-7l11.472-45.96
+ c-7.279-1.809-14.72-3.729-22.384-5.809l-11.512,46.177l-28.056-7l11.624-46.673c-6.561-1.68-13.225-3.464-20.024-5.168
+ l-36.552-9.111l13.943-32.152c0,0,20.696,5.504,20.416,5.096c7.952,1.969,11.48-3.216,12.872-6.672l18.368-73.64l0.048-0.2
+ l13.104-52.568c0.344-5.968-1.712-13.496-13.088-16.336c0.439-0.296-20.4-5.072-20.4-5.072l7.472-30l38.736,9.673l-0.032,0.144
+ c5.824,1.448,11.824,2.824,17.937,4.216L245.423,89.2l28.072,7l-11.28,45.224c7.536,1.721,15.12,3.456,22.504,5.297l11.2-44.929
+ l28.088,7l-11.504,46.145C347.967,167.152,373.904,185.464,368.807,219.528z"/>
+ </g>
+</svg>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index c9ce374346..50f22b877a 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -38,7 +38,6 @@ class RPCExecutor : public QObject Q_OBJECT public slots: - void start(); void request(const QString &command); signals: @@ -47,11 +46,6 @@ signals: #include "rpcconsole.moc" -void RPCExecutor::start() -{ - // Nothing to do -} - /** * Split shell command line into a list of arguments. Aims to emulate \c bash and friends. * @@ -187,6 +181,7 @@ void RPCExecutor::request(const QString &command) RPCConsole::RPCConsole(QWidget *parent) : QDialog(parent), ui(new Ui::RPCConsole), + clientModel(0), historyPtr(0) { ui->setupUi(this); @@ -384,16 +379,15 @@ void RPCConsole::browseHistory(int offset) void RPCConsole::startExecutor() { - QThread* thread = new QThread; + QThread *thread = new QThread; RPCExecutor *executor = new RPCExecutor(); executor->moveToThread(thread); - // Notify executor when thread started (in executor thread) - connect(thread, SIGNAL(started()), executor, SLOT(start())); // Replies from executor object must go to this object connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString))); // Requests from this object must go to executor connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); + // On stopExecutor signal // - queue executor for deletion (in execution thread) // - quit the Qt event loop in the execution thread |