rework ThreadSafeAskFee() / askFee() functions

- remove unused parameter from ThreadSafeAskFee(), which also results in
  the removal of an orphan translation-string
This commit is contained in:
Philip Kaufmann 2012-12-03 13:51:58 +01:00
parent 7f5a1b529b
commit 15d8ff2029
5 changed files with 6 additions and 5 deletions

View File

@ -32,7 +32,7 @@ static int noui_ThreadSafeMessageBox(const std::string& message, const std::stri
return 4;
}
static bool noui_ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption)
static bool noui_ThreadSafeAskFee(int64 /*nFeeRequired*/)
{
return true;
}

View File

@ -54,12 +54,13 @@ static void ThreadSafeMessageBox(const std::string& message, const std::string&
}
}
static bool ThreadSafeAskFee(int64 nFeeRequired, const std::string& strCaption)
static bool ThreadSafeAskFee(int64 nFeeRequired)
{
if(!guiref)
return false;
if(nFeeRequired < MIN_TX_FEE || nFeeRequired <= nTransactionFee || fDaemon)
return true;
bool payFee = false;
QMetaObject::invokeMethod(guiref, "askFee", GUIUtil::blockingGUIThreadConnection(),

View File

@ -189,7 +189,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipie
}
return TransactionCreationFailed;
}
if(!uiInterface.ThreadSafeAskFee(nFeeRequired, tr("Sending...").toStdString()))
if(!uiInterface.ThreadSafeAskFee(nFeeRequired))
{
return Aborted;
}

View File

@ -71,7 +71,7 @@ public:
boost::signals2::signal<void (const std::string& message, const std::string& caption, unsigned int style)> ThreadSafeMessageBox;
/** Ask the user whether they want to pay a fee or not. */
boost::signals2::signal<bool (int64 nFeeRequired, const std::string& strCaption), boost::signals2::last_value<bool> > ThreadSafeAskFee;
boost::signals2::signal<bool (int64 nFeeRequired), boost::signals2::last_value<bool> > ThreadSafeAskFee;
/** Handle a URL passed at the command line. */
boost::signals2::signal<void (const std::string& strURI)> ThreadSafeHandleURI;

View File

@ -1310,7 +1310,7 @@ string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew,
return strError;
}
if (fAskFee && !uiInterface.ThreadSafeAskFee(nFeeRequired, _("Sending...")))
if (fAskFee && !uiInterface.ThreadSafeAskFee(nFeeRequired))
return "ABORTED";
if (!CommitTransaction(wtxNew, reservekey))