From 5e1feddcb621d7f42b9eb02b68e1858978f550b4 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 11 Jun 2011 12:46:09 +0200 Subject: [PATCH] Add tooltips, make "amount" entry consistent in Options dialog --- gui/forms/addressbookdialog.ui | 20 +++++++++++++++++++- gui/forms/editaddressdialog.ui | 12 ++++++++++-- gui/forms/sendcoinsdialog.ui | 20 +++++++++++++++++++- gui/forms/transactiondescdialog.ui | 6 +++++- gui/src/bitcoingui.cpp | 18 ++++++++++++++++-- gui/src/guiutil.cpp | 1 + gui/src/optionsdialog.cpp | 18 ++++++++++++------ 7 files changed, 82 insertions(+), 13 deletions(-) diff --git a/gui/forms/addressbookdialog.ui b/gui/forms/addressbookdialog.ui index 761ea0fb9..2b3c69fb9 100644 --- a/gui/forms/addressbookdialog.ui +++ b/gui/forms/addressbookdialog.ui @@ -17,9 +17,12 @@ - 1 + 0 + + + Sending @@ -43,6 +46,9 @@ + + + Receiving @@ -97,6 +103,9 @@ + + Create a new address + &New Address... @@ -104,6 +113,9 @@ + + Copy the currently selected address to the system clipboard + &Copy to Clipboard @@ -111,6 +123,9 @@ + + Edit the currently selected address + &Edit... @@ -118,6 +133,9 @@ + + Delete the currently selected address from the list + &Delete diff --git a/gui/forms/editaddressdialog.ui b/gui/forms/editaddressdialog.ui index 763a0bb8e..f0ba28a85 100644 --- a/gui/forms/editaddressdialog.ui +++ b/gui/forms/editaddressdialog.ui @@ -40,10 +40,18 @@ - + + + The label associated with this address book entry + + - + + + The address associated with this address book entry. This can only be modified for sending addresses. + + diff --git a/gui/forms/sendcoinsdialog.ui b/gui/forms/sendcoinsdialog.ui index b53e14a50..595b7f40f 100644 --- a/gui/forms/sendcoinsdialog.ui +++ b/gui/forms/sendcoinsdialog.ui @@ -7,7 +7,7 @@ 0 0 736 - 140 + 149 @@ -44,6 +44,9 @@ + + The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) + 34 @@ -57,6 +60,9 @@ 16777215 + + Amount of bitcoins to send (e.g. 0.05) + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -64,6 +70,9 @@ + + Paste address from system clipboard + &Paste @@ -74,6 +83,9 @@ + + Look up adress in address book + Address &Book... @@ -126,6 +138,9 @@ + + Confirm the send action + &Send @@ -146,6 +161,9 @@ 0 + + Abort the send action + QDialogButtonBox::Cancel diff --git a/gui/forms/transactiondescdialog.ui b/gui/forms/transactiondescdialog.ui index 8a44734da..2f70a3821 100644 --- a/gui/forms/transactiondescdialog.ui +++ b/gui/forms/transactiondescdialog.ui @@ -15,7 +15,11 @@ - + + + This pane shows a detailed description of the transaction + + diff --git a/gui/src/bitcoingui.cpp b/gui/src/bitcoingui.cpp index 96125ef07..c08476cec 100644 --- a/gui/src/bitcoingui.cpp +++ b/gui/src/bitcoingui.cpp @@ -75,10 +75,13 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): address = new QLineEdit(); address->setReadOnly(true); address->setFont(GUIUtil::bitcoinAddressFont()); + address->setToolTip(tr("Your current default receiving address")); hbox_address->addWidget(address); QPushButton *button_new = new QPushButton(tr("&New...")); + button_new->setToolTip(tr("Create new receiving address")); QPushButton *button_clipboard = new QPushButton(tr("&Copy to clipboard")); + button_clipboard->setToolTip(tr("Copy current receiving address to the system clipboard")); hbox_address->addWidget(button_new); hbox_address->addWidget(button_clipboard); @@ -89,6 +92,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): labelBalance = new QLabel(); labelBalance->setFont(QFont("Monospace")); + labelBalance->setToolTip(tr("Your current balance")); hbox_balance->addWidget(labelBalance); hbox_balance->addStretch(1); @@ -108,15 +112,18 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): labelConnections = new QLabel(); labelConnections->setFrameStyle(QFrame::Panel | QFrame::Sunken); labelConnections->setMinimumWidth(130); + labelConnections->setToolTip(tr("Number of connections to other clients")); labelBlocks = new QLabel(); labelBlocks->setFrameStyle(QFrame::Panel | QFrame::Sunken); labelBlocks->setMinimumWidth(130); - + labelBlocks->setToolTip(tr("Number of blocks in the block chain")); + labelTransactions = new QLabel(); labelTransactions->setFrameStyle(QFrame::Panel | QFrame::Sunken); labelTransactions->setMinimumWidth(130); - + labelTransactions->setToolTip(tr("Number of transactions in your wallet")); + statusBar()->addPermanentWidget(labelConnections); statusBar()->addPermanentWidget(labelBlocks); statusBar()->addPermanentWidget(labelTransactions); @@ -131,12 +138,19 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): void BitcoinGUI::createActions() { quit = new QAction(QIcon(":/icons/quit"), tr("&Exit"), this); + quit->setToolTip(tr("Quit application")); sendcoins = new QAction(QIcon(":/icons/send"), tr("&Send coins"), this); + sendcoins->setToolTip(tr("Send coins to a bitcoin address")); addressbook = new QAction(QIcon(":/icons/address-book"), tr("&Address Book"), this); + addressbook->setToolTip(tr("Edit the list of stored addresses and labels")); about = new QAction(QIcon(":/icons/bitcoin"), tr("&About"), this); + about->setToolTip(tr("Show information about Bitcoin")); receivingAddresses = new QAction(QIcon(":/icons/receiving-addresses"), tr("Your &Receiving Addresses..."), this); + receivingAddresses->setToolTip(tr("Show the list of receiving addresses and edit their labels")); options = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); + options->setToolTip(tr("Modify configuration options for bitcoin")); openBitcoin = new QAction(QIcon(":/icons/bitcoin"), "Open &Bitcoin", this); + openBitcoin->setToolTip(tr("Show the Bitcoin window")); connect(quit, SIGNAL(triggered()), qApp, SLOT(quit())); connect(sendcoins, SIGNAL(triggered()), this, SLOT(sendcoinsClicked())); diff --git a/gui/src/guiutil.cpp b/gui/src/guiutil.cpp index d01f23d85..a81cc14fe 100644 --- a/gui/src/guiutil.cpp +++ b/gui/src/guiutil.cpp @@ -33,5 +33,6 @@ void GUIUtil::setupAmountWidget(QLineEdit *widget, QWidget *parent) amountValidator->setDecimals(8); amountValidator->setBottom(0.0); widget->setValidator(amountValidator); + widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); } diff --git a/gui/src/optionsdialog.cpp b/gui/src/optionsdialog.cpp index 1ec777c45..d46b48fb2 100644 --- a/gui/src/optionsdialog.cpp +++ b/gui/src/optionsdialog.cpp @@ -1,6 +1,7 @@ #include "optionsdialog.h" #include "optionsmodel.h" #include "monitoreddatamapper.h" +#include "guiutil.h" #include #include @@ -144,18 +145,23 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): QVBoxLayout *layout = new QVBoxLayout(); bitcoin_at_startup = new QCheckBox(tr("&Start Bitcoin on window system startup")); + bitcoin_at_startup->setToolTip(tr("Automatically start Bitcoin after the computer is turned on")); layout->addWidget(bitcoin_at_startup); minimize_to_tray = new QCheckBox(tr("&Minimize to the tray instead of the taskbar")); + minimize_to_tray->setToolTip(tr("Show only a tray icon after minimizing the window")); layout->addWidget(minimize_to_tray); map_port_upnp = new QCheckBox(tr("Map port using &UPnP")); + map_port_upnp->setToolTip(tr("Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.")); layout->addWidget(map_port_upnp); minimize_on_close = new QCheckBox(tr("M&inimize on close")); + minimize_on_close->setToolTip(tr("Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.")); layout->addWidget(minimize_on_close); - connect_socks4 = new QCheckBox(tr("&Connect through socks4 proxy:")); + connect_socks4 = new QCheckBox(tr("&Connect through SOCKS4 proxy:")); + connect_socks4->setToolTip(tr("Connect to the Bitcon network through a SOCKS4 proxy (e.g. when connecting through Tor)")); layout->addWidget(connect_socks4); QHBoxLayout *proxy_hbox = new QHBoxLayout(); @@ -166,6 +172,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): proxy_ip->setMaximumWidth(140); proxy_ip->setEnabled(false); proxy_ip->setValidator(new QRegExpValidator(QRegExp("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"), this)); + proxy_ip->setToolTip(tr("IP address of the proxy (e.g. 127.0.0.1)")); proxy_ip_label->setBuddy(proxy_ip); proxy_hbox->addWidget(proxy_ip); QLabel *proxy_port_label = new QLabel(tr("&Port: ")); @@ -174,6 +181,7 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): proxy_port->setMaximumWidth(55); proxy_port->setValidator(new QIntValidator(0, 65535, this)); proxy_port->setEnabled(false); + proxy_port->setToolTip(tr("Port of the proxy (e.g. 1234)")); proxy_port_label->setBuddy(proxy_port); proxy_hbox->addWidget(proxy_port); proxy_hbox->addStretch(1); @@ -188,12 +196,10 @@ MainOptionsPage::MainOptionsPage(QWidget *parent): QLabel *fee_label = new QLabel(tr("Pay transaction &fee")); fee_hbox->addWidget(fee_label); fee_edit = new QLineEdit(); - fee_edit->setMaximumWidth(70); + fee_edit->setMaximumWidth(100); + fee_edit->setToolTip(tr("Optional transaction fee per KB that helps make sure your transactions are processed quickly. Most transactions are 1KB. Fee 0.01 recommended.")); - QDoubleValidator *amountValidator = new QDoubleValidator(this); - amountValidator->setDecimals(8); - amountValidator->setBottom(0.0); - fee_edit->setValidator(amountValidator); + GUIUtil::setupAmountWidget(fee_edit, this); fee_label->setBuddy(fee_edit); fee_hbox->addWidget(fee_edit);