allow multiple units in bitcoin amount widget (for example, for sending) using a combobox

This commit is contained in:
Wladimir J. van der Laan
2011-07-26 13:08:34 +02:00
parent ca1dbe10ed
commit 587e52855a
8 changed files with 197 additions and 49 deletions

View File

@@ -36,7 +36,7 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
case ProxyPort:
return QVariant(QString::fromStdString(addrProxy.ToStringPort()));
case Fee:
return QVariant(QString::fromStdString(FormatMoney(nTransactionFee)));
return QVariant(nTransactionFee);
default:
return QVariant();
}
@@ -104,16 +104,8 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
}
break;
case Fee: {
int64 retval;
if(ParseMoney(value.toString().toStdString(), retval))
{
nTransactionFee = retval;
walletdb.WriteSetting("nTransactionFee", nTransactionFee);
}
else
{
successful = false; // Parse error
}
nTransactionFee = value.toLongLong();
walletdb.WriteSetting("nTransactionFee", nTransactionFee);
}
break;
default: