diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-15 22:12:55 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2013-10-15 22:12:55 -0700 |
commit | 03db5c6112541302ae4a3901c2d02b2a1c37c7e3 (patch) | |
tree | d2eaf3ddea154cb15c8ab7d8687847bc4733d20e /src | |
parent | 26ce1bb20d33d0ad49556a0ea950bbf21ef776f5 (diff) | |
parent | 75fa27eacaa12ce9c9630db787f69fd0d70bcfc3 (diff) |
Merge pull request #3094 from Diapolo/btcamountfield
make BitcoinAmountField::setReadOnly() usable
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/bitcoinamountfield.cpp | 5 | ||||
-rw-r--r-- | src/qt/forms/sendcoinsentry.ui | 8 | ||||
-rw-r--r-- | src/qt/sendcoinsentry.cpp | 1 |
3 files changed, 5 insertions, 9 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp index d9d4e3b23d..37b8743eff 100644 --- a/src/qt/bitcoinamountfield.cpp +++ b/src/qt/bitcoinamountfield.cpp @@ -130,9 +130,10 @@ void BitcoinAmountField::setValue(qint64 value) setText(BitcoinUnits::format(currentUnit, value)); } -void BitcoinAmountField::setReadOnly(bool fReadeOnly) +void BitcoinAmountField::setReadOnly(bool fReadOnly) { - // TODO ... + amount->setReadOnly(fReadOnly); + unit->setEnabled(!fReadOnly); } void BitcoinAmountField::unitChanged(int idx) diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui index 2c1cec600c..5c6afd6c71 100644 --- a/src/qt/forms/sendcoinsentry.ui +++ b/src/qt/forms/sendcoinsentry.ui @@ -621,7 +621,7 @@ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> <property name="buddy"> - <cstring>payAmount</cstring> + <cstring>payAmount_s</cstring> </property> </widget> </item> @@ -640,15 +640,9 @@ </item> <item row="5" column="2"> <widget class="BitcoinAmountField" name="payAmount_s"> - <property name="enabled"> - <bool>false</bool> - </property> <property name="acceptDrops"> <bool>false</bool> </property> - <property name="readOnly"> - <bool>true</bool> - </property> </widget> </item> <item row="3" column="2"> diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp index 59724c94f4..aa671e0540 100644 --- a/src/qt/sendcoinsentry.cpp +++ b/src/qt/sendcoinsentry.cpp @@ -174,6 +174,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value) ui->payTo_s->setText(recipient.authenticatedMerchant); ui->memoTextLabel_s->setText(QString::fromStdString(details.memo())); ui->payAmount_s->setValue(recipient.amount); + ui->payAmount_s->setReadOnly(true); setCurrentWidget(ui->SendCoinsSecure); } } |