From 70b14636cd60529c87b2cc61516f5d1bf49299a5 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 18 Oct 2013 19:42:40 +0200 Subject: [PATCH] qt: general polish after adding new receive flow - We no longer have an address book, but "address lists", update message accordingly - Add tooltips here and there - Clarify text on buttons - add Copy Address button to receive request dialog --- src/qt/addressbookpage.cpp | 6 +- src/qt/forms/addressbookpage.ui | 18 ++---- src/qt/forms/editaddressdialog.ui | 4 +- src/qt/forms/receivecoinsdialog.ui | 22 +++++-- src/qt/forms/receiverequestdialog.ui | 82 +++++++++++++++++++++---- src/qt/forms/sendcoinsentry.ui | 5 +- src/qt/forms/signverifymessagedialog.ui | 6 +- src/qt/receiverequestdialog.cpp | 12 +++- src/qt/receiverequestdialog.h | 1 + 9 files changed, 114 insertions(+), 42 deletions(-) diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp index 7fbdf2e9c..0b364afca 100644 --- a/src/qt/addressbookpage.cpp +++ b/src/qt/addressbookpage.cpp @@ -45,6 +45,7 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept())); ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->tableView->setFocus(); + ui->closeButton->setText(tr("C&hoose")); ui->exportButton->hide(); break; case ForEditing: @@ -90,8 +91,7 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); - // Pass through accept action from button box - connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(accept())); } AddressBookPage::~AddressBookPage() @@ -268,7 +268,7 @@ void AddressBookPage::on_exportButton_clicked() // CSV is currently the only supported format QString filename = GUIUtil::getSaveFileName( this, - tr("Export Address Book Data"), QString(), + tr("Export Address List"), QString(), tr("Comma separated file (*.csv)")); if (filename.isNull()) return; diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui index 9edaf7402..5a92a455b 100644 --- a/src/qt/forms/addressbookpage.ui +++ b/src/qt/forms/addressbookpage.ui @@ -11,7 +11,7 @@ - + @@ -60,7 +60,7 @@ Create a new address - &New Address + &New @@ -74,7 +74,7 @@ Copy the currently selected address to the system clipboard - &Copy Address + &Copy @@ -124,15 +124,9 @@ - - - - 0 - 0 - - - - QDialogButtonBox::Ok + + + C&lose diff --git a/src/qt/forms/editaddressdialog.ui b/src/qt/forms/editaddressdialog.ui index b4a4c1b1e..8ff380522 100644 --- a/src/qt/forms/editaddressdialog.ui +++ b/src/qt/forms/editaddressdialog.ui @@ -32,7 +32,7 @@ - The label associated with this address book entry + The label associated with this address list entry @@ -49,7 +49,7 @@ - The address associated with this address book entry. This can only be modified for sending addresses. + The address associated with this address list entry. This can only be modified for sending addresses. diff --git a/src/qt/forms/receivecoinsdialog.ui b/src/qt/forms/receivecoinsdialog.ui index a5946883b..e01a23b9c 100644 --- a/src/qt/forms/receivecoinsdialog.ui +++ b/src/qt/forms/receivecoinsdialog.ui @@ -30,13 +30,16 @@ - + 80 0 + + The amount to request + @@ -50,7 +53,11 @@ - + + + The label to associate with the receiving address + + @@ -63,7 +70,11 @@ - + + + The message to attach to payment request + + @@ -74,8 +85,11 @@ + + Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before. + - R&euse an existing receiving address + R&euse an existing receiving address (not recommended) diff --git a/src/qt/forms/receiverequestdialog.ui b/src/qt/forms/receiverequestdialog.ui index fc0d10b4e..d7724ef91 100644 --- a/src/qt/forms/receiverequestdialog.ui +++ b/src/qt/forms/receiverequestdialog.ui @@ -28,6 +28,9 @@ 300 + + QR Code + Qt::PlainText @@ -53,6 +56,12 @@ 50 + + QFrame::NoFrame + + + QFrame::Plain + true @@ -64,22 +73,16 @@ - - - Qt::Horizontal - - - - 40 - 20 - + + + Copy &URI - + - + - Copy &URI + Copy &Address @@ -97,6 +100,26 @@ + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + QDialogButtonBox::Close + + + @@ -109,5 +132,38 @@ - + + + buttonBox + rejected() + ReceiveRequestDialog + reject() + + + 452 + 573 + + + 243 + 298 + + + + + buttonBox + accepted() + ReceiveRequestDialog + accept() + + + 452 + 573 + + + 243 + 298 + + + + diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui index 5c6afd6c7..db742d633 100644 --- a/src/qt/forms/sendcoinsentry.ui +++ b/src/qt/forms/sendcoinsentry.ui @@ -87,7 +87,7 @@ - Choose address from address book + Choose previously used address @@ -137,7 +137,7 @@ - Enter a label for this address to add it to your address book + Enter a label for this address to add it to the list of used addresses @@ -674,7 +674,6 @@ BitcoinAmountField QLineEdit
bitcoinamountfield.h
- 1 QValidatedLineEdit diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui index 279b2a505..16cc6c2ea 100644 --- a/src/qt/forms/signverifymessagedialog.ui +++ b/src/qt/forms/signverifymessagedialog.ui @@ -20,7 +20,7 @@ - 0 + 1 @@ -58,7 +58,7 @@ - Choose an address from the address book + Choose previously used address @@ -271,7 +271,7 @@ - Choose an address from the address book + Choose previously used address diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp index f6031e2b4..cb0a07fcd 100644 --- a/src/qt/receiverequestdialog.cpp +++ b/src/qt/receiverequestdialog.cpp @@ -44,12 +44,15 @@ void QRImageWidget::mousePressEvent(QMouseEvent *event) { if(event->button() == Qt::LeftButton) { + event->accept(); QMimeData *mimeData = new QMimeData; mimeData->setImageData(exportImage()); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); drag->exec(); + } else { + QLabel::mousePressEvent(event); } } @@ -119,9 +122,9 @@ void ReceiveRequestDialog::update() ui->btnSaveAs->setEnabled(false); QString html; html += ""; - html += "" + GUIUtil::HtmlEscape(uri) + "
"; - html += "
"; html += ""+tr("Payment information")+"
"; + html += ""+tr("URI")+": "; + html += "" + GUIUtil::HtmlEscape(uri) + "
"; html += ""+tr("Address")+": " + GUIUtil::HtmlEscape(info.address) + "
"; if(info.amount) html += ""+tr("Amount")+": " + BitcoinUnits::formatWithUnit(model->getDisplayUnit(), info.amount) + "
"; @@ -173,3 +176,8 @@ void ReceiveRequestDialog::on_btnCopyURI_clicked() QApplication::clipboard()->setText(uri, QClipboard::Selection); } +void ReceiveRequestDialog::on_btnCopyAddress_clicked() +{ + QApplication::clipboard()->setText(info.address, QClipboard::Clipboard); + QApplication::clipboard()->setText(info.address, QClipboard::Selection); +} diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h index 8db1ad83a..1beb873df 100644 --- a/src/qt/receiverequestdialog.h +++ b/src/qt/receiverequestdialog.h @@ -44,6 +44,7 @@ public: private slots: void on_btnCopyURI_clicked(); + void on_btnCopyAddress_clicked(); void update();