From 7f5a1b529b37c81e04ae077612e82f2ab0649bfd Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 3 Dec 2012 13:35:14 +0100 Subject: [PATCH 1/2] remove unneeded flag from MSG_INFORMATION and fix an indentation --- src/qt/notificator.h | 8 ++++---- src/ui_interface.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qt/notificator.h b/src/qt/notificator.h index abb47109..833b52cb 100644 --- a/src/qt/notificator.h +++ b/src/qt/notificator.h @@ -46,11 +46,11 @@ public slots: private: QWidget *parent; enum Mode { - None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */ - Freedesktop, /**< Use DBus org.freedesktop.Notifications */ - QSystemTray, /**< Use QSystemTray::showMessage */ + None, /**< Ignore informational notifications, and show a modal pop-up dialog for Critical notifications. */ + Freedesktop, /**< Use DBus org.freedesktop.Notifications */ + QSystemTray, /**< Use QSystemTray::showMessage */ Growl12, /**< Use the Growl 1.2 notification system (Mac only) */ - Growl13 /**< Use the Growl 1.3 notification system (Mac only) */ + Growl13 /**< Use the Growl 1.3 notification system (Mac only) */ }; QString programName; Mode mode; diff --git a/src/ui_interface.h b/src/ui_interface.h index 693411aa..072d2507 100644 --- a/src/ui_interface.h +++ b/src/ui_interface.h @@ -62,7 +62,7 @@ public: MODAL = 0x10000000U, /** Predefined combinations for certain default usage cases */ - MSG_INFORMATION = (ICON_INFORMATION | BTN_OK), + MSG_INFORMATION = ICON_INFORMATION, MSG_WARNING = (ICON_WARNING | BTN_OK | MODAL), MSG_ERROR = (ICON_ERROR | BTN_OK | MODAL) }; From 15d8ff20294d20e6b11ec54450943eb7c5282ae0 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Mon, 3 Dec 2012 13:51:58 +0100 Subject: [PATCH 2/2] rework ThreadSafeAskFee() / askFee() functions - remove unused parameter from ThreadSafeAskFee(), which also results in the removal of an orphan translation-string --- src/noui.cpp | 2 +- src/qt/bitcoin.cpp | 3 ++- src/qt/walletmodel.cpp | 2 +- src/ui_interface.h | 2 +- src/wallet.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/noui.cpp b/src/noui.cpp index ba2b1aab..204e76ab 100644 --- a/src/noui.cpp +++ b/src/noui.cpp @@ -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; } diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index 95d956dd..dbdfade0 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -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(), diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 3568616c..9d5a2c04 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -189,7 +189,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList ThreadSafeMessageBox; /** Ask the user whether they want to pay a fee or not. */ - boost::signals2::signal > ThreadSafeAskFee; + boost::signals2::signal > ThreadSafeAskFee; /** Handle a URL passed at the command line. */ boost::signals2::signal ThreadSafeHandleURI; diff --git a/src/wallet.cpp b/src/wallet.cpp index 1a74e7bb..cedda9e9 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -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))